    :root {
      --teal: #3BBCB8;
      --teal-dark: #2A9490;
      --teal-pale: #EAF9F8;
      --teal-border: rgba(59,188,184,0.2);
      --coral: #FF6B44;
      --coral-dark: #E05530;
      --coral-pale: #FFF0EC;
      --cream: #FDFCF9;
      --cream-mid: #F5F0E8;
      --cream-dark: #EDE8DF;
      --text: #1A1A1A;
      --text-mid: #5A5550;
      --text-light: #9A9590;
      --gold: #F59E0B;
      --green: #22C55E;
      --green-pale: #ECFDF5;
      --border: rgba(0,0,0,0.07);
      --border-mid: rgba(0,0,0,0.12);
      --mono: 'DM Mono', monospace;
      --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
      --shadow: 0 4px 20px rgba(0,0,0,0.08);
      --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
      --radius: 16px;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
    html { scroll-behavior: smooth; }
    body { font-family: 'Fredoka', system-ui, sans-serif; background: var(--cream); color: var(--text); overflow-x: hidden; -webkit-font-smoothing: antialiased; }

    /* ── NAV ─────────────────────────────────── */
    nav { position: fixed; top: 0; left: 0; right: 0; z-index: 300; background: rgba(253,252,249,0.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 1.25rem; }
    .nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
    .nav-logo img { height: 32px; width: auto; }
    .nav-logo-text { font-size: 1rem; font-weight: 700; color: var(--text); }
    .nav-logo-text span { color: var(--teal); }
    .nav-right { display: flex; align-items: center; gap: 10px; }
    .nav-login-btn { background: var(--coral); color: white; border: none; padding: 8px 18px; border-radius: 20px; font-family: 'Fredoka', sans-serif; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; white-space: nowrap; }
    .nav-login-btn:hover { background: var(--coral-dark); }
    .nav-avatar { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--teal-border); object-fit: cover; }
    .nav-user-name { font-size: 0.85rem; font-weight: 600; color: var(--text-mid); }
    .nav-logout { font-size: 0.78rem; color: var(--text-light); background: none; border: 1px solid var(--border-mid); padding: 5px 10px; border-radius: 8px; text-decoration: none; }
    .nav-progress { font-size: 0.75rem; color: var(--text-light); white-space: nowrap; }
    .nav-progress span { color: var(--teal); font-weight: 700; }

    /* ── GUEST LANDING ────────────────────────── */

    /* Hero */
    .hero-wrap { position: relative; height: min(420px, 50vw); min-height: 260px; overflow: hidden; }
    @media(max-width:600px) { .hero-wrap { height: 58vw; min-height: 220px; } }
    .hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
    .hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(253,252,249,0) 30%, rgba(253,252,249,0.6) 70%, rgba(253,252,249,1) 100%); }

    /* Badge pill */
    .badge-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--teal-pale); color: var(--teal-dark); border: 1px solid var(--teal-border); font-size: 0.72rem; font-weight: 700; padding: 5px 14px; border-radius: 20px; letter-spacing: 0.05em; text-transform: uppercase; }

    /* Headline block */
    .guest-headline { text-align: center; padding: 0 1.25rem; }
    .guest-headline h1 { font-size: clamp(2rem, 7vw, 3rem); font-weight: 700; line-height: 1.1; color: var(--text); margin-bottom: 12px; }
    .guest-headline h1 em { font-style: normal; color: var(--teal); }
    .guest-headline h1 strong { color: var(--coral); font-style: normal; }
    .guest-tagline { font-family: 'Lora', serif; font-style: italic; font-size: clamp(0.95rem, 3vw, 1.1rem); color: var(--text-mid); line-height: 1.65; max-width: 480px; margin: 0 auto 28px; }

    /* Google Login CTA */
    .google-btn { display: inline-flex; align-items: center; gap: 10px; background: white; color: var(--text); font-family: 'Fredoka', sans-serif; font-size: 1rem; font-weight: 600; padding: 14px 28px; border-radius: 14px; border: 2px solid var(--border-mid); cursor: pointer; text-decoration: none; transition: all 0.2s; box-shadow: var(--shadow); }
    .google-btn:hover { border-color: var(--teal); box-shadow: 0 4px 20px rgba(59,188,184,0.18); transform: translateY(-1px); }
    .google-btn svg { flex-shrink: 0; }

    /* Price strip */
    .price-strip { display: inline-flex; align-items: baseline; gap: 8px; background: var(--coral-pale); border: 1.5px solid rgba(255,107,68,0.2); border-radius: 12px; padding: 10px 20px; margin: 20px 0 0; }
    .price-original { font-size: 0.9rem; color: var(--text-light); text-decoration: line-through; }
    .price-main { font-size: 1.8rem; font-weight: 700; color: var(--coral); }
    .price-label { font-size: 0.78rem; color: var(--text-mid); }

    /* Benefits row */
    .benefits-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 0 1.25rem; margin: 32px 0; }
    .benefit-chip { display: flex; align-items: center; gap: 7px; background: white; border: 1.5px solid var(--border-mid); border-radius: 12px; padding: 10px 14px; font-size: 0.85rem; font-weight: 600; color: var(--text-mid); box-shadow: var(--shadow-sm); }
    .benefit-chip .b-icon { font-size: 1.1rem; }

    /* Module preview — unit accordion */
    .section-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-light); margin-bottom: 10px; }
    .unit-card { background: white; border: 1.5px solid var(--border-mid); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color 0.2s; }
    .unit-card:hover { border-color: var(--teal-border); }
    .unit-header { display: flex; align-items: center; gap: 12px; padding: 16px; }
    .unit-icon { font-size: 1.3rem; flex-shrink: 0; }
    .unit-info { flex: 1; min-width: 0; }
    .unit-name { display: block; font-size: 0.95rem; font-weight: 700; color: var(--text); line-height: 1.3; }
    .unit-meta { display: block; font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }
    .unit-chevron { flex-shrink: 0; color: var(--text-light); transition: transform 0.25s ease; }
    .unit-card.unit-open .unit-chevron { transform: rotate(180deg); }
    .unit-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 16px; }
    .unit-card.unit-open .unit-body { max-height: 200px; padding: 0 16px 16px; }
    .unit-body p { font-family: 'Lora', serif; font-size: 0.88rem; color: var(--text-mid); line-height: 1.65; border-top: 1px solid var(--border); padding-top: 12px; }

    /* What you get */
    .wyg-card { background: white; border: 1.5px solid var(--border-mid); border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow-sm); }
    .wyg-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; color: var(--text-mid); line-height: 1.5; }
    .wyg-item:last-child { border-bottom: none; padding-bottom: 0; }
    .wyg-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }

    /* Unlock CTA card */
    .unlock-card { background: linear-gradient(135deg, #FFF5F2 0%, #FFF9F7 100%); border: 2px solid rgba(255,107,68,0.2); border-radius: var(--radius); padding: 28px 20px; text-align: center; }
    .unlock-btn { display: block; width: 100%; background: var(--coral); color: white; border: none; padding: 17px; border-radius: 14px; font-family: 'Fredoka', sans-serif; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 20px rgba(255,107,68,0.3); margin-bottom: 10px; }
    .unlock-btn:hover { background: var(--coral-dark); transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255,107,68,0.4); }
    .unlock-btn-secondary { display: inline-flex; align-items: center; gap: 8px; background: white; color: var(--text); font-family: 'Fredoka', sans-serif; font-size: 0.95rem; font-weight: 600; padding: 13px 24px; border-radius: 12px; border: 2px solid var(--border-mid); cursor: pointer; text-decoration: none; transition: all 0.2s; box-shadow: var(--shadow-sm); }
    .unlock-note { font-size: 0.78rem; color: var(--text-light); font-family: 'Lora', serif; font-style: italic; }

    /* ── COURSE DASHBOARD (STATE 3) ───────────── */
    #course-body { display: none; padding-top: 56px; }
    #course-body.visible { display: block; }

    .course-layout { display: grid; grid-template-columns: 272px 1fr; min-height: calc(100vh - 56px); }
    @media(max-width:900px) { .course-layout { grid-template-columns: 1fr; } }

    /* Sidebar */
    .sidebar { background: white; border-right: 1px solid var(--border); position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; padding: 12px 0; scrollbar-width: thin; scrollbar-color: var(--border-mid) transparent; }
    @media(max-width:900px) { .sidebar { display: none; } }
    .sidebar-section { padding: 0 8px; margin-bottom: 2px; }
    .sidebar-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-light); padding: 8px 8px 4px; }
    .sidebar-unit-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border-radius: 10px; border: none; background: none; cursor: pointer; text-align: left; font-family: 'Fredoka', sans-serif; transition: background 0.15s; }
    .sidebar-unit-btn:hover { background: var(--cream-mid); }
    .sidebar-unit-icon { font-size: 1rem; flex-shrink: 0; }
    .sidebar-unit-name { font-size: 0.78rem; font-weight: 600; color: var(--text); flex: 1; line-height: 1.3; }
    .sidebar-unit-chevron { font-size: 0.7rem; color: var(--text-light); transition: transform 0.2s ease; flex-shrink: 0; }
    .sidebar-section.unit-open .sidebar-unit-chevron { transform: rotate(180deg); }
    .sidebar-unit-modules { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
    .sidebar-section.unit-open .sidebar-unit-modules { max-height: 600px; }
    .mod-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 10px; border: none; background: none; cursor: pointer; text-align: left; transition: all 0.15s; font-family: 'Fredoka', sans-serif; }
    .mod-btn:hover { background: var(--teal-pale); }
    .mod-btn.active { background: var(--teal-pale); }
    .mod-btn-num { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; flex-shrink: 0; background: var(--cream-dark); color: var(--text-light); }
    .mod-btn.active .mod-btn-num { background: var(--teal); color: white; }
    .mod-btn.done .mod-btn-num { background: var(--green); color: white; }
    .mod-btn-text { font-size: 0.82rem; font-weight: 500; color: var(--text-mid); line-height: 1.3; }
    .mod-btn.active .mod-btn-text { color: var(--teal-dark); font-weight: 700; }

    /* Mobile nav — compact bar + overlay */
    .mobile-mod-nav { display: none; position: sticky; top: 56px; z-index: 100; background: white; border-bottom: 1px solid var(--border); padding: 10px 1rem; }
    @media(max-width:900px) { .mobile-mod-nav { display: block; } }
    .mmn-bar { display: flex; align-items: center; gap: 10px; }
    .mmn-current { flex: 1; min-width: 0; }
    .mmn-unit-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal-dark); }
    .mmn-mod-label { font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mmn-nav-btn { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border-mid); background: white; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1rem; color: var(--text-mid); flex-shrink: 0; transition: all 0.15s; }
    .mmn-nav-btn:hover { background: var(--teal-pale); border-color: var(--teal-border); }
    .mmn-nav-btn:disabled { opacity: 0.3; cursor: default; }
    .mmn-grid-btn { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--border-mid); background: white; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.9rem; color: var(--text-mid); flex-shrink: 0; transition: all 0.15s; }
    .mmn-grid-btn:hover { background: var(--teal-pale); }
    /* Full-screen overlay */
    .mmn-overlay { display: none; position: fixed; inset: 0; z-index: 400; background: var(--cream); overflow-y: auto; padding: 0; }
    .mmn-overlay.open { display: block; }
    .mmn-overlay-header { position: sticky; top: 0; background: white; border-bottom: 1px solid var(--border); padding: 14px 1rem; display: flex; align-items: center; justify-content: space-between; }
    .mmn-overlay-title { font-size: 1rem; font-weight: 700; }
    .mmn-close-btn { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border-mid); background: white; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem; color: var(--text-mid); }
    .mmn-overlay-body { padding: 12px 1rem 40px; }
    .mmn-unit { margin-bottom: 8px; background: white; border: 1.5px solid var(--border-mid); border-radius: var(--radius); overflow: hidden; }
    .mmn-unit-header { display: flex; align-items: center; gap: 10px; padding: 14px 14px; cursor: pointer; }
    .mmn-unit-icon { font-size: 1.15rem; }
    .mmn-unit-name { flex: 1; font-size: 0.92rem; font-weight: 600; color: var(--text); }
    .mmn-unit-progress { font-size: 0.7rem; color: var(--text-light); }
    .mmn-unit-chevron { font-size: 0.75rem; color: var(--text-light); transition: transform 0.2s; }
    .mmn-unit.open .mmn-unit-chevron { transform: rotate(180deg); }
    .mmn-unit-mods { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
    .mmn-unit.open .mmn-unit-mods { max-height: 500px; }
    .mmn-mod-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
    .mmn-mod-item:hover { background: var(--teal-pale); }
    .mmn-mod-item.active { background: var(--teal-pale); }
    .mmn-mod-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; flex-shrink: 0; background: var(--cream-dark); color: var(--text-light); }
    .mmn-mod-item.active .mmn-mod-num { background: var(--teal); color: white; }
    .mmn-mod-item.done .mmn-mod-num { background: var(--green); color: white; }
    .mmn-mod-title { font-size: 0.88rem; font-weight: 500; color: var(--text-mid); }

    /* ── HOME VIEW ─────────────────────────── */
    .home-view { padding: 20px 1rem 60px; max-width: 600px; margin: 0 auto; }
    .home-greeting { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 20px; }

    .home-framework { background: white; border: 1.5px solid var(--border-mid); border-radius: var(--radius); padding: 20px; margin-bottom: 28px; }
    .home-framework-label { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-dark); margin-bottom: 8px; }
    .home-framework-title { font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 14px; line-height: 1.5; }
    .home-fw-steps { display: flex; flex-direction: column; gap: 8px; }
    .home-fw-step { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--text-mid); line-height: 1.4; }
    .home-fw-num { width: 22px; height: 22px; border-radius: 50%; background: var(--teal-pale); color: var(--teal-dark); font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

    /* Journey timeline */
    .home-journey { position: relative; padding-left: 28px; }
    .home-journey::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 24px; width: 2px; background: var(--cream-dark); }

    .home-unit-card { position: relative; background: white; border: 1.5px solid var(--border-mid); border-radius: 14px; padding: 18px 16px 16px; margin-bottom: 14px; cursor: pointer; transition: all 0.2s; }
    .home-unit-card:hover { border-color: var(--teal); box-shadow: 0 4px 20px rgba(59,188,184,0.12); transform: translateX(2px); }
    .home-unit-card:active { transform: translateX(2px) scale(0.99); }

    /* Timeline dot */
    .home-unit-card::before { content: ''; position: absolute; left: -22px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--cream-dark); border: 2px solid white; box-shadow: 0 0 0 1.5px var(--cream-dark); transition: all 0.2s; z-index: 1; }
    .home-unit-card.unit-started::before { background: var(--teal); box-shadow: 0 0 0 1.5px var(--teal); }
    .home-unit-card.unit-done::before { background: var(--green); box-shadow: 0 0 0 1.5px var(--green); }

    .home-unit-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
    .home-unit-icon { font-size: 1.15rem; flex-shrink: 0; }
    .home-unit-info { flex: 1; min-width: 0; }
    .home-unit-name { font-size: 0.95rem; font-weight: 700; color: var(--text); }
    .home-unit-meta { font-size: 0.7rem; color: var(--text-light); margin-top: 1px; }
    .home-unit-arrow { flex-shrink: 0; color: var(--text-light); transition: all 0.2s; }
    .home-unit-card:hover .home-unit-arrow { color: var(--teal); transform: translateX(3px); }
    .home-unit-desc { font-size: 0.82rem; color: var(--text-mid); line-height: 1.5; margin-bottom: 8px; }
    .home-unit-progress-bar { height: 4px; background: var(--cream-dark); border-radius: 2px; overflow: hidden; }
    .home-unit-progress-fill { height: 100%; background: linear-gradient(90deg, var(--teal), #5ED8D4); border-radius: 2px; transition: width 0.4s ease; }
    .home-unit-progress-text { font-size: 0.68rem; color: var(--text-light); margin-top: 4px; }
    .home-unit-progress-text span { color: var(--teal-dark); font-weight: 700; }
    .home-unit-misspells { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
    .home-misspell { display: inline-flex; align-items: center; gap: 4px; background: var(--coral-pale); border: 1px solid rgba(255,107,68,0.12); border-radius: 6px; padding: 3px 8px; font-size: 0.7rem; }
    .home-misspell-wrong { font-family: var(--mono); color: var(--coral); text-decoration: line-through; }
    .home-misspell-arrow { color: var(--text-light); font-size: 0.6rem; }
    .home-misspell-right { font-family: var(--mono); color: var(--teal-dark); font-weight: 600; }

    /* Home back button in mobile nav */
    .mmn-home-btn { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border-mid); background: white; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.9rem; color: var(--text-mid); flex-shrink: 0; transition: all 0.15s; }
    .mmn-home-btn:hover { background: var(--teal-pale); }

    /* Progress strip */
    .progress-strip { background: white; border-bottom: 1px solid var(--border); padding: 10px 1.25rem; display: flex; align-items: center; gap: 12px; }
    .progress-bar-outer { flex: 1; height: 7px; background: var(--cream-dark); border-radius: 4px; overflow: hidden; }
    .progress-bar-inner { height: 100%; background: linear-gradient(90deg, var(--teal), #5ED8D4); border-radius: 4px; transition: width 0.5s ease; }
    .progress-text { font-size: 0.75rem; color: var(--text-light); white-space: nowrap; }
    .progress-text span { color: var(--teal-dark); font-weight: 700; }

    /* Main content */
    .main-content { padding: 32px 1.25rem 80px; max-width: 680px; }
    @media(max-width:900px) { .main-content { max-width: 100%; padding: 24px 1rem 80px; } }
    .module-screen { display: none; }
    .module-screen.active { display: block; }

    /* Module typography */
    .mod-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--teal-dark); margin-bottom: 10px; }
    .mod-eyebrow-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--teal); }
    .mod-title { font-size: clamp(1.5rem,4vw,2.1rem); font-weight: 700; color: var(--text); line-height: 1.15; margin-bottom: 10px; }
    .mod-title .accent { color: var(--teal); }
    .mod-title .accent-gold { color: var(--gold); }
    .mod-title .accent-teal { color: var(--teal); }
    .mod-desc { font-family: 'Lora', serif; font-style: italic; font-size: 0.93rem; color: var(--text-mid); line-height: 1.75; margin-bottom: 28px; max-width: 540px; }

    /* Rule box */
    .rule-box { background: linear-gradient(135deg, #EAF9F8 0%, #D4F4F3 100%); border: 1.5px solid var(--teal-border); border-radius: var(--radius); padding: 22px 24px; margin: 24px 0; }
    .rb-label { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--teal-dark); margin-bottom: 8px; opacity: 0.8; }
    .rb-rule { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.55; }
    .rb-rule .gold { color: var(--gold); }
    .rb-note { font-family: 'Lora', serif; font-style: italic; font-size: 0.85rem; color: var(--text-mid); margin-top: 8px; line-height: 1.6; }

    /* Insight boxes */
    .insight { background: var(--teal-pale); border: 1px solid var(--teal-border); border-radius: 12px; padding: 14px 18px; margin: 18px 0; }
    .insight ul { list-style: none; display: flex; flex-direction: column; gap: 6px; padding: 0; }
    .insight li { display: flex; gap: 8px; font-family: 'Lora', serif; font-size: 0.86rem; color: var(--text-mid); line-height: 1.6; }
    .insight li::before { content: '●'; font-size: 0.35rem; color: var(--teal); flex-shrink: 0; margin-top: 8px; }
    .insight li strong { color: var(--teal-dark); font-style: normal; }
    .insight-gold { background: #FFFBEB; border-color: rgba(245,158,11,0.25); }
    .insight-gold li::before { color: var(--gold); }
    .insight-gold li strong { color: #B45309; }
    .insight-green { background: var(--green-pale); border-color: rgba(34,197,94,0.25); }
    .insight-green li::before { color: var(--green); }
    .insight-green li strong { color: #15803D; }
    .insight-coral { background: var(--coral-pale); border-color: rgba(255,107,68,0.2); }
    .insight-coral li::before { color: var(--coral); }

    /* Examples grid */
    .examples-section { margin: 20px 0; }
    .examples-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 8px; }
    .examples-grid { display: flex; flex-wrap: wrap; gap: 7px; }
    .example-word { font-family: var(--mono); font-size: 0.88rem; font-weight: 500; padding: 5px 12px; border-radius: 8px; }
    .ew-follows { background: var(--green-pale); color: #15803D; border: 1px solid rgba(34,197,94,0.25); }
    .ew-breaks { background: var(--coral-pale); color: var(--coral-dark); border: 1px solid rgba(255,107,68,0.2); }
    .ew-neutral { background: var(--cream-mid); color: var(--text-mid); border: 1px solid var(--border); }
    .ew-highlight { background: var(--teal-pale); color: var(--teal-dark); border: 1px solid var(--teal-border); }

    /* Compare table */
    .compare-table { width: 100%; border-collapse: collapse; margin: 18px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-mid); font-size: 0.85rem; }
    .compare-table th { background: var(--teal-pale); color: var(--teal-dark); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; text-align: left; border-bottom: 1.5px solid var(--teal-border); }
    .compare-table td { padding: 9px 12px; font-family: var(--mono); font-size: 0.82rem; border-bottom: 1px solid var(--border); color: var(--text-mid); }
    .compare-table tr:last-child td { border-bottom: none; }
    .compare-table tr:nth-child(even) td { background: var(--cream); }
    .td-green { color: #15803D; font-weight: 700; }
    .td-red { color: var(--coral-dark); font-weight: 700; }
    .td-gold { color: #B45309; font-weight: 700; }

    /* Interactive tools */
    .tool-wrap { background: white; border: 1.5px solid var(--border-mid); border-radius: var(--radius); overflow: hidden; margin: 24px 0; box-shadow: var(--shadow-sm); }
    .tool-header { background: var(--teal-pale); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--teal-border); }
    .tool-header-title { font-size: 0.9rem; font-weight: 700; color: var(--teal-dark); }
    .tool-header-sub { font-family: 'Lora', serif; font-style: italic; font-size: 0.78rem; color: var(--teal); }
    .tool-body { padding: 20px; background: white; }
    .tool-btn { background: var(--cream-mid); border: 1.5px solid var(--border-mid); color: var(--text-mid); padding: 9px 18px; border-radius: 20px; font-family: 'Fredoka', sans-serif; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.18s; }
    .tool-btn:hover { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-pale); }

    /* Word mapper */
    .mapper-container { display: flex; justify-content: center; gap: 5px; margin: 14px 0; flex-wrap: wrap; perspective: 1000px; }
    .map-btn { font-family: 'Fredoka', sans-serif; font-size: clamp(1.1rem,4vw,1.5rem); width: clamp(36px,9vw,50px); height: clamp(42px,10vw,56px); border-radius: 10px; border: 2px solid var(--border-mid); background: var(--cream-mid); color: var(--text-mid); cursor: pointer; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); display: flex; align-items: center; justify-content: center; user-select: none; box-shadow: 0 3px 0 var(--cream-dark); }
    .map-btn:active { transform: translateY(3px); box-shadow: none; }
    .map-btn.revealed.green { background: var(--green); color: white; border-color: #16A34A; box-shadow: 0 3px 0 #15803D; transform: rotateY(360deg); }
    .map-btn.revealed.orange { background: var(--gold); color: white; border-color: #D97706; box-shadow: 0 3px 0 #B45309; transform: rotateY(360deg); }
    .map-btn.revealed.red { background: var(--coral); color: white; border-color: var(--coral-dark); box-shadow: 0 3px 0 #C44A28; transform: rotateY(360deg); }
    .mapper-group-label { text-align: center; font-size: 0.78rem; font-weight: 600; color: var(--text-mid); margin-top: 6px; min-height: 20px; transition: opacity 0.3s; }

    /* Slicer */
    .slicer-word { text-align: center; font-family: 'Fredoka', sans-serif; font-size: clamp(1.8rem,5vw,2.4rem); letter-spacing: 4px; margin: 18px 0; user-select: none; color: var(--text); }
    .slice-letter { display: inline-block; padding: 0 3px; cursor: pointer; transition: color 0.2s; }
    .slice-letter:hover { color: var(--teal); }
    .slice-letter.sliced { border-right: 3px dashed var(--teal); padding-right: 5px; margin-right: 2px; }
    .slicer-error { font-size: 0.85rem; font-weight: 600; text-align: center; min-height: 20px; opacity: 0; transition: opacity 0.2s; }

    /* Quiz */
    .prompt-box { background: var(--teal-pale); border: 1px solid var(--teal-border); border-radius: 12px; padding: 14px; margin-bottom: 18px; text-align: center; }
    .prompt-box .target-word { font-family: 'Fredoka', sans-serif; font-size: 1.5rem; color: var(--teal-dark); margin-bottom: 4px; letter-spacing: 1px; }
    .prompt-box .action-text { font-size: 0.83rem; color: var(--text-mid); font-weight: 500; }
    .checklist { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
    .check-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--cream); border-radius: 10px; border: 1px solid var(--border); cursor: pointer; font-weight: 500; transition: all 0.2s; font-size: 0.88rem; color: var(--text-mid); }
    .check-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--teal); pointer-events: none; }
    .check-row.success { background: var(--green-pale); border-color: var(--green); color: #15803D; }
    .check-row.error { background: var(--coral-pale); border-color: var(--coral); color: var(--coral-dark); animation: shake 0.3s ease; }
    .row-error-text { display: none; font-size: 0.78rem; color: var(--coral-dark); margin-top: -6px; margin-bottom: 6px; padding-left: 14px; font-weight: 500; }
    .check-row.error + .row-error-text { display: block; }
    .math-result { text-align: center; font-family: 'Fredoka', sans-serif; font-size: 1.35rem; color: var(--text); margin: 12px 0; padding: 14px; background: var(--cream-mid); border-radius: 12px; border: 1px solid var(--border); }
    .math-result .doubled { color: var(--teal-dark); font-weight: 700; }
    .math-result .no-double { color: var(--coral); font-weight: 700; }

    /* rc-opt */
    .rc-options { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
    .rc-opt { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; padding: 9px 20px; border-radius: 10px; border: 2px solid var(--border-mid); cursor: pointer; background: var(--cream); color: var(--text); transition: all 0.18s; }
    .rc-opt:hover { border-color: var(--teal); color: var(--teal-dark); }
    .rc-opt.correct { background: var(--green); color: white; border-color: var(--green); }
    .rc-opt.wrong { background: var(--coral); color: white; border-color: var(--coral); animation: shake 0.3s ease; }
    .rc-feedback { text-align: center; font-family: 'Lora', serif; font-size: 0.88rem; color: var(--text-mid); min-height: 22px; margin-top: 8px; }
    .rc-word { font-family: 'Fredoka', sans-serif; font-size: 2rem; font-weight: 700; color: var(--text); letter-spacing: 2px; text-align: center; margin: 14px 0; }
    .stp-words { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
    .stp-word { font-family: var(--mono); font-size: 0.95rem; font-weight: 600; padding: 7px 14px; border-radius: 10px; border: 2px solid var(--border-mid); cursor: pointer; background: var(--cream); color: var(--text); transition: all 0.18s; user-select: none; }
    .stp-word:hover { border-color: var(--teal); }
    .stp-word.correct { background: var(--green); border-color: var(--green); color: white; }
    .stp-word.wrong { background: var(--coral); border-color: var(--coral); color: white; animation: shake 0.3s ease; }
    .sorter-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
    .sorter-column { border: 2px dashed var(--border-mid); border-radius: 12px; padding: 12px; min-height: 70px; }
    .sorter-column.green-col { border-color: var(--green); background: var(--green-pale); }
    .sorter-column.red-col { border-color: var(--coral); background: var(--coral-pale); }
    .sorter-col-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 7px; }
    .green-col .sorter-col-label { color: #15803D; }
    .red-col .sorter-col-label { color: var(--coral-dark); }
    .sorter-bank { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
    .sort-chip { font-family: var(--mono); font-size: 0.85rem; font-weight: 600; padding: 5px 12px; border-radius: 8px; background: white; border: 1.5px solid var(--border-mid); cursor: pointer; transition: all 0.15s; color: var(--text); }
    .sort-chip:hover { border-color: var(--teal); color: var(--teal-dark); }
    .sort-chip.placed-green { background: var(--green); color: white; border-color: var(--green); }
    .sort-chip.placed-red { background: var(--coral); color: white; border-color: var(--coral); }

    /* Split display */
    .split-display { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 18px 0; flex-wrap: wrap; }
    .split-part { font-family: 'Fredoka', sans-serif; font-size: 1.5rem; font-weight: 700; padding: 7px 13px; border-radius: 10px; }
    .sp-root { background: var(--teal-pale); color: var(--teal-dark); border: 2px solid var(--teal-border); }
    .sp-suffix { background: #FFFBEB; color: #B45309; border: 2px solid rgba(245,158,11,0.25); }
    .sp-prefix { background: var(--teal-pale); color: var(--teal-dark); border: 2px solid var(--teal-border); }
    .sp-changed { background: var(--coral-pale); color: var(--coral-dark); border: 2px solid rgba(255,107,68,0.2); }
    .sp-plus { font-size: 1.1rem; color: var(--text-light); }
    .sp-equals { font-size: 1.3rem; color: var(--text-light); margin: 0 4px; }

    /* E jobs */
    .e-jobs { display: flex; flex-direction: column; gap: 9px; margin: 18px 0; }
    .e-job { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; display: flex; gap: 12px; align-items: flex-start; }
    .e-job-num { width: 26px; height: 26px; border-radius: 50%; background: #FFFBEB; color: #B45309; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .e-job-content { flex: 1; }
    .e-job-title { font-size: 0.86rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
    .e-job-examples { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
    .e-job-eg { font-family: var(--mono); font-size: 0.75rem; padding: 2px 7px; background: #FFFBEB; color: #B45309; border-radius: 5px; font-weight: 600; }

    /* R-vowel cards */
    .r-vowels { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 9px; margin: 18px 0; }
    .rv-card { background: white; border: 1.5px solid var(--border-mid); border-radius: 12px; padding: 12px; text-align: center; overflow: hidden; }
    .rv-pair { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; color: var(--teal-dark); margin-bottom: 3px; }
    .rv-sound { font-size: 0.7rem; color: var(--text-light); font-style: italic; margin-bottom: 5px; }
    .rv-words { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
    .rv-word { font-family: var(--mono); font-size: 0.75rem; color: var(--text-mid); }

    /* Suffix demo */
    .suffix-demo { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
    .sd-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; background: var(--cream); border-radius: 10px; padding: 9px 13px; }
    .sd-base { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; color: var(--text); }
    .sd-plus, .sd-arrow { color: var(--text-light); font-size: 0.9rem; }
    .sd-suffix { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; color: #B45309; }
    .sd-result { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; color: var(--teal-dark); }
    .sd-rule { font-family: 'Lora', serif; font-size: 0.75rem; color: var(--text-light); font-style: italic; margin-left: auto; }

    /* Homo pairs */
    .homo-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 9px; margin: 18px 0; }
    .homo-pair { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 13px; }
    .homo-words { display: flex; gap: 7px; margin-bottom: 7px; flex-wrap: wrap; }
    .homo-word { font-family: var(--mono); font-size: 0.9rem; font-weight: 700; background: var(--teal-pale); color: var(--teal-dark); padding: 3px 9px; border-radius: 6px; }
    .homo-slash { color: var(--text-light); align-self: center; }
    .homo-sent { font-family: 'Lora', serif; font-size: 0.79rem; color: var(--text-mid); line-height: 1.5; }
    .homo-sent .hw { color: var(--teal-dark); font-weight: 700; font-style: normal; }

    /* E-transformer */
    .e-transformer { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 18px 0; }
    .et-pair { text-align: center; }
    .et-word { font-family: 'Fredoka', sans-serif; font-size: 1.3rem; font-weight: 700; color: var(--text); }
    .et-word .vowel-change { color: var(--teal-dark); }
    .et-word .silent-e { color: var(--gold); }
    .et-arrow { font-size: 1.1rem; color: var(--text-light); }
    .et-label { font-size: 0.68rem; color: var(--text-light); margin-top: 2px; font-style: italic; }

    /* Next button */
    .mod-next-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--coral); color: white; border: none; padding: 13px 26px; border-radius: 25px; font-family: 'Fredoka', sans-serif; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.2s; margin-top: 28px; box-shadow: 0 4px 14px rgba(255,107,68,0.25); }
    .mod-next-btn:hover { background: var(--coral-dark); transform: translateY(-2px); }

    /* Worksheet btn */
    .ws-btn-wrap { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
    .ws-print-btn { display: inline-flex; align-items: center; gap: 7px; background: white; color: var(--teal-dark); border: 1.5px solid var(--teal-border); padding: 9px 18px; border-radius: 20px; font-family: 'Fredoka', sans-serif; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.18s; }
    .ws-print-btn:hover { background: var(--teal-pale); }

    /* Print vault */
    .print-vault { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; margin: 20px 0; }
    .pv-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; transition: all 0.18s; }
    .pv-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow); }
    .pv-icon { font-size: 1.7rem; margin-bottom: 7px; }
    .pv-name { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
    .pv-desc { font-size: 0.73rem; color: var(--text-light); font-style: italic; margin-bottom: 10px; line-height: 1.4; }
    .pv-btn { display: block; background: var(--teal-pale); color: var(--teal-dark); font-family: 'Fredoka', sans-serif; font-size: 0.78rem; font-weight: 700; padding: 6px 12px; border-radius: 14px; border: none; cursor: pointer; width: 100%; transition: all 0.18s; }
    .pv-btn:hover { background: var(--teal); color: white; }

    /* Stp instruction */
    .stp-instruction { font-family: 'Lora', serif; font-style: italic; font-size: 0.85rem; color: var(--text-light); margin-bottom: 7px; }
    .stp-score { font-size: 0.85rem; color: var(--text-mid); margin-top: 9px; font-style: italic; }

    /* Animations */
    @keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
    @keyframes pop { 0%{transform:scale(1)} 50%{transform:scale(1.1)} 100%{transform:scale(1)} }
    .pop { animation: pop 0.2s ease; }

    /* Printable worksheets */
    .ws-printable { display: none; }
    @media print {
      body > *:not(.ws-printable.printing) { display: none !important; }
      .ws-printable.printing { display: block !important; }
      .ws-page { padding: 14mm 18mm; font-family: 'Fredoka', system-ui, sans-serif; background: white; color: #111; }
      .ws-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6mm; padding-bottom: 3mm; border-bottom: 2.5px solid #3BBCB8; }
      .ws-logo { display: flex; align-items: center; gap: 2mm; font-size: 13pt; font-weight: 700; color: #2A9490; }
      .ws-logo img { height: 28px; width: auto; }
      .ws-mod-tag { font-size: 8pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #78716C; }
      .ws-title { font-size: 17pt; font-weight: 700; color: #1A1A1A; margin-bottom: 1mm; }
      .ws-rule-box { background: #EAF9F8; border: 1.5px solid #3BBCB8; border-radius: 3mm; padding: 3mm 5mm; margin-bottom: 5mm; }
      .ws-rule-label { font-size: 7pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #2A9490; margin-bottom: 1.5mm; }
      .ws-rule-text { font-size: 9.5pt; color: #1A1A1A; line-height: 1.5; }
      .ws-rule-text b { color: #FF6B44; }
      .ws-section { margin-bottom: 5mm; }
      .ws-section-title { font-size: 8.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #2A9490; margin-bottom: 2mm; border-bottom: 1px solid #DDD5C8; padding-bottom: 1mm; }
      .ws-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
      .ws-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3mm; }
      .ws-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 3mm; }
      .ws-box { border: 1px solid #DDD5C8; border-radius: 2mm; padding: 3mm; min-height: 16mm; background: #FAFAFA; }
      .ws-box-label { font-size: 8pt; font-weight: 700; color: #44403C; margin-bottom: 2mm; }
      .ws-line { border-bottom: 1px solid #DDD5C8; height: 7mm; margin-bottom: 1mm; }
      .ws-word-list { display: flex; flex-wrap: wrap; gap: 2.5mm; margin: 2mm 0; }
      .ws-word { font-family: 'DM Mono', monospace; font-size: 10pt; font-weight: 700; background: #EAF9F8; color: #2A9490; padding: 1.5mm 4mm; border-radius: 2mm; }
      .ws-word.blank { background: white; border: 1.5px solid #DDD5C8; min-width: 22mm; }
      .ws-sort-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
      .ws-sort-col { border: 1.5px solid; border-radius: 2mm; padding: 3mm; min-height: 28mm; }
      .ws-sort-col.gc { border-color: #22C55E; background: #ECFDF5; }
      .ws-sort-col.rc { border-color: #FF6B44; background: #FFF0EC; }
      .ws-col-label { font-size: 8pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2.5mm; }
      .ws-sort-col.gc .ws-col-label { color: #15803D; }
      .ws-sort-col.rc .ws-col-label { color: #E05530; }
      .ws-table { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 2mm 0; }
      .ws-table th { background: #EAF9F8; color: #2A9490; padding: 2mm 3mm; text-align: left; font-size: 8pt; border-bottom: 1.5px solid #3BBCB8; }
      .ws-table td { border: 1px solid #DDD5C8; padding: 2mm 3mm; }
      .ws-table td.ans { background: #FAFAFA; min-width: 22mm; }
      .ws-num { counter-reset: wn; }
      .ws-item { counter-increment: wn; display: flex; gap: 2.5mm; align-items: flex-start; margin-bottom: 3mm; font-size: 9.5pt; color: #111; }
      .ws-item::before { content: counter(wn) '.'; font-weight: 700; color: #2A9490; min-width: 5mm; flex-shrink: 0; }
      .ws-circle { display: inline-block; width: 4mm; height: 4mm; border: 1px solid #78716C; border-radius: 50%; margin-right: 1.5mm; vertical-align: middle; }
      .footer-note { font-size: 7pt; color: #A8A29E; text-align: center; margin-top: 8mm; font-style: italic; border-top: 1px solid #EEE; padding-top: 3mm; }
      .ws-elkonin { display: flex; gap: 1mm; align-items: flex-end; margin: 3mm 0; }
      .ws-elkonin-word { font-size: 10pt; font-weight: 700; color: #1A1A1A; min-width: 18mm; padding-top: 2mm; }
      .ws-elkonin-boxes { display: flex; gap: 1.5mm; }
      .ws-elkonin-box { width: 14mm; height: 12mm; border: 1.5px solid #3BBCB8; border-radius: 1.5mm; background: #FAFAFA; display: flex; align-items: center; justify-content: center; font-family: 'DM Mono', monospace; font-size: 10pt; font-weight: 700; color: #2A9490; }
      .ws-elkonin-box.empty { background: white; color: transparent; }
      .ws-elkonin-arrow { font-size: 8pt; color: #78716C; margin: 0 1mm; align-self: center; }
      .ws-elkonin-count { font-size: 8pt; color: #78716C; align-self: center; margin-left: 2mm; }
    }

/* ============================================================
   TIER ARCHITECTURE (Foundational / Advanced)
   Added for two-tier rollout
   ============================================================ */

/* Divider between Foundational and Advanced sections in sidebar */
.sidebar-advanced-divider {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 8px; margin-top: 12px;
  border-top: 1px solid var(--cream-dark);
  font-family: 'Fredoka', sans-serif;
}
.sidebar-advanced-label { font-size: 0.78rem; font-weight: 700; color: var(--text-mid); letter-spacing: 0.02em; }
.sidebar-advanced-count { font-size: 0.7rem; color: var(--text-light); }

/* Upgrade CTA block inside the locked Advanced section */
.sidebar-upgrade-cta {
  margin: 6px 12px 16px; padding: 14px 14px;
  background: linear-gradient(135deg, #FFFBEB 0%, #FFF1C4 100%);
  border: 1.5px solid #F0D97A; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
  position: relative;
}
.sidebar-upgrade-cta::before {
  content: '⚡'; position: absolute; top: -8px; right: 12px;
  background: var(--gold); color: white;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; box-shadow: 0 2px 6px rgba(245,158,11,0.4);
}
.sidebar-upgrade-title {
  font-family: 'Lora', serif; font-weight: 700; font-size: 0.92rem;
  color: var(--text); margin-bottom: 6px; line-height: 1.3;
}
.sidebar-upgrade-desc {
  font-size: 0.74rem; color: var(--text-mid); line-height: 1.5;
  margin-bottom: 12px;
}
.sidebar-upgrade-btn {
  width: 100%; background: var(--text); color: white; border: none;
  padding: 10px 12px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: 'Fredoka', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.sidebar-upgrade-btn:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 148, 144, 0.25);
}

/* Locked Advanced sections / modules (for Foundational users) */
.sidebar-section-locked .sidebar-unit-name { color: var(--text-light); }
.sidebar-section-locked .sidebar-unit-btn { cursor: pointer; }
.sidebar-section-locked .sidebar-unit-btn:hover { background: #FFFBEB; }
.mod-btn-locked { opacity: 0.6; cursor: pointer; }
.mod-btn-locked:hover { background: #FFFBEB; opacity: 0.9; }
.mod-btn-locked .mod-btn-num { background: transparent; color: #C89C3F; font-size: 0.82rem; }
.mod-btn-locked .mod-btn-text { color: var(--text-light); font-style: italic; }

/* ============================================================
   UPGRADE MODAL
   ============================================================ */
#upgrade-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka', sans-serif;
}
.upgrade-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); }
.upgrade-modal-panel { position: relative; background: white; border-radius: 16px; max-width: 560px; width: 92%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.upgrade-modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; color: #999; cursor: pointer; line-height: 1; padding: 0; width: 32px; height: 32px; }
.upgrade-modal-close:hover { color: var(--text); }
.upgrade-modal-header { padding: 28px 28px 16px; border-bottom: 1px solid var(--cream-mid); }
.upgrade-eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-dark); font-weight: 700; margin-bottom: 8px; }
.upgrade-modal-header h2 { font-family: 'Lora', serif; font-size: 1.45rem; line-height: 1.3; margin: 0; color: var(--text); font-weight: 700; }
.upgrade-modal-body { padding: 20px 28px 28px; }
.upgrade-intro { font-family: 'Lora', serif; font-size: 0.92rem; line-height: 1.6; color: var(--text-mid); margin: 0 0 20px; }
.upgrade-units { display: grid; gap: 8px; margin: 0 0 20px; }
.upgrade-unit { padding: 10px 14px; background: var(--cream-pale, #FAF8F2); border-left: 3px solid var(--teal); border-radius: 4px; }
.upgrade-unit strong { display: block; color: var(--text); font-size: 0.85rem; margin-bottom: 2px; }
.upgrade-unit span { display: block; font-size: 0.76rem; color: var(--text-mid); line-height: 1.5; }
.upgrade-price-block { background: #FFFBEB; border: 1px solid #F5E5B8; border-radius: 10px; padding: 16px 20px; margin-bottom: 20px; }
.upgrade-price-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; color: var(--text-mid); padding: 4px 0; }
.upgrade-price-row.upgrade-price-main { font-size: 1rem; color: var(--text); font-weight: 600; padding-top: 8px; border-top: 1px dashed #E8D98A; margin-top: 6px; }
.upgrade-strike { text-decoration: line-through; color: var(--text-light); }
.upgrade-price-amt { font-family: 'Lora', serif; font-size: 1.5rem; color: var(--teal-dark); font-weight: 700; }
.upgrade-price-note { font-size: 0.72rem; color: var(--text-light); margin-top: 10px; line-height: 1.5; }
.upgrade-pay-btn {
  display: block; width: 100%; background: var(--text); color: white;
  border: none; padding: 14px; border-radius: 10px; font-size: 1rem;
  font-weight: 600; cursor: pointer; transition: background 0.2s;
  font-family: 'Fredoka', sans-serif;
}
.upgrade-pay-btn:hover { background: var(--teal-dark); }
.upgrade-pay-btn:disabled { opacity: 0.6; cursor: wait; }
.upgrade-guarantee { font-size: 0.7rem; color: var(--text-light); text-align: center; margin-top: 12px; }

/* Success banner after upgrade completes */
.upgrade-success-banner {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: var(--green, #22C55E); color: white;
  padding: 14px 24px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 10000; font-family: 'Fredoka', sans-serif; font-weight: 500;
  transition: opacity 0.5s;
}
