/* ══════════════════════════════════════════════════════════════
   styles-new.css — New header / nav styles
   DO NOT modify styles.css — this file extends it only.
   ══════════════════════════════════════════════════════════════ */

/* ── Header height — defined in styles.css, do not re-declare here ── */

.nh-inner {
  max-width: 1200px; margin: 0 auto;
  height: var(--hdr-h); padding: 0 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}

/* Logo */
.nh-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0; cursor: pointer;
}
.nh-logo-icon { font-size: 22px; }
.nh-logo-site { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text3); line-height: 1; }
.nh-logo-name { font-size: 15px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.nh-logo-name span { color: var(--accent); }

/* Nav links */
.nh-nav {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.nh-link {
  font-size: 13px; font-weight: 700; color: var(--primary);
  padding: 6px 13px; border-radius: 999px;
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nh-link:hover  { background: var(--surface2); color: var(--accent); }
.nh-link.active { background: var(--surface2); color: var(--accent); }

/* Right side */
.nh-right {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}

/* Upgrade button */
.nh-upgrade-btn {
  font-size: 12px; font-weight: 800;
  padding: 7px 16px; border-radius: 999px; border: 1.5px solid rgba(245,96,61,.6);
  background: transparent;
  color: #f5603d; cursor: pointer;
  letter-spacing: .2px;
  display: flex; align-items: center; gap: 5px;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.nh-upgrade-btn:hover {
  background: #f5603d;
  color: #fff;
  border-color: #f5603d;
}
.nh-upgrade-btn:active { transform: scale(.97); }

/* Premium badge (replaces Upgrade button when user is premium) */
.nh-premium-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-size: 11px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px;
  letter-spacing: .3px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.nh-drop-plan {
  font-size: 11px; font-weight: 700;
  color: #6366f1; margin-top: 3px;
}


.nh-login-btn {
  font-size: 12px; font-weight: 800;
  padding: 7px 16px; border-radius: 999px; border: none;
  background: var(--accent); color: #fff; cursor: pointer;
  transition: opacity .15s;
}
.nh-login-btn:hover { opacity: .88; }

/* ── Avatar + dropdown ── */
.nh-avatar-wrap { position: relative; flex-shrink: 0; }

.nh-avatar-btn {
  width: 36px; height: 36px; min-width: 36px; min-height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface2);
  cursor: pointer; overflow: hidden; padding: 0;
  transition: border-color .15s;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.nh-avatar-btn:hover { border-color: var(--accent); }

.nh-avatar-img {
  width: 36px; height: 36px; min-width: 36px; min-height: 36px;
  object-fit: cover; display: block; border-radius: 50%;
}
.nh-avatar-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--primary);
}

/* Hamburger button (mobile only) */
.nh-hamburger {
  display: none;
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--surface2); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; flex-shrink: 0; padding: 0;
}
.nh-hamburger span {
  display: block; width: 16px; height: 2px;
  background: var(--primary); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nh-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nh-hamburger.open span:nth-child(2) { opacity: 0; }
.nh-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile slide-down nav drawer */
.nh-mobile-drawer {
  display: none;
  position: fixed; top: var(--hdr-h); left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 8px 32px rgba(30,27,58,.12);
  z-index: 299; padding: .75rem 1rem 1rem;
  flex-direction: column; gap: 4px;
}
.nh-mobile-drawer.open { display: flex; }
.nh-drawer-link {
  display: flex; align-items: center; gap: 10px;
  padding: .75rem 1rem; border-radius: 10px;
  font-size: 14px; font-weight: 700; color: var(--primary);
  background: none; border: none; cursor: pointer;
  text-align: left; font-family: inherit;
  transition: background .12s;
}
.nh-drawer-link:hover { background: var(--surface2); }
.nh-drawer-link.active { background: var(--surface2); color: var(--accent); }
.nh-drawer-divider { height: 1px; background: var(--border); margin: .35rem 0; }

/* lp-transparent overrides for hamburger */
.app-header.lp-transparent .nh-hamburger { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.app-header.lp-transparent .nh-hamburger span { background: #fff; }

/* Dropdown */
.nh-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 210px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: .5rem 0;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity .18s, transform .18s;
  z-index: 300;
}
.nh-dropdown.open {
  opacity: 1; pointer-events: all; transform: translateY(0);
}

.nh-drop-header { padding: .65rem 1rem .5rem; }
.nh-drop-name   { font-size: 14px; font-weight: 800; color: var(--primary); }
.nh-drop-badge  { font-size: 11px; color: var(--text3); margin-top: 2px; }

.nh-drop-divider {
  height: 1px; background: var(--border); margin: .35rem 0;
}

.nh-drop-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: .55rem 1rem;
  background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text2);
  text-align: left;
  transition: background .12s, color .12s;
}
.nh-drop-item:hover { background: var(--surface2); color: var(--primary); }
.nh-drop-logout     { color: var(--accent); }
.nh-drop-logout:hover { background: #fff0f3; color: var(--accent); }


/* ── Header smooth transition + solid dark navy when scrolled ── */
.app-header {
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease,
              backdrop-filter .35s ease !important;
  /* Solid state: deep navy matching brand */
  background: #1a1836 !important;
  border-bottom: 1.5px solid rgba(255,255,255,.08) !important;
}

/* ── Landing page transparent header (dark hero) ── */
.app-header.lp-transparent {
  background: rgba(15,13,42,0.75) !important;
  border-bottom-color: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* Nav links — always white on dark header */
.nh-link      { color: rgba(255,255,255,.8) !important; }
.nh-link:hover  { background: rgba(255,255,255,.08) !important; color: #fff !important; }
.nh-link.active { background: rgba(255,255,255,.1) !important; color: #fff !important; }

/* Logo always white on dark header */
.nh-logo-site { color: rgba(255,255,255,.45) !important; }
.nh-logo-name { color: #fff !important; }
.nh-logo-name span { color: var(--accent) !important; }

/* Sign in button */
.nh-login-btn {
  background: var(--accent) !important; color: #fff !important;
  border: none !important;
}


/* ── Mobile overlay (dims content when sidebar open) ── */
.sa-mob-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,20,40,.5);
  z-index: 149;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.sa-mob-overlay.active { opacity: 1; pointer-events: all; }

/* ── Mobile sidebar toggle button ── */
.sa-mob-toggle {
  display: none;
  position: fixed; bottom: 80px; left: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
  font-size: 16px; cursor: pointer; z-index: 148;
  align-items: center; justify-content: center;
  color: var(--primary);
}

/* ══════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV BAR
   ══════════════════════════════════════════════════════════════ */
.nh-mobile-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 60px; z-index: 200;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  box-shadow: 0 -2px 12px rgba(26,26,46,.08);
  justify-content: space-around; align-items: center;
  padding: 0 .5rem;
}

.mb-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; flex: 1; padding: 6px 4px;
  background: none; border: none; cursor: pointer;
  color: var(--text3);
  transition: color .15s;
}
.mb-item.active { color: var(--accent); }
.mb-item:hover  { color: var(--primary); }
.mb-icon  { font-size: 1.25rem; line-height: 1; }
.mb-label { font-size: 9px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }

/* Add bottom padding to page so content isn't hidden behind mobile bar */
@media (max-width: 860px) {
  .nh-nav         { display: none; }
  .nh-upgrade-btn { display: none; }
  .nh-mobile-bar  { display: flex; }
  .nh-hamburger   { display: none; }
  .page-mount     { padding-bottom: 68px; }
  .nh-right       { gap: 8px; flex-shrink: 0; margin-left: auto; }
}

@media (max-width: 480px) {
  .nh-logo-site { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   STUDENT APP — Shell, Sidebar, Home Screen (Premium Redesign)
   ══════════════════════════════════════════════════════════════ */

/* Shell */
.sa-shell {
  display: block;
  min-height: calc(100vh - var(--hdr-h));
}

/* ── Left sidebar — fixed so it never scrolls away ── */
.sa-sidebar {
  width: 232px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed;
  top: var(--hdr-h);
  bottom: 0;
  left: 0;
  height: calc(100vh - var(--hdr-h));
  overflow-y: auto;
  z-index: 50;
}

/* User block */
.sa-user-block {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.sa-user-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sa-user-guest { display: flex; align-items: center; gap: 10px; }

.sa-avatar {
  width: 40px; height: 40px; min-width: 40px; border-radius: 50%;
  flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 2px solid var(--border);
}
.sa-avatar-img  { width: 40px; height: 40px; object-fit: cover; display: block; border-radius: 50%; }
.sa-avatar-init {
  width: 40px; height: 40px; min-width: 40px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 15px; font-weight: 800; border-radius: 50%;
}
.sa-avatar-guest {
  width: 40px; height: 40px; min-width: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface3); color: var(--text3);
  font-size: 15px; font-weight: 800; border-radius: 50%;
}
.sa-user-info { min-width: 0; }
.sa-user-name {
  font-size: 13px; font-weight: 800; color: var(--primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.sa-user-role { font-size: 11px; color: var(--text3); margin-top: 1px; }
.sa-user-badges { display: flex; gap: 6px; }
.sa-badge {
  display: flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 999px;
}
.sa-badge-level { background: rgba(245,166,35,.1); color: #b07800; border: 1px solid rgba(245,166,35,.3); }
.sa-badge-coins { background: rgba(22,199,154,.1); color: #0a8f6e; border: 1px solid rgba(22,199,154,.3); }
.sa-signin-inline {
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: none; border: none; cursor: pointer; padding: 0; margin-top: 2px;
}

/* Nav section labels */
.sa-nav-section-label {
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text3);
  padding: 10px 16px 4px; margin-top: 2px;
}

/* Nav */
.sa-nav { flex: 1; padding: 8px 10px 0; }
.sa-nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  background: none; border: 1px solid transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text2);
  text-align: left; border-radius: 10px;
  transition: background .12s, color .12s;
}
.sa-nav-item:hover  { background: var(--surface2); color: var(--primary); }
.sa-nav-item.active {
  background: rgba(233,69,96,.08); color: var(--accent);
  border-color: rgba(233,69,96,.15);
}
.sa-nav-icon  { font-size: 16px; width: 20px; text-align: center; opacity: .75; }
.sa-nav-item.active .sa-nav-icon { opacity: 1; }

/* Sidebar footer */
.sa-sidebar-foot {
  border-top: 1px solid var(--border);
  padding: 8px 10px 16px;
}
.sa-foot-link {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--text3);
  text-align: left; border-radius: 8px; transition: color .12s, background .12s;
}
.sa-foot-link:hover { color: var(--primary); background: var(--surface2); }

/* ── Content area ── */
.sa-content {
  margin-left: 232px;
  min-width: 0;
  padding: 0 2.5rem 4rem; /* top:0 so sticky score bar bleeds to top edge */
  background: var(--surface2);
  min-height: calc(100vh - var(--hdr-h));
  overflow: visible; /* required for position:sticky children */
}

/* ── Greeting row ── */
.sa-greeting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.sa-greeting-title {
  font-size: 20px; font-weight: 800; color: var(--primary); line-height: 1.2;
}
.sa-greeting-sub { font-size: 13px; color: var(--text2); margin-top: 3px; }
.sa-streak-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(245,166,35,.1); border: 1px solid rgba(245,166,35,.3);
  font-size: 12px; font-weight: 700; color: #a07000;
  white-space: nowrap; flex-shrink: 0;
}

/* ── Stats strip ── */
.sa-stats-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 1px 8px rgba(26,26,46,.06);
}
.sa-stat-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 14px 10px;
  border-right: 1px solid var(--border);
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .4px;
}
.sa-stat-item:last-child { border-right: none; }
.sa-stat-item span:nth-child(1) { font-size: 16px; line-height: 1; }
.sa-stat-item span:nth-child(2) {
  font-size: 17px; font-weight: 900; color: var(--primary); line-height: 1;
}
.streak-green .sa-stat-item span:nth-child(2) { color: var(--green); }
.streak-orange .sa-stat-item span:nth-child(2) { color: var(--accent3); }
.sa-stats-see-all {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--accent);
  background: none; border: none; cursor: pointer;
  padding: 0 8px; border-right: none;
}
.sa-stats-see-all:hover { background: var(--surface2); }

/* ── Continue learning strip ── */
.sa-continue-strip {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
  border-radius: 14px; padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; cursor: pointer;
}
.sa-continue-icon { font-size: 26px; flex-shrink: 0; }
.sa-continue-body { flex: 1; min-width: 0; }
.sa-continue-body h3 { font-size: 14px; font-weight: 800; color: #fff; line-height: 1.2; }
.sa-continue-body p  { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 2px; }
.sa-continue-cta {
  padding: 8px 18px; background: var(--accent); color: #fff;
  border: none; border-radius: 999px; font-size: 12px; font-weight: 800;
  cursor: pointer; flex-shrink: 0; white-space: nowrap;
}
.sa-continue-cta:hover { background: #cf2d46; }

/* ── Section head ── */
.sa-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sa-section-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text3);
}

/* ── Quick start grid ── */
.sa-quickstart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 1.5rem;
}

.sa-qcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 16px 44px;
  cursor: pointer; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.sa-qcard:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26,26,46,.10);
}
.sa-qcard-soon  { opacity: .5; cursor: not-allowed; }
.sa-qcard-soon:hover { transform: none; box-shadow: none; }

/* Colored icon wrappers */
.sa-qcard-icon-wrap {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.sa-qcard-red    .sa-qcard-icon-wrap { background: rgba(233,69,96,.1); }
.sa-qcard-orange .sa-qcard-icon-wrap { background: rgba(245,166,35,.1); }
.sa-qcard-blue   .sa-qcard-icon-wrap { background: rgba(15,52,96,.1); }
.sa-qcard-green  .sa-qcard-icon-wrap { background: rgba(22,199,154,.1); }
.sa-qcard-purple .sa-qcard-icon-wrap { background: rgba(83,74,183,.1); }
.sa-qcard-teal   .sa-qcard-icon-wrap { background: rgba(29,158,117,.1); }

.sa-qcard-body { flex: 1; }
.sa-qcard-title { font-size: 14px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.sa-qcard-desc  { font-size: 12px; color: var(--text2); line-height: 1.4; margin-top: 3px; }

.sa-qcard-arrow {
  position: absolute; bottom: 16px; right: 16px;
  font-size: 14px; color: var(--text3);
  transition: transform .15s, color .15s;
}
.sa-qcard:hover .sa-qcard-arrow { transform: translateX(3px); color: var(--accent); }

/* ── Guest invite ── */
.sa-guest-invite {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: #fffbf0; border: 1px solid rgba(245,166,35,.4);
  border-radius: 12px; padding: .85rem 1.1rem;
  font-size: 13px; color: var(--text2);
}
.sa-guest-invite-btn {
  padding: 8px 16px; background: var(--accent3); color: #fff;
  border: none; border-radius: 8px; font-size: 12px; font-weight: 800;
  cursor: pointer; white-space: nowrap; min-height: 36px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .sa-sidebar  { left: -240px; transition: left .25s; z-index: 150; }
  .sa-sidebar.mobile-open { left: 0; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
  .sa-content  { margin-left: 0; }
  .sa-mob-toggle { display: flex; }
  .sa-mob-overlay { display: block; }
  .sa-content  { padding: 16px 14px 5rem; }
  .sa-quickstart-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sa-stats-bar { grid-template-columns: repeat(3, 1fr); }
  .sa-stat-item:nth-child(4),
  .sa-stat-item:nth-child(5) { display: none; }
  .sa-greeting-title { font-size: 17px; }
  .sa-streak-pill { display: none; }
}
@media (max-width: 480px) {
  .sa-quickstart-grid { grid-template-columns: 1fr; }
  .sa-stats-bar { grid-template-columns: repeat(3, 1fr); }
}

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

/* ── Hero ── */
.lp-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}
.lp-hero-inner { max-width: 640px; margin: 0 auto; }

.lp-eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,.65);
  margin-bottom: .75rem;
}
.lp-headline {
  font-size: clamp(2rem, 7vw, 3.25rem); font-weight: 900;
  line-height: 1.1; color: #fff; margin-bottom: 1rem;
}
.lp-accent { color: var(--accent3); }
.lp-sub {
  font-size: 1rem; color: rgba(255,255,255,.82);
  line-height: 1.65; margin-bottom: 2rem;
}

.lp-hero-btns {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 1.5rem;
}
.lp-btn-primary {
  padding: 13px 28px; background: var(--accent); color: #fff;
  border: none; border-radius: 999px;
  font-size: 15px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 18px rgba(233,69,96,.4);
  transition: opacity .15s, transform .1s;
}
.lp-btn-primary:hover  { opacity: .9; transform: translateY(-1px); }
.lp-btn-primary:active { transform: scale(.97); }

.lp-btn-secondary {
  padding: 13px 28px; background: rgba(255,255,255,.12);
  color: #fff; border: 2px solid rgba(255,255,255,.35);
  border-radius: 999px; font-size: 15px; font-weight: 800;
  cursor: pointer; transition: background .15s;
}
.lp-btn-secondary:hover { background: rgba(255,255,255,.2); }

.lp-hero-chips {
  display: flex; gap: 14px; justify-content: center;
  flex-wrap: wrap;
}
.lp-hero-chips span {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,.7);
}

/* ── Shared section styles ── */
.lp-section-inner { max-width: 900px; margin: 0 auto; }
.lp-section-title {
  font-size: 1.25rem; font-weight: 900; color: var(--primary);
  text-align: center; margin-bottom: 2rem;
}

/* ── Who it's for ── */
.lp-who {
  padding: 3.5rem 1.5rem;
  background: var(--surface2);
}
.lp-who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.lp-who-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 1.75rem 1.5rem;
  text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  transition: transform .15s, box-shadow .15s;
}
.lp-who-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lp-who-icon  { font-size: 2.5rem; }
.lp-who-title { font-size: 1rem; font-weight: 900; color: var(--primary); }
.lp-who-desc  { font-size: 13px; color: var(--text2); line-height: 1.55; flex: 1; }
.lp-who-btn {
  margin-top: auto; padding: 10px 20px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 999px;
  font-size: 13px; font-weight: 800; cursor: pointer;
  transition: opacity .15s;
  width: 100%;
}
.lp-who-btn:hover { opacity: .85; }

/* ── How it works ── */
.lp-how { padding: 3.5rem 1.5rem; background: var(--surface); }
.lp-steps {
  display: flex; align-items: flex-start;
  justify-content: center; gap: .5rem;
  flex-wrap: wrap;
}
.lp-step {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; max-width: 220px; gap: .5rem;
  padding: 1.5rem 1rem;
}
.lp-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .25rem;
}
.lp-step-icon  { font-size: 2rem; }
.lp-step-title { font-size: 1rem; font-weight: 900; color: var(--primary); }
.lp-step-desc  { font-size: 13px; color: var(--text2); line-height: 1.55; }
.lp-step-arrow {
  font-size: 1.5rem; color: var(--border);
  align-self: center; padding: 0 .25rem;
  margin-top: 1rem;
}

/* ── CTA ── */
.lp-cta { padding: 4rem 1.5rem; background: var(--primary); text-align: center; }
.lp-cta-inner { max-width: 520px; margin: 0 auto; }
.lp-cta-icon  { font-size: 3rem; margin-bottom: .75rem; }
.lp-cta-title { font-size: 1.5rem; font-weight: 900; color: #fff; margin-bottom: .5rem; }
.lp-cta-sub   { font-size: 14px; color: rgba(255,255,255,.75); margin-bottom: 1.75rem; line-height: 1.6; }
.lp-cta-btn   { font-size: 16px; padding: 15px 36px; }
.lp-cta-note  { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 1rem; }

/* ── Mobile ── */
@media (max-width: 600px) {
  .lp-step-arrow { display: none; }
  .lp-steps      { gap: 1rem; }
  .lp-step       { max-width: 100%; padding: 1rem; }
  .lp-hero       { padding: 3rem 1.25rem 2.5rem; }
  .lp-who, .lp-how { padding: 2.5rem 1.25rem; }
  .lp-cta        { padding: 3rem 1.25rem; }
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL MOBILE FOUNDATIONS
   ══════════════════════════════════════════════════════════════ */
* { -webkit-tap-highlight-color: transparent; }

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* All buttons touch-friendly */
button, .lp-btn-primary, .lp-btn-secondary, .lp-who-btn,
.generate-btn, .check-btn, .sum-btn, .pq-check-btn,
.wp-btn, .tp-join-btn, .ad-req-approve, .ad-req-reject {
  min-height: 44px;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE — max 768px
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Page padding respects bottom tab bar ── */
  .page-mount { padding-bottom: 72px; }

  /* ── PRACTICE PAGE ── */
  .app-layout {
    flex-direction: column;
    padding: .75rem .75rem 1rem;
    gap: .75rem;
  }
  .app-sidebar {
    width: 100%;
    position: static;
  }
  .mode-pills, .level-pills { flex-direction: row; flex-wrap: wrap; }
  .mode-pill, .level-pill   { flex: 1; text-align: center; min-height: 44px; }

  /* Question cards: stack vertically */
  .q-body {
    flex-direction: column;
    gap: 1rem;
  }
  .q-right { align-self: center; }

  /* Full-width input + check button */
  .type-input-row {
    flex-direction: column;
    gap: 8px;
  }
  .answer-input {
    max-width: 100%;
    width: 100%;
    min-height: 48px;
    font-size: 18px;
  }
  .check-btn {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
  }

  /* Abacus actions full width */
  .abacus-actions { flex-direction: column; gap: 8px; }
  .pq-check-btn, .pq-reset-btn {
    width: 100%; min-height: 44px; font-size: 14px;
  }

  /* Score bar wraps cleanly */
  .score-bar-inner { gap: 8px; }
  .sb-progress-wrap { min-width: 40px; }

  /* Summary modal */
  .modal-card { padding: 1.5rem 1.25rem; }
  .sum-stats  { gap: .5rem; }
  .sum-actions { flex-direction: column; }
  .sum-btn { min-height: 48px; }

  /* ── STUDENT APP HOME ── */
  .sa-shell { display: block; }
  .sa-sidebar { left: -240px; transition: left .25s; }  /* slides in */
  .sa-content { margin-left: 0; }
  .sa-content { padding: .85rem .85rem 1.5rem; }
  .sa-quickstart-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .sa-qcard  { padding: .85rem .75rem; }
  .sa-qcard-icon  { font-size: 1.4rem; }
  .sa-qcard-title { font-size: 13px; }
  .sa-stats-bar   { gap: 0; padding: .5rem .6rem; }
  .sa-stat-item   { min-width: 44px; padding: .15rem .25rem; }
  .sa-stat-item span:nth-child(2) { font-size: 12px; }

  /* ── WORKSHEET PAGE ── */
  .wp-shell   { flex-direction: column; }
  .wp-panel   { width: 100%; border-right: none; border-bottom: 1.5px solid var(--border); }
  .wp-preview { padding: .85rem; }
  .wp-actions { gap: 6px; }
  .wp-btn     { min-height: 48px; font-size: 14px; }

  /* ── COURSE PAGE ── */
  .cp-grid { grid-template-columns: 1fr; }
  .cp-days { gap: 5px; }
  .cp-day  { font-size: 11px; padding: 3px 7px; }




  /* ── LESSON PAGE ── */
  .lp-shell  { flex-direction: column; }
  .lp-sidebar {
    position: fixed; left: -270px; top: var(--hdr-h);
    bottom: 72px; z-index: 150;
    width: 260px; transition: left .25s;
  }
  .lp-sidebar.open { left: 0; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
  .lp-sidebar-toggle {
    display: block;
    margin: .75rem 1rem .25rem;
    min-height: 44px;
    padding: 7px 14px;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 12px; font-weight: 700; color: var(--text2); cursor: pointer;
  }
  .lp-main { padding: .75rem; }
  .lp-bottom-bar { padding: .65rem 1rem; gap: 6px; }
  .lp-nav-btn     { padding: 8px 12px; font-size: 12px; min-height: 44px; }
  .lp-complete-btn { padding: 10px 14px; font-size: 13px; min-height: 44px; }

  /* ── PROFILE PAGE ── */
  .pp-wrap    { padding: 1rem .85rem 3rem; }
  .pp-header  { flex-direction: column; align-items: flex-start; }
  .pp-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pp-upgrade-btn { width: 100%; min-height: 44px; }

  /* ── PRICING PAGE ── */
  .pr-wrap  { padding: 1.5rem .85rem 3rem; }
  .pr-cards { grid-template-columns: 1fr; }
  .pr-upgrade-btn { min-height: 52px; font-size: 15px; }
  .pr-toggle-btn  { padding: 8px 14px; }

  /* ── LEADERBOARD PAGE ── */
  .lb-wrap  { padding: 1rem .85rem 3rem; }
  .lb-td-bar { display: none; }
  .lb-th:nth-child(3) { display: none; }
  .lb-td-sessions { display: none; }
  .lb-th:nth-child(5) { display: none; }

  /* ── PARENT DASHBOARD ── */
  .pd2-wrap    { padding: 1rem .85rem 3rem; }
  .pd2-header  { flex-direction: column; }
  .pd2-add-btn { width: 100%; min-height: 48px; }
  .pd2-table   { font-size: 12px; }
  .pd2-th, .pd2-td { padding: .5rem .6rem; }
  .pd2-td-actions  { white-space: normal; }

  /* ── TEACHER DASHBOARD ── */
  .td-wrap    { padding: 1rem .85rem 3rem; }
  .td-form-grid { grid-template-columns: 1fr; }
  .td-save-btn  { width: 100%; min-height: 48px; }
  .td-students-header { flex-direction: column; align-items: stretch; }
  .td-add-btn { width: 100%; min-height: 48px; }

  /* ── ADMIN DASHBOARD ── */
  .ad-wrap  { padding: 1rem .85rem 3rem; }
  .ad-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .ad-charts { grid-template-columns: 1fr; }
  .ad-req-card { flex-direction: column; }
  .ad-req-actions { width: 100%; }
  .ad-req-approve, .ad-req-reject { flex: 1; min-height: 44px; }

  /* ── TEACHERS MARKETPLACE ── */
  .tp-wrap    { padding: 1rem .85rem 3rem; }
  .tp-list    { grid-template-columns: 1fr; }
  .tp-toolbar { flex-direction: column; }
  .tp-search  { width: 100%; }
  .tp-join-btn { min-height: 48px; }

  /* ── CHALLENGE MODES ── */
  .chm-grid { grid-template-columns: repeat(2, 1fr); }
  .chs-actions { flex-direction: column; }
  .chs-btn  { min-height: 48px; }
  .chl-input { width: 100px; }

  /* ── MENTAL MATHS ── */
  .mm-grid { grid-template-columns: repeat(2, 1fr); }
  .mm-flash-num { font-size: 4rem; }

  /* ── ONBOARDING ── */
  .ob-grid { flex-direction: column; }
  .ob-role-btn { min-height: 72px; }

  /* ── LANDING PAGE ── */
  .lp-hero-btns { flex-direction: column; align-items: stretch; }
  .lp-btn-primary, .lp-btn-secondary {
    width: 100%; min-height: 52px; font-size: 16px;
  }
  .lp-who-grid  { grid-template-columns: 1fr; }
  .lp-steps     { flex-direction: column; align-items: center; }
  .lp-step-arrow { display: none; }
  .lp-cta-btn   { width: 100%; min-height: 52px; }

  /* ── MODALS — full screen on small phones ── */
  .modal-overlay { padding: .5rem; align-items: flex-end; }
  .modal-card    { border-radius: 16px 16px 0 0; max-height: 90vh; overflow-y: auto; }
  .pd2-modal, .td-modal, .tp-modal { max-width: 100%; border-radius: 16px 16px 0 0; }
  .pd2-overlay, .td-overlay, .tp-overlay { align-items: flex-end; }
  .ch-modal  { border-radius: 16px 16px 0 0; }
  .ch-overlay { align-items: flex-end; }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE — max 480px (small phones)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

  :root { --hdr-h: 56px; }

  /* Header tighter */
  .nh-inner { padding: 0 .85rem; gap: .75rem; }
  .nh-logo-site { display: none; }
  .nh-logo-name { font-size: 14px; }

  /* Practice */
  .number-table td { font-size: 16px; }
  .answer-input     { font-size: 17px; }

  /* Quick start 1 col on very small phones */
  .sa-quickstart-grid { grid-template-columns: 1fr; }

  /* Challenge 1 col */
  .chm-grid { grid-template-columns: 1fr; }
  .mm-grid  { grid-template-columns: 1fr; }

  /* Landing */
  .lp-headline { font-size: 1.85rem; }
  .lp-hero-chips { gap: 8px; }
  .lp-hero-chips span { font-size: 11px; }

  /* Stats bar compact */
  .sa-stats-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
  .sa-stats-see-all { grid-column: 1/-1; text-align: center; }

  /* Summary stats */
  .sum-stats { gap: .4rem; }
  .sum-stat-val { font-size: 1.2rem; }

  /* Tables scroll */
  .ad-table-wrap, .pd2-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Pricing */
  .pr-price-amt { font-size: 1.75rem; }
  .pr-compare-table { font-size: 11px; }
  .pr-ct-th, .pr-ct-label, .pr-ct-val { padding: .5rem .5rem; }

  /* Worksheet preview */
  .ws-grid { grid-template-columns: repeat(2, 1fr); }
  .ws-num  { font-size: 15px; }
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR SETTINGS PANEL
   ════════════════════════════════════════════════════════════ */
/* ── Settings pill button (top of sidebar) ── */
.sa-settings-pill {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 20px); margin: 10px 10px 4px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(233,69,96,.06), rgba(99,102,241,.06));
  border: 1.5px solid rgba(233,69,96,.2);
  border-radius: 12px; cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: left;
}
.sa-settings-pill:hover {
  border-color: rgba(233,69,96,.45);
  background: linear-gradient(135deg, rgba(233,69,96,.1), rgba(99,102,241,.08));
}
.sa-settings-pill-icon-wrap {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(233,69,96,.1); display: flex;
  align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.sa-settings-pill-body { flex: 1; min-width: 0; }
.sa-settings-pill-label {
  display: block; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--text3); margin-bottom: 2px;
}
.sa-settings-pill-summary {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--accent); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sa-settings-pill-arrow {
  font-size: 11px; color: var(--text3); flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   PRACTICE PANEL — full width
   ════════════════════════════════════════════════════════════ */
.pp-full { padding: 2rem 2.5rem; }
.pp-welcome { text-align: center; padding: 2rem 1rem 1.5rem; }
.pp-welcome-icon { font-size: 3.5rem; margin-bottom: .5rem; }
.pp-welcome-title { font-size: 1.4rem; font-weight: 900; color: var(--primary); margin-bottom: .35rem; }
.pp-welcome-sub { font-size: 14px; color: var(--text3); }
.pp-actions { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.pp-actions .generate-btn {
  padding: 13px 40px; background: var(--accent); color: #fff;
  border: none; border-radius: 12px; font-size: 15px; font-weight: 800;
  cursor: pointer; box-shadow: 0 4px 16px rgba(233,69,96,.3);
  transition: transform .15s, box-shadow .15s;
}
.pp-actions .generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233,69,96,.4);
}

/* ════════════════════════════════════════════════════════════
   GLOBAL POLISH — warm shadows, gradient CTAs, refined radius
   ════════════════════════════════════════════════════════════ */

/* Warmer shadows on cards */
.sa-nav-item.active {
  background: linear-gradient(135deg, rgba(245,96,61,.09), rgba(99,102,241,.07)) !important;
}

/* Gradient primary buttons */
.generate-btn, .sum-btn-primary, .lp-btn-primary {
  background: linear-gradient(135deg, var(--accent), #f5803d) !important;
  box-shadow: 0 4px 18px rgba(245,96,61,.28) !important;
}
.generate-btn:hover { box-shadow: 0 6px 24px rgba(245,96,61,.38) !important; }

/* Progress bars with gradient */
.sb-progress-bar, .lp-sb-progress-bar, .progress-bar-fill {
  background: linear-gradient(90deg, var(--accent2), var(--green)) !important;
}

/* Coin badge warm */
.sa-badge-coins { background: rgba(245,158,11,.1) !important; color: #92400e !important; border-color: rgba(245,158,11,.25) !important; }

/* Warmer card hover */
.question-card:hover, .chm-tile:hover, .mm-tile:hover {
  box-shadow: 0 6px 28px rgba(30,27,58,.1) !important;
}

/* Subtle warm page background pattern */
body {
  background-color: #faf9f7;
}

/* Settings pill gradient border */
.sa-settings-pill {
  background: linear-gradient(135deg, rgba(245,96,61,.05), rgba(99,102,241,.05)) !important;
}
