  *,
*::before,
*::after {
  box-sizing: border-box;
}

  :root {
    --bg-page: #f3f4f6;
    --bg-card: #ffffff;
    --bg-sidebar: #111827;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent: #2563eb;
    --accent-soft: #e0ecff;
    --accent-success: #16a34a;
    --border-subtle: #e5e7eb;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
    --radius-lg: 18px;
  }

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;

  overflow-x: hidden; /* 👈 important */
}


  body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
  }

  /* Layout */

  .app-shell {
    min-height: 100vh;
    max-width: 100vw;

    display: flex;
    background: var(--bg-page);
  }

  .app-shell > * {
    min-width: 0;          /* 👈 super important for flex children on iOS */
  }

  .sidebar {
    width: 220px;
    max-width: 100%;

    background: var(--bg-sidebar);
    color: #f9fafb;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 24px;
  }
    .sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

  .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
  }

  .sidebar-logo-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  .sidebar-logo-text {
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 13px;
  }
/* Sidebar nav buttons – rounded, clean, readable */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* apply to links OR buttons inside sidebar-nav */
.sidebar .sidebar-nav button,
.sidebar .sidebar-nav a {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;      /* 👈 keeps padding + border inside sidebar width */
  text-align: left;
  border-radius: 999px;
  border: 1px solid #1f2937;
  padding: 8px 10px;           /* slightly less padding to be safe */
  font-size: 13px;
  background: #111827;
  color: #f9fafb;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition:
    background 0.12s,
    color 0.12s,
    box-shadow 0.12s,
    transform 0.08s;
}


.sidebar .sidebar-nav button:hover,
.sidebar .sidebar-nav a:hover {
  background: #1f2937;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.4);
}

/* active tab – if you add a class like 'sidebar-nav-active' */
.sidebar .sidebar-nav .sidebar-nav-active {
  background: #f9fafb;
  color: #111827;
  border-color: #f9fafb;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.45);
}



  .main-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }

  .main-header-title {
    font-size: 22px;
    font-weight: 600;
  }

  .main-header-subtitle {
    font-size: 13px;
    color: var(--text-muted);
  }

  /* Game card */

 .game-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  padding: 40px 28px 50px; /* 10px more top, +12px more bottom */

  border: 1px solid #e5e7eb;

  /* make it larger & more central */
  max-width: 900px;
  width: 100%;
  margin-top: 8px;
}


  .game-label {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
  }

  .game-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
  }

  .game-title {
    font-size: 20px;
    font-weight: 600;
  }

  .chef-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
  }

  .chef-pill .avatar {
    font-size: 15px;
  }

  /* Lesson path */

  .game-path-wrapper {
    margin-top: 50px;
  }

  .game-path {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: nowrap;
  }

.path-step {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}

.path-step--active {
  border-color: var(--accent);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.path-step--done {
  border-color: var(--accent-success);
  background: #ecfdf3;
  color: #166534;
}

  .bubble-number {
    font-weight: 600;
  }

  .bubble-lock {
    font-size: 12px;
    color: var(--text-muted);
  }

  .game-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
  }

  /* Start button */

  .btn-start {
    position: absolute;
    top: -34px; /* adjust to sit comfortably above the circles */
    z-index: 1;
    border-radius: 999px;
    border: none;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background 0.12s, transform 0.08s, box-shadow 0.08s;
  }

  .btn-start:hover {
    background: #1d4ed8;
  }

  .btn-start:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.4);
  }

  /* Lesson full-screen frame */

  .lesson-frame {
    position: fixed;
    inset: 0;
    background: #f9fafb;
    padding: 20px 20px 24px;
    z-index: 2000;
    display: none;
    overflow-y: auto;
  }

  .lesson-frame-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: #e5e7eb;
    color: #111827;
    border: none;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    transition: background 0.12s;
  }

  .lesson-frame-close:hover {
    background: #d1d5db;
  }

  .lesson-frame-header {
    max-width: 960px;
    margin: 0 auto 16px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  .lesson-frame-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .lesson-frame-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
  }

  .lesson-frame-lesson-type {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .lesson-frame-lesson-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
  }

  .lesson-frame-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .lesson-frame-progress-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .lesson-frame-progress-label {
    font-size: 12px;
    color: var(--text-muted);
  }

  .lesson-frame-progress-bar {
    width: 180px;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
  }

  .lesson-frame-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 0.18s ease-out;
  }

  .lesson-frame-timer {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
  }

  .lesson-frame-body {
    max-width: 960px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 18px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
  }

  .lesson-frame-question-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
  }

  .lesson-frame-question-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
  }

  .lesson-frame-passage {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  line-height: 1.5;
  color: #111827;
  white-space: pre-wrap; /* keep line breaks from the passage */
}
  .lesson-frame-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .lesson-frame-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    color: var(--text-main);
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
  }

  .lesson-frame-option:hover {
    background: #eef2ff;
    border-color: var(--accent);
  }

  .lesson-frame-option--selected {
    border-color: var(--accent);
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  }

  .lesson-frame-option-letter {
    font-weight: 600;
    min-width: 18px;
  }

  .lesson-frame-option-text {
    flex: 1;
  }

  .lesson-frame-feedback {
    min-height: 18px;
    font-size: 13px;
    margin-bottom: 14px;
    color: var(--text-main);
  }

  .lesson-frame-actions {
    display: flex;
    gap: 10px;
  }

  .lesson-frame-rationale {
  margin-top: 12px;   /* ⬅️ this adds space ABOVE the box */
  margin-bottom: 12px; /* ⬅️ this adds space BELOW the box */

  padding: 10px 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  line-height: 1.5;
  color: #111827;
  white-space: pre-wrap; /* preserve line breaks if you have them */
}

.lesson-overlay-submit {
  background: #3b82f6;          /* blue */
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* Hover style */
.lesson-overlay-submit:hover:not(:disabled) {
  background: #2563eb; /* darker blue */
}

/* Disabled state */
.lesson-overlay-submit:disabled {
  background: #93c5fd; /* lighter blue */
  cursor: not-allowed;
  opacity: 0.6;
}

  .lesson-frame-next {
    background: #e5e7eb;
    color: #111827;
  }

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 80px; /* this moves the lesson card away from sidebar */
  gap: 18px;
      max-width: 100%;

}

/* Hide mobile toggle on desktop */
.mobile-menu-toggle {
  display: none;
}

/* Mobile styling */
@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
  }

  .sidebar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 12px 12px 8px;   /* symmetric padding left/right */
    box-sizing: border-box;
  }

  .sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
  }

  .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
  }

  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    color: #f9fafb;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
  }

  /* 👇 MENU: full-width, no overflow */
  .sidebar-nav {
    display: none !important;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    background: #111827;
    padding: 10px 8px;         /* reduced lateral padding */
    border-radius: 10px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;        /* hard stop */
  }

  .sidebar-nav.show {
    display: flex !important;
  }

  /* 👇 ensure buttons/links can't be wider than the menu */
  .sidebar-nav-button,
  .sidebar-nav a,
  .sidebar-nav button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 10px;
    padding-right: 10px;
  }

  .main-area {
    width: 100%;
    max-width: 100%;

    padding: 12px 12px 24px;
    box-sizing: border-box;
  }

  .game-card {
    max-width: 100%;
    width: 100%;
    margin: 16px 0 0 0;
    box-sizing: border-box;
    padding: 24px 16px 28px;
  }

  .game-path {
    flex-wrap: wrap;
    gap: 18px;
  }

  .path-step {
    width: 44px;
    height: 44px;
  }

  .lesson-frame-header,
  .lesson-frame-body {
    max-width: 100%;
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
}

 .auth-bar {
    width: 100%;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    padding: 6px 12px;
    box-sizing: border-box;
  }

  .auth-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    font-size: 13px;
    align-items: center;
  }

  .auth-user {
    color: #4b5563;
  }

  .auth-logout {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
  }

  .auth-logout:hover {
    text-decoration: underline;
  }

.sidebar-nav-button-logout {
  background: #dc2626;!important      /* red-600 */
  border-color: #dc2626;
  color: #fff;
  font-weight: 600;
}

.sidebar-nav-button-logout:hover {
  background: #b91c1c;      /* red-700 */
  border-color: #b91c1c;
  .sidebar .sidebar-nav a.sidebar-nav-button-logout {
}

  background: #dc2626 !important;   /* red */
  border-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 600;
}

.sidebar .sidebar-nav a.sidebar-nav-button-logout:hover {
  background: #b91c1c !important;   /* darker red on hover */
  border-color: #b91c1c !important;
}


/*


 */

/* Billing and practice paywall */
.billing-alert {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 700;
}

.practice-free-meter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 1rem 0 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.practice-paywall,
.billing-card {
  margin-top: 1.5rem;
  padding: 1.4rem;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}

.practice-paywall-badge,
.billing-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.82rem;
  font-weight: 800;
}

.practice-paywall h2,
.billing-card h1 {
  margin: 0.85rem 0 0.45rem;
  color: #172033;
  font-size: 1.65rem;
  line-height: 1.15;
}

.practice-paywall p,
.billing-card p {
  max-width: 58ch;
  color: #64748b;
  line-height: 1.55;
}

.practice-paywall-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 1rem 0;
  color: #172033;
}

.practice-paywall-price span {
  font-size: 2.4rem;
  font-weight: 900;
}

.practice-paywall-price small {
  color: #64748b;
  font-weight: 700;
}

.practice-paywall-button,
.billing-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.practice-paywall-button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.practice-paywall-note {
  margin-top: 0.8rem;
  color: #64748b;
  font-size: 0.92rem;
}

.billing-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f8fafc;
}

.billing-card {
  width: min(560px, 100%);
  margin: 0;
}

.profile-notice {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 700;
}

.profile-plan-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.4rem;
  padding: 1.25rem;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  background: #f8fafc;
}

.profile-plan-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-plan-name {
  margin-top: 0.35rem;
  color: #172033;
  font-size: 1.55rem;
  font-weight: 900;
}

.profile-plan-copy {
  max-width: 58ch;
  margin: 0.55rem 0 0;
  color: #64748b;
  line-height: 1.55;
}

.profile-plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  color: #172033;
  white-space: nowrap;
}

.profile-plan-price span {
  font-size: 2.1rem;
  font-weight: 900;
}

.profile-plan-price small {
  color: #64748b;
  font-weight: 800;
}

.profile-actions {
  margin-top: 1.1rem;
}

.profile-action-note {
  margin: 0.8rem 0 0;
  color: #64748b;
  line-height: 1.5;
}

.profile-signout-link {
  display: inline-flex;
  margin-top: 1.25rem;
  color: #64748b;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 520px) {
  .practice-paywall,
  .billing-card {
    padding: 1.1rem;
  }

  .practice-paywall h2,
  .billing-card h1 {
    font-size: 1.35rem;
  }

  .practice-paywall-price span {
    font-size: 2rem;
  }

  .practice-paywall-button,
  .billing-primary-link {
    width: 100%;
  }

  .profile-plan-card {
    display: block;
  }

  .profile-plan-price {
    margin-top: 1rem;
  }
}

/* === Auth pages === */

/* === Auth pages (clean, light) === */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: #f3f4f6;
}

.auth-card {
  max-width: 420px;
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  padding: 22px 22px 24px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  border: 1px solid #e5e7eb;
  box-sizing: border-box;
}

.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.auth-logo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.auth-logo-text {
  display: flex;
  flex-direction: column;
}

.auth-logo-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #111827;
}

.auth-logo-subtitle {
  font-size: 12px;
  color: #6b7280;
}

.auth-heading {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 6px 0 2px 0;
}

.auth-subheading {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 14px;
}

.auth-form {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.auth-label {
  font-size: 12px;
  color: #4b5563;
}

.auth-input {
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  padding: 8px 10px;
  color: #111827;
  font-size: 14px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}

.auth-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  background: #ffffff;
}

.auth-hint {
  font-size: 11px;
  color: #6b7280;
}

.auth-remember-row {
  margin-top: -2px;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
}

.auth-actions {
  margin-top: 6px;
}

.auth-button-primary {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
  transition: background 0.12s, transform 0.08s, box-shadow 0.08s;
}

.auth-button-primary:hover {
  background: #1d4ed8;
}

.auth-button-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.4);
}

.auth-footer-text {
  margin-top: 16px;
  font-size: 12px;
  color: #4b5563;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.auth-link-inline {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.auth-link-inline:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .auth-card {
    padding: 18px 16px 20px;
  }
}

/* Base */
.lp-page {
  min-height: 100vh;
  background: radial-gradient(circle at top, #e0ecff 0, #f9fafb 50%, #f3f4f6 100%);
  color: #0f172a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
}

/* Header */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(249, 250, 251, 0.9);
  border-bottom: 1px solid rgba(209, 213, 219, 0.5);
}

.lp-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lp-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 18px;
}

.lp-logo-icon {
  font-size: 20px;
}

.lp-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lp-nav-link {
  font-size: 14px;
  color: #4b5563;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 999px;
}

.lp-nav-link:hover {
  color: #111827;
  background: #e5e7eb;
}

.lp-nav-link--ghost {
  border: 1px solid #e5e7eb;
}

.lp-nav-cta {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #111827;
  color: #f9fafb;
  text-decoration: none;
  font-weight: 600;
}

.lp-nav-cta:hover {
  background: #020617;
}

.lp-nav-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 22px;
}

/* Main layout */
.lp-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

/* Hero */
.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
}

.lp-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 500;
  font-size: 12px;
  margin-bottom: 12px;
}

.lp-hero-left h1 {
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 12px;
}

.lp-hero-subtitle {
  font-size: 16px;
  color: #4b5563;
  max-width: 34rem;
  margin-bottom: 20px;
}

.lp-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.lp-hero-meta {
  font-size: 13px;
  color: #6b7280;
}

/* Hero right card */
.lp-hero-right {
  display: flex;
  justify-content: center;
}

.lp-hero-card {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 24px;
  padding: 18px 18px 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  border: 1px solid #e5e7eb;
}

.lp-hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.lp-hero-card-title {
  font-size: 14px;
  font-weight: 600;
}

.lp-hero-card-pill {
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef2ff;
  color: #4f46e5;
}

.lp-hero-progress {
  margin-bottom: 12px;
}

.lp-hero-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 4px;
}

.lp-hero-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.lp-hero-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.lp-hero-checklist {
  list-style: none;
  padding: 0;
  margin: 10px 0 12px;
  font-size: 13px;
  color: #374151;
}

.lp-hero-checklist li + li {
  margin-top: 4px;
}

.lp-btn {
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.lp-btn-primary {
  background: #111827;
  color: #f9fafb;
}

.lp-btn-primary:hover {
  background: #020617;
}

.lp-btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.lp-btn-secondary:hover {
  background: #d1d5db;
}

.lp-btn-block {
  width: 100%;
}

.lp-btn-hero {
  margin-top: 6px;
}

.lp-hero-footnote {
  font-size: 11px;
  color: #6b7280;
  margin-top: 8px;
}

/* Trust */
/* Trust strip under hero */
.lp-trust {
  max-width: 960px;
  margin: 32px auto 40px;
  padding: 14px 18px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  border: 1px solid #e5e7eb;
}

.lp-trust-label {
  font-size: 13px;
  color: #4b5563;
  font-weight: 500;
}

.lp-trust-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.lp-trust-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4ff;
  font-size: 12px;
  color: #4b5563;
}

/* On small screens, stack the trust strip nicely */
@media (max-width: 900px) {
  .lp-trust {
    border-radius: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .lp-trust-logos {
    justify-content: flex-start;
  }
}
/* Sections */
.lp-section {
  margin-bottom: 40px;
}

.lp-section-alt {
  background: #f9fafb;
  border-radius: 24px;
  padding: 24px 20px;
}

.lp-section-header {
  text-align: center;
  margin-bottom: 20px;
}

.lp-section-header h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.lp-section-header p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.lp-grid {
  display: grid;
  gap: 16px;
}

.lp-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lp-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lp-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 16px 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.lp-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.lp-card p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}

.lp-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: #4b5563;
}

.lp-link {
  font-size: 14px;
  color: #4f46e5;
  text-decoration: none;
  margin-top: 8px;
  display: inline-block;
}

.lp-link:hover {
  text-decoration: underline;
}

/* Steps */
.lp-grid-steps .lp-step {
  position: relative;
}

.lp-step-number {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* CTA section */
.lp-section-cta {
  text-align: center;
  padding-top: 8px;
}

.lp-cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lp-btn-lg {
  padding: 11px 22px;
  font-size: 15px;
}

/* Footer */
.lp-footer {
  border-top: 1px solid #e5e7eb;
  padding: 20px 16px 24px;
  background: #f9fafb;
}

.lp-footer-inner {
  max-width: 1120px;
  margin: 0 auto 8px;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.lp-footer-text {
  font-size: 13px;
  color: #6b7280;
  max-width: 320px;
}

.lp-footer-columns {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.lp-footer-col h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.lp-footer-col a {
  display: block;
  font-size: 13px;
  color: #4b5563;
  text-decoration: none;
  margin-bottom: 2px;
}

.lp-footer-col a:hover {
  text-decoration: underline;
}

.lp-footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7280;
}

.lp-footer-fine {
  max-width: 420px;
}

/* Buttons / utils */
.lp-btn-lg {
  border-radius: 999px;
}

/* Responsive */
@media (max-width: 900px) {
  .lp-header-inner {
    padding-inline: 12px;
  }

  .lp-nav {
    position: absolute;
    top: 56px;
    right: 12px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
    min-width: 180px;
    display: none;
  }

  .lp-nav.lp-nav--open {
    display: flex;
  }

  .lp-nav-toggle {
    display: block;
  }

  .lp-main {
    padding-inline: 12px;
  }

  .lp-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-hero-left h1 {
    font-size: 30px;
  }

  .lp-grid-3,
  .lp-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-footer-inner {
    flex-direction: column;
  }
}

/* 🔹 FULL-WIDTH COLOR BANDS FOR EACH SECTION */

/* Turn sections into strong bubbles */
.lp-section {
  position: relative;
  z-index: 0;
  margin: 48px auto;
  padding: 28px 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

/* Strong bubbles for each section */
.lp-section {
  position: relative;
  z-index: 0;
  margin: 60px auto;
  padding: 32px 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
  border: 1px solid #e5e7eb;
}

/* Full-width band behind each section */
.lp-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: -32px;
  bottom: -32px;
  background: #f3f4f6; /* default light gray band */
}

/* Distinct, on-brand colors per section */
.lp-section#why::before {
  background: #eef2ff;  /* soft lavender */
}

.lp-section#how-it-works::before {
  background: #fff7ed;  /* warm peach */
}

.lp-section#educators::before {
  background: #ecfeff;  /* icy teal */
}

/* CTA section: dark band */
.lp-section.lp-section-cta {
  background: #111827;
  color: #f9fafb;
  border: none;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.7);
}

.lp-section.lp-section-cta::before {
  background: #020617;
}

.lp-section.lp-section-cta .lp-section-header p {
  color: #e5e7eb;
}

.lp-section.lp-section-cta .lp-btn-primary {
  background: #f97316;
  color: #111827;
}

.lp-section.lp-section-cta .lp-btn-primary:hover {
  background: #ea580c;
}

.lp-section.lp-section-cta .lp-btn-secondary {
  background: #f9fafb;
  color: #111827;
}

/* Mobile tweak so bubbles still feel separate */
@media (max-width: 900px) {
  .lp-section {
    margin: 40px auto;
    padding: 24px 16px;
    border-radius: 22px;
  }
}

/* Shared application pages */
.lesson-content,
.lesson-content *,
.game-card,
.game-layout,
.study-area-panel,
.study-section,
.study-chapter {
  min-width: 0;
  max-width: 100%;
}

.lesson-content img,
.lesson-content svg,
.topic-graph svg {
  max-width: 100%;
  height: auto;
}

.lesson-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lesson-content pre,
.lesson-content code {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .app-shell .sidebar {
    width: 100%;
    padding: 10px 12px;
  }

  .app-shell .sidebar-logo {
    width: 32px;
    height: 32px;
    margin: 0 0 9px;
  }

  .app-shell .sidebar-nav {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    flex-direction: row;
    gap: 6px;
    margin: 0;
    padding: 0 0 3px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .app-shell .sidebar-nav .sidebar-nav-button,
  .app-shell .sidebar-nav a,
  .app-shell .sidebar-nav button {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    padding: 8px 13px;
    text-align: center;
    white-space: nowrap;
  }

  .app-shell .main-area {
    padding: 14px 12px 36px;
  }

  .app-shell .top-tabs {
    display: none;
  }

  .app-shell .game-layout {
    width: 100%;
  }

  .app-shell .game-card {
    width: 100%;
    margin: 0;
    padding: 22px 15px 28px;
    border-radius: 8px;
  }

  .app-shell .game-title-row {
    align-items: flex-start;
  }

  .app-shell .chef-pill {
    max-width: 44%;
    text-align: right;
  }

  .study-area-tabs {
    display: flex !important;
    width: 100%;
  }

  .study-area-tab {
    flex: 1 1 0;
    min-width: 0;
  }

  .study-section-toggle,
  .study-chapter-toggle {
    min-height: 48px;
    text-align: left;
  }

  .study-section-toggle > span:first-child,
  .study-chapter-toggle > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #practice-question {
    padding: 1rem !important;
  }

  .practice-option,
  .topic-practice-option,
  .topic-two-part-pair-option {
    min-height: 48px;
    padding: 0.8rem !important;
  }

  #topic-practice-modal {
    padding: 0 !important;
    background: white !important;
  }

  #topic-practice-container {
    min-height: 100%;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 16px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

@media (max-width: 420px) {
  .app-shell .game-title-row {
    display: block;
  }

  .app-shell .chef-pill {
    display: none;
  }

  .study-chapter-toggle > span:last-child {
    gap: 0.4rem !important;
  }
}

/* Membership and tutoring */
.membership-wrap, .tutoring-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 0 48px; }
.membership-title, .tutoring-header h1 { margin: 5px 0; font-size: 30px; }
.membership-subtitle, .tutoring-muted { color: #64748b; }
.membership-current { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 22px 0 16px; padding: 20px; border: 1px solid #dce3ee; border-radius: 8px; background: #172033; color: white; }
.membership-current strong { display: block; margin-top: 5px; font-size: 22px; }
.membership-current p { margin: 5px 0 0; color: #cbd5e1; }
.membership-eyebrow { display: block; color: #64748b; font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.membership-current .membership-eyebrow { color: #a5b4fc; }
.membership-section { margin-top: 18px; }
.membership-section-head { margin-bottom: 10px; }
.membership-section-head h2 { margin: 4px 0; font-size: 21px; }
.membership-section-head p { margin: 0; color: #64748b; }
.membership-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.membership-grid-single { grid-template-columns: minmax(0, 1fr); }
.membership-plan { display: flex; min-width: 0; flex-direction: column; padding: 20px; border: 1px solid #dce3ee; border-radius: 8px; background: white; }
.membership-plan-featured { border-color: #bfdbfe; background: #eff6ff; }
.membership-plan h2 { margin: 10px 0 4px; font-size: 23px; }
.membership-plan h2 small { font-size: 13px; color: #64748b; }
.membership-plan p { flex: 1; color: #64748b; line-height: 1.5; }
.membership-price { font-size: 25px; font-weight: 900; }
.promo-code-form { display: grid; gap: 8px; margin-top: 8px; }
.promo-code-form input[type="text"] { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; }
.membership-secondary-link, .tutoring-link { color: #2563eb; font-weight: 800; text-decoration: none; }
.membership-current .membership-secondary-link { color: white; white-space: nowrap; }
.tutoring-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.tutoring-balance { min-width: 150px; padding: 13px 16px; border-radius: 8px; background: #fef3c7; color: #78350f; text-align: right; }
.tutoring-balance strong { display: block; font-size: 28px; }
.tutoring-balance span, .tutoring-balance small { display: block; }
.tutoring-panel { margin-top: 16px; padding: 20px; border: 1px solid #dce3ee; border-radius: 8px; background: white; }
.tutoring-panel h2 { margin: 0 0 14px; font-size: 19px; }
.tutoring-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tutoring-form input, .tutoring-form select, .tutoring-form textarea, .tutoring-review-form input, .tutoring-review-form select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; }
.tutoring-form textarea { min-height: 90px; resize: vertical; }
.tutoring-request { padding: 15px 0; border-top: 1px solid #e2e8f0; }
.tutoring-request:first-of-type { border-top: 0; }
.tutoring-request-head, .proposal-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.tutoring-status { padding: 5px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 12px; font-weight: 800; }
.proposal-list { display: grid; gap: 8px; margin-top: 12px; }
.proposal-row { padding: 12px; border: 1px solid #dbeafe; border-radius: 8px; background: #eff6ff; }
.tutoring-small-button { min-height: 38px; padding: 8px 13px; border: 0; border-radius: 999px; background: #2563eb; color: white; font-weight: 800; cursor: pointer; }
.proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.tutoring-secondary-button { border: 1px solid #cbd5e1; background: white; color: #172033; }
.tutoring-review-form { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.tutoring-proposal-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
@media (max-width: 900px) {
  .membership-wrap, .tutoring-wrap { padding-top: 8px; }
  .membership-grid { grid-template-columns: 1fr 1fr; }
  .tutoring-proposal-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .membership-grid, .tutoring-form, .tutoring-review-form, .tutoring-proposal-form { grid-template-columns: 1fr; }
  .membership-current, .tutoring-header, .tutoring-request-head, .proposal-row { align-items: flex-start; flex-direction: column; }
  .tutoring-balance { width: 100%; text-align: left; }
}
