: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: 32px 1.25rem 80px; grid-column: 2; }
    @media(max-width:900px) { .home-view { grid-column: 1; padding: 24px 1rem 80px; } }
    .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; padding: 0; margin: 0; }
    .insight li {
      font-family: 'Lora', serif;
      font-size: 0.92rem;
      color: var(--text-mid);
      line-height: 1.6;
      padding-left: 18px;
      position: relative;
      margin-bottom: 10px;
    }
    .insight li:last-child { margin-bottom: 0; }
    .insight li::before {
      content: '';
      position: absolute;
      left: 4px;
      top: 10px;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--teal);
    }
    .insight li strong { color: var(--teal-dark); font-style: normal; font-weight: 700; }
    .insight-gold { background: #FFFBEB; border-color: rgba(245,158,11,0.25); }
    .insight-gold li::before { background: 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 { background: 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: 0 4px 14px rgba(58, 58, 55, 0.06), 0 1px 3px rgba(58, 58, 55, 0.04); }
    .tool-header { background: linear-gradient(180deg, var(--teal-pale) 0%, rgba(234, 249, 248, 0.7) 100%); padding: 16px 22px 14px; 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-family: 'Fredoka', sans-serif; font-size: 1rem; font-weight: 700; color: var(--teal-dark); letter-spacing: -0.01em; }
    .tool-header-sub { font-family: 'Lora', serif; font-style: italic; font-size: 0.8rem; color: var(--teal); margin-top: 2px; }
    .tool-body { padding: 22px 20px; background: linear-gradient(180deg, #FDFCF9 0%, white 40%); }
    .tool-btn { background: var(--cream-mid); border: 1.5px solid var(--border-mid); color: var(--text-mid); padding: 10px 22px; border-radius: 22px; font-family: 'Fredoka', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
    .tool-btn:hover { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-pale); }
    /* Ready state — added by JS after a correct answer; draws the eye forward. */
    .tool-btn--ready { background: var(--teal); border-color: var(--teal); color: white; box-shadow: 0 3px 10px rgba(59, 188, 184, 0.3); }
    .tool-btn--ready:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: white; }

    /* 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 — shared answer buttons used across 18 tools */
    .rc-options { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
    .rc-opt { font-family: var(--mono); font-size: 0.98rem; font-weight: 700; padding: 11px 22px; border-radius: 12px; border: 2px solid var(--border-mid); cursor: pointer; background: linear-gradient(180deg, #FEFDFA 0%, var(--cream) 100%); color: var(--text); transition: all 0.2s ease; position: relative; -webkit-tap-highlight-color: transparent; }
    .rc-opt:hover { border-color: var(--teal); color: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(59, 188, 184, 0.15); }
    .rc-opt:active { transform: translateY(0); }
    .rc-opt:disabled { cursor: default; }
    .rc-opt:disabled:hover { transform: none; box-shadow: none; }
    .rc-opt.correct { background: var(--teal); color: white; border-color: var(--teal); box-shadow: 0 3px 10px rgba(59, 188, 184, 0.35); animation: rc-pop 0.32s cubic-bezier(0.34,1.56,0.64,1); }
    .rc-opt.correct::before { content: '✓ '; font-weight: 900; }
    .rc-opt.wrong { background: var(--coral); color: white; border-color: var(--coral); animation: shake 0.3s ease; }
    /* Dimmed state — applied to non-chosen buttons after a correct pick */
    .rc-opt.dimmed { opacity: 0.32; filter: saturate(0.5); }
    .rc-opt.wrong.dismissed { opacity: 0.4; background: var(--cream-mid); color: var(--coral-dark); border-color: rgba(255, 107, 68, 0.35); }
    @keyframes rc-pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }

    .rc-feedback { text-align: center; font-family: 'Lora', serif; font-size: 0.92rem; color: var(--text-mid); min-height: 26px; margin-top: 12px; line-height: 1.5; transition: opacity 0.2s ease; }
    .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; }
    }

/* ── App link + Phonics cross-sell components ── */
.rc-inline-link {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1.5px solid var(--teal-light);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1.5;
}
.rc-inline-link:hover { color: var(--teal-dark); border-color: var(--teal); }
.rc-inline-link--phonics { color: var(--gold); border-bottom-color: rgba(245,158,11,0.35); }
.rc-inline-link--phonics:hover { color: #B45309; border-bottom-color: var(--gold); }

.rc-phonics-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: linear-gradient(135deg, #F0FDF9, #E0F7F4);
  border: 2px solid var(--teal-light);
  border-radius: 18px;
  padding: 20px 22px;
  margin: 20px 0;
}
.rc-phonics-card__icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.rc-phonics-card__heading {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 6px;
}
.rc-phonics-card__text {
  font-family: 'Lora', serif;
  font-size: 0.87rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 14px;
}
.rc-phonics-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.rc-phonics-card__btn:hover { background: var(--teal-dark); transform: translateY(-1px); }
@media (max-width: 480px) {
  .rc-phonics-card { flex-direction: column; gap: 10px; padding: 16px; }
}

/* ── Word-blank fill animation (modules 3, 6, 7) ── */
.wt-before, .wt-after {
  color: var(--text);
}
.wt-blank {
  display: inline-block;
  color: var(--text-light);
  border-bottom: 2.5px solid var(--teal-border);
  letter-spacing: 4px;
  min-width: 1ch;
  padding: 0 2px;
  transition: color 0.2s, border-color 0.2s;
  animation: wt-blank-pulse 2.2s ease-in-out infinite;
}
.wt-blank--filled {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
  border-bottom-width: 2.5px;
  animation: wt-pop 0.28s cubic-bezier(0.34,1.56,0.64,1) both;
  letter-spacing: 1px;
}
@keyframes wt-blank-pulse {
  0%, 100% { border-bottom-color: var(--teal-border); }
  50%      { border-bottom-color: var(--teal); }
}
@keyframes wt-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 1 — Long-A demo card
   Animated mouth (closed-smile → open "ahh") + tap-to-hear pill button.
   The mouth is structured as upper-lip (static) + lower-lip (morphs)
   + inner-mouth shadow + teeth band + tongue. The closed state shows
   only the lips meeting; the open state drops the lower lip and fades
   in the teeth and tongue.

   `soundPulse` was previously referenced inline but never defined —
   defined here so the pill actually breathes.
   ══════════════════════════════════════════════════════════════════ */

/* Mouth card — press feedback handled by spellPlayAudio inline styles */
.sp-mouth-card {
  user-select: none;
}
.sp-mouth-card:hover .sp-tap-pill {
  background: var(--teal-dark);
}

/* Lower lip — drops down on open. transform-origin keeps it pivoting
   from where it meets the upper lip. */
.sp-mouth-lower {
  transform-origin: 50px 30px;
  transition: transform 0.18s ease-out;
}
.sp-mouth-card--open .sp-mouth-lower {
  transform: scaleY(1.55) translateY(2px);
}

/* Inner-mouth shadow, teeth band, tongue — fade in when open */
.sp-mouth-inner,
.sp-mouth-teeth,
.sp-mouth-tongue {
  transition: opacity 0.2s ease-out;
}
.sp-mouth-card--open .sp-mouth-inner  { opacity: 0.7; }
.sp-mouth-card--open .sp-mouth-teeth  { opacity: 1; }
.sp-mouth-card--open .sp-mouth-tongue { opacity: 0.9; }

/* Cheek blush gets slightly more saturated when "speaking" */
.sp-mouth-blush {
  transition: opacity 0.2s ease-out;
}
.sp-mouth-card--open .sp-mouth-blush { opacity: 0.4; }

/* "Tap to hear" pill button — replaces the dead text-with-broken-pulse
   that previously sat under the mouth. Real button affordance. */
.sp-tap-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 16px 7px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(59, 188, 184, 0.28);
  transition: background 0.2s ease, box-shadow 0.2s ease;
  animation: soundPulse 2.2s ease-in-out infinite;
}
.sp-tap-pill-icon {
  font-size: 0.85rem;
  line-height: 1;
}

/* Pulse animation — gentle scale + shadow halo. The animation now
   actually exists (it was referenced in mod-1 inline styles for months
   without ever being defined). */
@keyframes soundPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(59, 188, 184, 0.28),
                0 0 0 0 rgba(59, 188, 184, 0.4);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 2px 8px rgba(59, 188, 184, 0.28),
                0 0 0 8px rgba(59, 188, 184, 0);
  }
}

/* Stop the pulse once the card has ever been tapped — added by the
   inline spMouthAnimate() in mod-01.php on first activation. User knows
   the affordance now, no need to keep pulsing. */
.sp-mouth-card--tapped .sp-tap-pill {
  animation: none;
  transform: scale(1);
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 1 — Vocabulary cards
   Replaces the old <table> with 5 stacked picture cards. Each card
   pairs a small Crumbs illustration (72px) with the term, a one-line
   meaning, and a row of example pills. Mobile-first sizing.
   ══════════════════════════════════════════════════════════════════ */
.sp-vocab-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border: 1.5px solid var(--border-mid);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.sp-vocab-card:hover {
  border-color: var(--teal-border);
}
.sp-vocab-img {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  object-fit: contain;
  background: var(--cream);
  border-radius: 12px;
  padding: 4px;
}
.sp-vocab-body {
  flex: 1;
  min-width: 0;
}
.sp-vocab-row1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  line-height: 1.3;
}
.sp-vocab-term {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.sp-vocab-meaning {
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.4;
}
.sp-vocab-examples {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.sp-vocab-ex {
  font-family: var(--mono);
  font-size: 0.74rem;
  background: var(--teal-pale);
  color: var(--teal-dark);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--teal-border);
  white-space: nowrap;
}
.sp-vocab-note {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.74rem;
  color: var(--text-light);
  margin-left: 2px;
}

/* On narrow phones (<360px) the image gets a touch smaller so the
   text column has room for the example pills. */
@media (max-width: 380px) {
  .sp-vocab-img { width: 60px; height: 60px; }
  .sp-vocab-card { gap: 10px; padding: 10px 12px; }
  .sp-vocab-term { font-size: 1rem; }
  .sp-vocab-meaning { font-size: 0.8rem; }
}

/* ── Word construction tools (modules 11, 12, 13) ── */
.wt-eq-base {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.wt-eq-plus {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  color: var(--text-light);
  margin: 0 4px;
}
.wt-eq-suf {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-pale);
  border: 1.5px solid var(--teal-border);
  border-radius: 8px;
  padding: 3px 10px;
}
/* Y letter highlight — draws attention to the Y before transformation */
.wt-y-letter {
  color: var(--gold);
  font-style: italic;
  border-bottom: 2px solid var(--gold);
}
/* The I that replaces Y — snaps in with pop */
.wt-y-becomes-i {
  color: var(--teal-dark);
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  animation: wt-pop 0.28s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ── Module 5: Hard/Soft C/G — one word at a time ── */
.cg-single-word {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 3px;
  text-align: center;
  padding: 8px 0;
}
.cg-highlight {
  color: var(--teal-dark);
  border-bottom: 3px solid var(--teal);
  padding-bottom: 1px;
}
/* Visually distinct Hard vs Soft buttons */
.cg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 14px;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s;
  min-width: 160px;
  justify-content: center;
}
.cg-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.cg-btn--hard {
  background: var(--cream-mid);
  color: var(--text);
  border-color: var(--border-mid);
}
.cg-btn--hard:hover:not(:disabled) { background: #E7E5E4; border-color: #A8A29E; }
.cg-btn--soft {
  background: var(--teal-pale);
  color: var(--teal-dark);
  border-color: var(--teal-border);
}
.cg-btn--soft:hover:not(:disabled) { background: #CCFBF1; border-color: var(--teal); }
.cg-phoneme {
  font-family: var(--mono);
  font-size: 0.82rem;
  opacity: 0.75;
}

/* ── Module 8: Syllable Ninja — gap tap zones ── */
/* ══════════════════════════════════════════════════════════════════
   MODULE 8 — Syllable Slicer
   Word displays in lowercase. Gaps between letters are clearly marked
   with dashed scissors-style lines. On correct, letters animate apart
   to reveal a teal split dot. On wrong, the gap flashes coral.
   ══════════════════════════════════════════════════════════════════ */
.slice-hint {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.slice-letter {
  display: inline-block;
  padding: 4px 2px;
  cursor: default;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              color 0.3s ease;
  user-select: none;
  font-family: 'Fredoka', sans-serif;
}
.slice-letter--left {
  transform: translateX(-14px);
  color: var(--teal-dark);
}
.slice-letter--right {
  transform: translateX(14px);
  color: var(--teal-dark);
}
.slice-gap {
  display: inline-block;
  width: 22px;
  height: 48px;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  margin: 0 -3px;
  /* Default: a clearly visible dashed vertical line */
  background-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 6px,
    var(--border-mid) 6px,
    var(--border-mid) 11px,
    transparent 11px,
    transparent 16px,
    var(--border-mid) 16px,
    var(--border-mid) 21px,
    transparent 21px,
    transparent 26px,
    var(--border-mid) 26px,
    var(--border-mid) 31px,
    transparent 31px,
    transparent 36px,
    var(--border-mid) 36px,
    var(--border-mid) 41px,
    transparent 41px
  );
  background-size: 2px 100%;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.18s ease,
              transform 0.18s ease;
  border-radius: 4px;
}
.slice-gap:hover {
  /* Hover: line brightens to teal, slight scale-up to invite tap */
  background-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 4px,
    var(--teal) 4px,
    var(--teal) 13px,
    transparent 13px,
    transparent 18px,
    var(--teal) 18px,
    var(--teal) 27px,
    transparent 27px,
    transparent 32px,
    var(--teal) 32px,
    var(--teal) 41px,
    transparent 41px
  );
  background-size: 2.5px 100%;
  transform: scaleY(1.05);
}
.slice-gap--cut {
  /* Correct: replace with a teal split dot ('·') */
  background-image: none !important;
  background: transparent !important;
  transform: none !important;
}
.slice-gap--cut::after {
  content: '\B7';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--teal);
  font-family: 'Fredoka', sans-serif;
  line-height: 1;
  animation: sliceDotPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sliceDotPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.slice-gap--dimmed {
  opacity: 0.25;
}
.slice-gap--wrong {
  /* Wrong: line flashes coral */
  background-image: linear-gradient(
    to bottom,
    transparent 0,
    var(--coral) 0,
    var(--coral) 100%,
    transparent 100%
  ) !important;
  background-size: 3px 100% !important;
}
.slice-gap.shake {
  animation: shake 0.32s ease;
}
.slice-pattern--revealed {
  animation: slicePatternReveal 0.4s ease;
}
@keyframes slicePatternReveal {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Module 4: E Transformer — one pair at a time ── */
.et-word-wrap {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
}
.et-consonant { color: var(--text); }
.et-vowel {
  transition: color 0.35s ease;
  padding: 0 1px;
}
.et-vowel--short { color: var(--text-light); }
.et-vowel--long  { color: var(--teal-dark); }
.et-e-slot { display: inline-block; min-width: 0; }
.et-e-snap {
  display: inline-block;
  color: var(--teal);
  animation: wt-pop 0.28s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ══════════════════════════════════════════════════════════════
   SPELLING COURSE — INTRO & MODULES 1-2 VISUAL REDESIGN
   ══════════════════════════════════════════════════════════════ */

/* ── LEVEL / UNIT COLOUR TOKENS ──────────────────────────────── */
:root {
  --l1: #F59E0B;   --l1-pale: #FFFBEB;
  --l2: #3BBCB8;   --l2-pale: #EAF9F8;
  --l3: #8B5CF6;   --l3-pale: #F3EBFF;
  --l4: #22C55E;   --l4-pale: #ECFDF5;
  --l5: #FF6B44;   --l5-pale: #FFF0EC;
  --purple: #8B5CF6;
  --purple-pale: #F3EBFF;
  --green-pale: #ECFDF5;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --mono: 'DM Mono', monospace;
}

/* ── INTRO HERO ──────────────────────────────────────────────── */
.intro-hero {
  text-align: center;
  padding: 40px 20px 36px;
  margin: -32px -40px 0;
  background: linear-gradient(170deg, var(--l1-pale) 0%, var(--cream) 40%, var(--teal-pale) 100%);
  border-bottom: 1.5px solid var(--border);
}
@media(max-width:860px) { .intro-hero { margin: -24px -20px 0; padding: 32px 16px 28px; } }

.intro-hero-badge {
  display: inline-block;
  background: white;
  border: 1.5px solid var(--border-mid);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}
.intro-hero-title {
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 8px;
}
.intro-hero-accent {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.intro-hero-sub {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-mid);
  margin-bottom: 24px;
}
.intro-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.intro-stat { text-align: center; }
.intro-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1;
  font-family: 'Fredoka', sans-serif;
}
.intro-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.intro-stat-divider {
  width: 1.5px;
  height: 32px;
  background: var(--border-mid);
}

/* ── REASSURANCE STRIP ───────────────────────────────────────── */
.intro-reassurance {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 28px 0;
}
.intro-reassurance-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.5;
  transition: all 0.2s;
}
.intro-reassurance-item:hover { border-color: var(--teal-border); box-shadow: var(--shadow-sm); }
.intro-reassurance-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ── JOURNEY HEADER ──────────────────────────────────────────── */
.intro-journey-header {
  text-align: center;
  margin: 36px 0 20px;
}
.intro-journey-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
  margin-bottom: 4px;
}
.intro-journey-subtitle {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-mid);
}

/* ── UNIT LEVEL CARDS (intro journey) ───────────────────────── */
.intro-levels {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}
.intro-level-card {
  background: white;
  border: 2px solid color-mix(in srgb, var(--level-color) 25%, transparent);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}
.intro-level-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--level-color);
}
.intro-level-card:hover {
  box-shadow: 0 6px 24px color-mix(in srgb, var(--level-color) 15%, transparent);
  transform: translateY(-2px);
}
.intro-level-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.intro-level-num {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--level-pale);
  color: var(--level-text);
  font-size: 1.2rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 2px solid color-mix(in srgb, var(--level-color) 30%, transparent);
}
.intro-level-name { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.intro-level-modules { font-size: 0.72rem; color: var(--text-light); font-weight: 600; margin-top: 1px; }
.intro-level-arrow { margin-left: auto; color: var(--text-light); flex-shrink: 0; }

.intro-level-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.intro-topic-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--level-pale);
  color: var(--level-text);
  border: 1.5px solid color-mix(in srgb, var(--level-color) 25%, transparent);
}
.intro-topic-chip.more {
  background: transparent;
  border-style: dashed;
  font-size: 0.72rem;
  color: var(--text-light);
}
.intro-level-outcome {
  font-family: 'Lora', serif;
  font-size: 0.84rem;
  color: var(--level-text);
  font-style: italic;
  line-height: 1.5;
}

/* ── MODULE FLOW DIAGRAM ─────────────────────────────────────── */
.intro-module-flow {
  background: white;
  border: 1.5px solid var(--border-mid);
  border-radius: 18px;
  padding: 28px 24px;
  margin: 0 0 28px;
  text-align: center;
}
.intro-flow-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
  margin-bottom: 20px;
}
.intro-flow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.intro-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100px;
}
.intro-flow-icon {
  font-size: 1.8rem;
  height: 48px; width: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream);
  border-radius: 14px;
  border: 1.5px solid var(--border);
}
.intro-flow-step-title { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.intro-flow-step-desc { font-size: 0.7rem; color: var(--text-light); line-height: 1.4; }
.intro-flow-connector {
  width: 24px; height: 2px;
  background: var(--border-mid);
  margin-top: 24px;
  flex-shrink: 0;
}
@media(max-width:560px) {
  .intro-flow-steps { gap: 4px; }
  .intro-flow-step { width: 72px; }
  .intro-flow-connector { width: 12px; }
  .intro-flow-step-desc { font-size: 0.62rem; }
}

/* ── MODULE 1 — TERM CARDS ───────────────────────────────────── */
.term-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.term-card {
  background: white;
  border: 2px solid var(--border-mid);
  border-radius: 14px;
  padding: 16px 14px;
  transition: all 0.2s;
}
.term-card:hover { border-color: var(--teal-border); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.term-card-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 4px;
}
.term-card-def {
  font-size: 0.78rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 8px;
}
.term-card-ex {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--teal-pale);
  color: var(--teal-dark);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

/* ── MODULE 1 — KEY CONCEPT (wrong vs right) ─────────────────── */
.mod1-key-concept {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
@media(max-width:560px) { .mod1-key-concept { grid-template-columns: 1fr; } }

.mod1-kc-wrong, .mod1-kc-right {
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
}
.mod1-kc-wrong { background: #FFF5F5; border: 2px solid #FED7D7; }
.mod1-kc-right { background: var(--green-pale); border: 2px solid rgba(34,197,94,0.25); }
.mod1-kc-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.mod1-kc-sound {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 3px;
}
.mod1-kc-sound.wrong { background: white; color: #E53E3E; border: 1.5px solid #FED7D7; }
.mod1-kc-sound.right { background: white; color: #22C55E; border: 1.5px solid rgba(34,197,94,0.25); }

/* ── ONE SOUND MANY SPELLINGS — visual strip ─────────────────── */
.sound-spellings {
  background: white;
  border: 1.5px solid var(--border-mid);
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
}
.sound-spellings-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 14px;
}
.sound-spellings-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.spelling-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.spelling-variant {
  background: var(--teal-pale);
  border: 1.5px solid var(--teal-border);
  border-radius: 10px;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--teal-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.spelling-variant-word {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-light);
  font-family: 'Fredoka', sans-serif;
}

/* ── MODULE 2 — SHORT VOWEL VISUAL ───────────────────────────── */
.vowel-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 20px 0;
}
@media(max-width:600px) { .vowel-cards { grid-template-columns: repeat(3, 1fr); } }
@media(max-width:380px) { .vowel-cards { grid-template-columns: repeat(2, 1fr); } }

.vowel-card {
  background: white;
  border: 2px solid var(--teal-border);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  transition: all 0.2s;
}
.vowel-card:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.vowel-card-letter {
  font-family: 'Fredoka', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--coral);
  line-height: 1;
  margin-bottom: 4px;
}
.vowel-card-sound {
  font-size: 0.72rem;
  color: var(--text-light);
  font-style: italic;
  font-family: 'Lora', serif;
  margin-bottom: 6px;
}
.vowel-card-words {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ── RULE HIGHLIGHT BOX (gold variant) ───────────────────────── */
.rule-box-gold {
  background: linear-gradient(135deg, #FFFBEB, #FFF9E6);
  border: 1.5px solid rgba(245,158,11,0.3);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}
.rule-box-gold::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--coral));
}
.rule-box-gold .rb-label { color: #92400E; }
.rule-box-gold .rb-rule .gold { color: var(--coral); }

/* ── FLOSS VISUAL GRID ───────────────────────────────────────── */
.floss-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}
@media(max-width:500px) { .floss-grid { grid-template-columns: repeat(2, 1fr); } }

.floss-card {
  background: white;
  border: 2px solid var(--border-mid);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  transition: all 0.2s;
}
.floss-card:hover { border-color: var(--teal-border); box-shadow: var(--shadow-sm); }
.floss-card-letter {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1;
  margin-bottom: 6px;
}
.floss-card-words {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ── WATCH FOR — error card grid ─────────────────────────────── */
.watchfor-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.watchfor-card {
  background: var(--cream);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.watchfor-card-wrong {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #E53E3E;
  background: #FFF5F5;
  border: 1.5px solid #FED7D7;
  border-radius: 8px;
  padding: 4px 10px;
  display: inline-block;
  margin-bottom: 6px;
}
.watchfor-card-fix {
  font-size: 0.75rem;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ── TEACH SESSION BOX ───────────────────────────────────────── */
.session-box-gold {
  background: linear-gradient(135deg, var(--l1-pale), #FFF8EE);
  border: 2px solid rgba(245,158,11,0.3);
  border-radius: 20px;
  padding: 24px;
  margin: 28px 0;
  position: relative;
}
.session-box-gold::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  border-radius: 20px 20px 0 0;
}
.session-box-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #92400E;
  background: white;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(245,158,11,0.25);
  margin-bottom: 16px;
}
.session-steps { display: flex; flex-direction: column; gap: 14px; }
.session-step { display: flex; gap: 12px; }
.session-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.session-step-body { flex: 1; }
.session-step-title { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.session-step-desc { font-size: 0.82rem; color: var(--text-mid); line-height: 1.6; }
.session-step-script {
  font-family: 'Lora', serif;
  font-style: italic;
  color: #92400E;
  display: block;
  margin-top: 5px;
  border-left: 3px solid rgba(245,158,11,0.4);
  padding-left: 10px;
  font-size: 0.82rem;
}

/* ── LEVEL BADGE on module eyebrow ───────────────────────────── */
.level-badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 6px;
}
.level-badge.l1 { background: var(--l1-pale); color: #92400E; border: 1px solid rgba(245,158,11,0.2); }
.level-badge.l2 { background: var(--l2-pale); color: var(--teal-dark); border: 1px solid var(--teal-border); }
.level-badge.l3 { background: var(--l3-pale); color: #5B21B6; border: 1px solid rgba(139,92,246,0.2); }
.level-badge.l4 { background: var(--l4-pale); color: #15803D; border: 1px solid rgba(34,197,94,0.2); }
.level-badge.l5 { background: var(--l5-pale); color: var(--coral-dark); border: 1px solid rgba(255,107,68,0.2); }

/* ══════════════════════════════════════════════════════════════
   MOBILE FIXES — new component breakpoints
   ══════════════════════════════════════════════════════════════ */

/* Hero stats: wrap on very small screens */
@media(max-width:400px) {
  .intro-hero-stats { gap: 14px; }
  .intro-stat-num { font-size: 1.6rem; }
  .intro-stat-divider { height: 24px; }
  .intro-stat-label { font-size: 0.62rem; }
}

/* Term cards: safe floor on 320px screens */
.term-cards {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* Flow diagram: 2×2 grid on phones, not 4-in-a-row */
@media(max-width:480px) {
  .intro-flow-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    justify-items: center;
  }
  .intro-flow-connector { display: none; }
  .intro-flow-step { width: auto; }
}

/* color-mix() fallback — solid border for older Android WebViews */
.intro-level-card {
  border: 2px solid rgba(0,0,0,0.12);
}
/* These override with color-mix where supported */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .intro-level-card[style*="--level-color:var(--l1)"] { border-color: rgba(245,158,11,0.25); }
  .intro-level-card[style*="--level-color:var(--l2)"] { border-color: rgba(59,188,184,0.25); }
  .intro-level-card[style*="--level-color:var(--l3)"] { border-color: rgba(139,92,246,0.25); }
  .intro-level-card[style*="--level-color:var(--l4)"] { border-color: rgba(34,197,94,0.25); }
  .intro-level-card[style*="--level-color:var(--l5)"] { border-color: rgba(255,107,68,0.25); }
}

/* Level num badge fallback */
.intro-level-num { border: 2px solid rgba(0,0,0,0.12); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .intro-level-card[style*="--level-color:var(--l1)"] .intro-level-num { border-color: rgba(245,158,11,0.3); }
  .intro-level-card[style*="--level-color:var(--l2)"] .intro-level-num { border-color: rgba(59,188,184,0.3); }
  .intro-level-card[style*="--level-color:var(--l3)"] .intro-level-num { border-color: rgba(139,92,246,0.3); }
  .intro-level-card[style*="--level-color:var(--l4)"] .intro-level-num { border-color: rgba(34,197,94,0.3); }
  .intro-level-card[style*="--level-color:var(--l5)"] .intro-level-num { border-color: rgba(255,107,68,0.3); }
}

/* Topic chip border fallback */
.intro-topic-chip { border: 1.5px solid rgba(0,0,0,0.1); }

/* Watchfor cards: single column on very small screens */
@media(max-width:360px) {
  .watchfor-cards { grid-template-columns: 1fr; }
}

/* Session steps: tighten on small screens */
@media(max-width:480px) {
  .session-box-gold { padding: 18px 16px; }
  .session-step-num { width: 24px; height: 24px; font-size: 0.72rem; }
}

/* Sound spellings: allow wrapping variants */
.spelling-variants { gap: 6px; }
@media(max-width:480px) {
  .spelling-variant { padding: 5px 10px; font-size: 0.82rem; }
}

/* Vowel cards: never collapse below 2 columns */
@media(max-width:320px) {
  .vowel-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Intro level cards: reduce padding on small phones */
@media(max-width:400px) {
  .intro-level-card { padding: 16px 14px; border-radius: 14px; }
  .intro-level-num { width: 34px; height: 34px; font-size: 1rem; }
  .intro-level-name { font-size: 0.95rem; }
}

/* ── HOME PAGE — level badges + tagline (added for redesign) ── */
.home-tagline {
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--text-mid);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.home-unit-level {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.home-unit-level.l1 { background: var(--l1-pale); color: #92400E; }
.home-unit-level.l2 { background: var(--l2-pale); color: var(--teal-dark); }
.home-unit-level.l3 { background: var(--l3-pale); color: #5B21B6; }
.home-unit-level.l4 { background: var(--l4-pale); color: #15803D; }
.home-unit-level.l5 { background: var(--l5-pale); color: var(--coral-dark); }

/* ═══════════════════════════════════════════════════════════════
   EXCEPTIONS SECTION — added for Unit 1 restructure
   ═══════════════════════════════════════════════════════════════ */

/* Divider that separates core rules from exceptions */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0 20px;
}
.section-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(239,68,68,0.2);
}
.section-divider-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #B91C1C;
  white-space: nowrap;
  padding: 0 4px;
}

/* Italic intro sentence before exceptions block */
.exc-intro {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Exception rule box — red left border, warm background */
.rule-box-exc {
  background: #FEF2F2;
  border: 1.5px solid rgba(239,68,68,0.2);
  border-left: 3px solid #EF4444;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 14px 0;
}
.rule-box-exc .rb-label {
  color: #B91C1C;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 8px;
  opacity: 0.8;
}
.rule-box-exc .rb-rule {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.55;
}
.rule-box-exc .rb-rule .gold {
  color: #B45309;
}
.rule-box-exc .rb-note {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-top: 8px;
  line-height: 1.6;
  opacity: 0.85;
}

/* "Going deeper" divider variant — blue, for advanced content (not exceptions) */
.section-divider--deep .section-divider-line {
  background: rgba(59,188,184,0.25);
}
.section-divider--deep .section-divider-label {
  color: var(--teal-dark);
}

/* Exception rule box — "going deeper" teal variant for Module 4 Job 5 */
.rule-box-exc--deep {
  background: var(--teal-pale);
  border: 1.5px solid var(--teal-border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 14px 0;
}
.rule-box-exc--deep .rb-label {
  color: var(--teal-dark);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 8px;
  opacity: 0.8;
}
.rule-box-exc--deep .rb-rule {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.55;
}
.rule-box-exc--deep .rb-rule .gold {
  color: var(--gold);
}
.rule-box-exc--deep .rb-note {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-top: 8px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 00 — SPELLING MAP TABLE
   ═══════════════════════════════════════════════════════════════ */

.spelling-map {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
}

.smap-row {
  display: flex;
  align-items: stretch;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--border-mid);
  min-height: 72px;
}

/* Percentage badge — left column */
.smap-pct {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
  padding: 12px 8px;
}

/* Body — right column */
.smap-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.smap-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.3;
}

.smap-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--teal);
  color: white;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.smap-desc {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.smap-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.smap-words span {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
}

/* Row colour variants */
.smap-row--phonics {
  border-color: rgba(34,197,94,0.2);
  background: var(--green-pale);
}
.smap-row--phonics .smap-pct {
  background: rgba(34,197,94,0.12);
  color: #15803D;
}
.smap-row--phonics .smap-words span {
  background: rgba(34,197,94,0.12);
  color: #15803D;
}

.smap-row--course {
  border-color: var(--teal-border);
  background: var(--teal-pale);
  border-width: 2px;
}
.smap-row--course .smap-pct {
  background: rgba(59,188,184,0.18);
  color: var(--teal-dark);
  font-size: 1.5rem;
}
.smap-row--course .smap-label {
  color: var(--teal-dark);
}
.smap-row--course .smap-words span {
  background: rgba(59,188,184,0.18);
  color: var(--teal-dark);
}

.smap-row--sight {
  border-color: rgba(245,158,11,0.2);
  background: #FFFBEB;
}
.smap-row--sight .smap-pct {
  background: rgba(245,158,11,0.1);
  color: #B45309;
}
.smap-row--sight .smap-words span {
  background: rgba(245,158,11,0.1);
  color: #92400E;
}

.smap-row--irreg {
  border-color: var(--border-mid);
  background: var(--cream-mid);
}
.smap-row--irreg .smap-pct {
  background: var(--cream-dark);
  color: var(--text-light);
}
.smap-row--irreg .smap-words span {
  background: var(--cream-dark);
  color: var(--text-mid);
}

/* Citation footnote */
.mod-citation {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 01 — LONG A SHOWCASE
   ═══════════════════════════════════════════════════════════════ */

.long-a-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}

@media (max-width: 380px) {
  .long-a-showcase {
    grid-template-columns: repeat(2, 1fr);
  }
}

.la-item {
  background: white;
  border: 1.5px solid var(--border-mid);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.la-word {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.la-vowel {
  color: var(--teal);
}

.la-spelling {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--cream-mid);
  padding: 2px 8px;
  border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 05 — CAT & KITE ILLUSTRATION + WORD GROUPS
   ═══════════════════════════════════════════════════════════════ */

/* SVG wrapper — full width, constrained height, no horizontal scroll */
.cat-kite-wrap {
  width: 100%;
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-mid);
  border: 1.5px solid var(--border-mid);
}

.cat-kite-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Two-column word example groups below the illustration */
.ck-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 20px;
}

.ck-ex-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ck-ex-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════════════════════════
   MODULES 06 & 07 — SOUND CARDS
   ═══════════════════════════════════════════════════════════════ */

/* Two-up sound card row (AR/OR) */
.sound-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0 20px;
}

/* Individual sound card */
.sound-card {
  border-radius: 16px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sound-card:active { transform: scale(0.96); }

.sound-card--purple {
  background: rgba(139,92,246,0.06);
  border-color: rgba(139,92,246,0.25);
}
.sound-card--teal {
  background: var(--teal-pale);
  border-color: var(--teal-border);
}
.sound-card--coral {
  background: var(--coral-pale);
  border-color: rgba(255,107,68,0.25);
}
.sound-card--wide {
  max-width: 100%;
  width: 100%;
}

.sc-grapheme {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}
.sound-card--purple .sc-grapheme { color: #7C3AED; }
.sound-card--teal .sc-grapheme { color: var(--teal-dark); }
.sound-card--coral .sc-grapheme { color: var(--coral-dark); font-size: 1.6rem; }

.sc-ipa {
  font-size: 0.82rem;
  color: var(--text-mid);
  margin-top: 4px;
}
.sc-example {
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  color: var(--text-mid);
  margin-top: 4px;
  font-style: italic;
  line-height: 1.5;
}
.sc-tap {
  font-size: 0.68rem;
  color: currentColor;
  margin-top: 8px;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

/* Trio cards — er/ir/ur */
.trio-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.trio-card {
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  border: 1.5px solid transparent;
}
.trio-card--er { background: rgba(255,107,68,0.06); border-color: rgba(255,107,68,0.2); }
.trio-card--ir { background: var(--teal-pale); border-color: var(--teal-border); }
.trio-card--ur { background: #FFFBEB; border-color: rgba(245,158,11,0.2); }

.trio-freq {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.4;
}
.trio-grapheme {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.trio-card--er .trio-grapheme { color: var(--coral-dark); }
.trio-card--ir .trio-grapheme { color: var(--teal-dark); }
.trio-card--ur .trio-grapheme { color: #B45309; }

.trio-clue {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.72rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 8px;
}
.trio-words {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

/* Label above word banks */
.rv-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 07 — VOWEL SECTION LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.vowel-section {
  margin: 24px 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.vowel-section:first-of-type { border-top: none; padding-top: 0; }

.vs-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

/* Small compact sound card for vowel section headers */
.vs-sound-card {
  flex-shrink: 0;
  width: 72px;
  height: 80px;
  border-radius: 14px;
  background: var(--teal-pale);
  border: 2px solid var(--teal-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  gap: 1px;
  color: var(--teal-dark);
}
.vs-sound-card:active { transform: scale(0.93); }
.vs-sound-card--split { background: #FFFBEB; border-color: rgba(245,158,11,0.3); }

.vs-grapheme {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1;
}
.vs-sound-card--split .vs-grapheme { color: #B45309; }

.vs-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.vs-tap {
  font-size: 0.6rem;
  color: var(--text-light);
}

.vs-rule {
  flex: 1;
  min-width: 0;
}
.vs-rule-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.vs-rule-body {
  font-family: 'Lora', serif;
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.6;
}
.vs-rule-body strong {
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 700;
}

/* ── SOUND CARD ANIMATIONS ───────────────────────────────────── */

/* Ripple rings — expand outward from 🔊 and fade, no bounce */
@keyframes soundRipple {
  0%   { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

.sound-tap-btn {
  position: relative;
  display: inline-block;
  color: var(--teal);
}
.sound-tap-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0;
  animation: soundRipple 1.6s ease-out infinite;
}
.sound-tap-btn::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0;
  animation: soundRipple 1.6s ease-out infinite 0.7s;
}

/* Colour overrides — ripple matches card context */
.sound-tap-btn--coral { color: var(--coral); }
.sound-tap-btn--teal  { color: var(--teal); }
.sound-tap-btn--gold  { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════
   HOME SCREEN REDESIGN
   ═══════════════════════════════════════════════════════════════ */

/* Remove old journey timeline line */
.home-journey::before { display: none; }

/* Home view — matches .main-content behaviour, fills the content column */
#home-view {
  padding: 32px 1.25rem 80px;
}
@media(max-width:900px) {
  #home-view {
    padding: 24px 1rem 80px;
  }
}
@media(max-width:400px) {
  #home-view {
    padding: 20px 0.85rem 80px;
  }
}
/* ═══════════════════════════════════════════════════════════════
   CK/TCH/DGE PRACTICE TOOL (module 3) — progress strip, flashcard,
   end-of-set panel. Applied via .rc-practice-* classes in mod-03.php.
   Safe to add — these classes are NOT used anywhere else.
   ═══════════════════════════════════════════════════════════════ */

/* Progress bar — sits inside .tool-body at the top */
.rc-practice-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 18px;
  padding: 0 2px;
}
.rc-practice-progress__label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  white-space: nowrap;
}
.rc-practice-progress__dots {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}
.rc-practice-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
  border: 1.5px solid var(--border-mid);
  transition: all 0.25s ease;
  cursor: pointer;
  padding: 0;
}
.rc-practice-dot:hover {
  transform: scale(1.3);
  border-color: var(--teal);
}
.rc-practice-dot.answered-correct {
  background: var(--teal);
  border-color: var(--teal);
}
.rc-practice-dot.answered-wrong {
  background: var(--coral);
  border-color: var(--coral);
}
.rc-practice-dot.active {
  transform: scale(1.45);
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 2px var(--teal-pale);
}

/* Flashcard — replaces the plain .rc-word-display */
.rc-practice-card {
  background: linear-gradient(180deg, white 0%, #FDFCF9 100%);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 22px 18px 20px;
  margin: 0 auto 18px;
  max-width: 440px;
  box-shadow: 0 2px 8px rgba(58, 58, 55, 0.04);
  text-align: center;
}
.rc-practice-clue {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.98rem;
  color: var(--teal-dark);
  line-height: 1.45;
  margin-bottom: 8px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.rc-practice-sound-chip {
  display: inline-block;
  background: var(--teal-pale);
  color: var(--teal-dark);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 11px;
  border-radius: 12px;
  border: 1px solid var(--teal-border);
  margin-bottom: 12px;
}
/* Warning variant — for the W Trap tool, where the ear says one thing
   but the spelling is another. Coral-tinted to flag the trap. */
.rc-practice-sound-chip--warn {
  background: #FEF2F0;
  color: #B91C1C;
  border-color: #FDA4AF;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
}
.rc-practice-word {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 3px;
  line-height: 1.1;
  margin: 6px 0 4px;
  user-select: none;
}
.rc-practice-word .wt-blank {
  letter-spacing: 6px;
  padding: 0 4px;
  border-bottom-width: 3px;
}
.rc-practice-checkmark {
  display: inline-block;
  color: var(--teal);
  font-size: 1.4rem;
  margin-left: 6px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  vertical-align: middle;
}
.rc-practice-checkmark.show {
  opacity: 1;
  transform: scale(1);
}

/* End-of-set completion panel */
.rc-practice-done {
  background: linear-gradient(180deg, var(--teal-pale) 0%, rgba(234, 249, 248, 0.5) 100%);
  border: 1.5px solid var(--teal-border);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  margin: 10px 0;
  animation: rc-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.rc-practice-done__icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 8px;
}
.rc-practice-done__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 6px;
}
.rc-practice-done__score {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
}
.rc-practice-done__score strong { color: var(--teal-dark); font-size: 1.15rem; }
.rc-practice-done__sub {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 16px;
  line-height: 1.5;
}
.rc-practice-done__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.rc-practice-done__btn {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 22px;
  cursor: pointer;
  border: 1.5px solid;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.rc-practice-done__btn--primary {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.rc-practice-done__btn--primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}
.rc-practice-done__btn--secondary {
  background: white;
  color: var(--teal-dark);
  border-color: var(--teal);
}
.rc-practice-done__btn--secondary:hover {
  background: var(--teal-pale);
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 4 — SILENT E'S JOBS
   1) Five-job badge-row preview (above the flip cards)
   2) Job 5 "advanced" card styling (on top of .adv-card-slate)
   3) E-transform display — before/after inside the practice tool's
      flashcard. Replaces the old .et-word-wrap single-word display.
   All classes namespaced with .ej- to avoid collisions.
   ═══════════════════════════════════════════════════════════════ */

/* ── Badge-row preview of the 5 jobs ── */
.ej-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 20px;
  flex-wrap: wrap;
}
.ej-badge-row__label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-right: 4px;
}
.ej-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(58,58,55,0.12);
}
.ej-badge--1 { background: var(--teal); }
.ej-badge--2 { background: var(--coral); }
.ej-badge--3 { background: var(--gold); }
.ej-badge--4 { background: var(--green); }
.ej-badge--5 { background: #64748B; }
.ej-badge-connector {
  width: 8px;
  height: 1.5px;
  background: var(--border-mid);
  flex-shrink: 0;
}

/* ── Job 5 "advanced" flip-card styling ── */
/* Front face pill (sits inside the .adv-card-head) */
.ej-adv-pill {
  display: inline-block;
  background: #F1F5F9;
  color: #475569;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  border: 1px solid #CBD5E1;
}

/* ── E-transform display inside the practice flashcard ── */
.ej-transform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 14px;
  flex-wrap: nowrap;
}
@media(max-width: 420px) {
  .ej-transform { gap: 2px; }
}

.ej-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}
.ej-side--left { align-items: flex-end; }
.ej-side--right { align-items: flex-start; }

/* Left (without-E) word */
.ej-without {
  position: relative;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 2px;
  padding: 4px 10px;
  white-space: nowrap;
  line-height: 1.15;
}
@media(max-width: 480px) {
  .ej-without { font-size: 1.55rem; padding: 4px 6px; }
}

/* 'real' (Job 1): just muted, no strikethrough */
.ej-without--real .ej-word-text {
  text-decoration: none;
}
/* 'broken' (Jobs 2-4): muted + strikethrough */
.ej-without--broken .ej-word-text {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 107, 68, 0.6);
  text-decoration-thickness: 2.5px;
}
/* 'noun' (Job 5): muted, no strikethrough — it's a real (noun) word */
.ej-without--noun .ej-word-text {
  text-decoration: none;
}

/* Red X badge on broken forms */
.ej-mark {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(255, 107, 68, 0.4);
}

/* noun/verb role labels beneath the words for Job 5 */
.ej-role {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}
.ej-role--teal {
  color: var(--teal-dark);
  font-weight: 600;
  font-style: italic;
}

/* Arrow column (+e ↓ →) */
.ej-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  flex-shrink: 0;
}
.ej-arrow-plus {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-pale);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 2px 8px;
  line-height: 1.2;
}
.ej-arrow-line {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  color: var(--teal);
  line-height: 1;
}

/* Right (with-E) word + highlight spans */
.ej-with {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
  padding: 4px 10px;
  white-space: nowrap;
  line-height: 1.15;
  animation: rc-pop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@media(max-width: 480px) {
  .ej-with { font-size: 1.55rem; padding: 4px 6px; }
}

/* Per-job highlights on the right-side word */
.ej-hl {
  border-radius: 4px;
  padding: 0 3px;
  margin: 0 0.5px;
}
.ej-hl--teal  { background: var(--teal-pale);   color: var(--teal-dark); }
.ej-hl--coral { background: #FFF0EC;            color: var(--coral-dark); }
.ej-hl--gold  { background: #FFFBEB;            color: #B45309; }
.ej-hl--green { background: var(--green-pale);  color: #15803D; }
.ej-hl--slate { background: #F1F5F9;            color: #475569; }

/* Answer-button layout — number badge + label for the 5 jobs */
.ej-opt {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  padding: 10px 14px !important;
  text-align: left !important;
  min-width: 0;
}
.ej-opt-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cream-dark);
  color: var(--text-mid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ej-opt.correct .ej-opt-num { background: white; color: var(--teal-dark); }
.ej-opt.wrong .ej-opt-num { background: white; color: var(--coral-dark); }

.ej-opt-label {
  white-space: normal;
  line-height: 1.3;
}

/* Stack the options vertically on narrow screens — they're labels, not short letters */
.rc-options.ej-opts {
  flex-direction: column;
  align-items: stretch;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.rc-options.ej-opts .rc-opt {
  width: 100%;
  justify-content: flex-start;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 7 — SUB-SECTION STRUCTURE (7a / 7b / 7c)
   Chip-style sub-navigation at the top, color-tinted sub-sections,
   vowel-row at the head of 7A replacing the 5 individual sound cards.
   All classes prefixed .m7s- to avoid collisions with existing .m7-.
   ═══════════════════════════════════════════════════════════════ */

/* ── Sub-section navigation chips ── */
.m7s-subnav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 14px 0 18px;
  padding: 8px 10px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.m7s-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 18px;
  background: white;
  border: 1.5px solid var(--border-mid);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.m7s-chip:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-pale);
}
.m7s-chip:focus {
  outline: none;
}
.m7s-chip:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.m7s-chip__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.m7s-chip--a .m7s-chip__num { background: var(--teal); }
.m7s-chip--b .m7s-chip__num { background: var(--gold); }
.m7s-chip--c .m7s-chip__num { background: #64748B; }

/* ── Sub-section wrapper + header ── */
.m7s-section {
  margin: 28px -4px 16px;
  padding: 20px 4px 10px;
  border-radius: 16px;
  scroll-margin-top: 80px; /* so anchor scrolls leave room above */
}
.m7s-section--a {
  background: linear-gradient(180deg, rgba(59, 188, 184, 0.04) 0%, transparent 100%);
}
.m7s-section--b {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
}
.m7s-section--c {
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.05) 0%, transparent 100%);
}

.m7s-section__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding: 0 4px;
}
.m7s-section__badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Fredoka', sans-serif;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(58, 58, 55, 0.12);
}
.m7s-section__badge-7 { font-size: 0.72rem; font-weight: 500; opacity: 0.82; line-height: 1; }
.m7s-section__badge-letter { font-size: 1.2rem; font-weight: 700; line-height: 1; margin-top: 2px; }
.m7s-section--a .m7s-section__badge { background: var(--teal); }
.m7s-section--b .m7s-section__badge { background: var(--gold); }
.m7s-section--c .m7s-section__badge { background: #64748B; }

.m7s-section__text {
  flex: 1;
  min-width: 0;
}
.m7s-section__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  line-height: 1.2;
}
.m7s-section__sub {
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ── Vowel-row at top of 7A ── */
.m7s-vrow {
  background: white;
  border: 1.5px solid var(--teal-border);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 22px;
  box-shadow: var(--shadow-sm);
}
.m7s-vrow__head {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 8px;
  text-align: center;
}
.m7s-vrow__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.m7s-vbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 8px;
  background: var(--teal-pale);
  border: 1.5px solid var(--teal-border);
  border-radius: 10px;
  color: var(--teal-dark);
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  font-family: 'Fredoka', sans-serif;
}
.m7s-vbtn:hover {
  background: white;
  border-color: var(--teal);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 188, 184, 0.2);
}
.m7s-vbtn:active { transform: translateY(0); }
.m7s-vbtn__letter {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.m7s-vbtn__label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
}
.m7s-vbtn__speaker {
  font-size: 0.62rem;
  opacity: 0.6;
  margin-top: -1px;
}

/* ── Long-vowel content block (replaces .vowel-section's heavy header for 7A) ── */
.m7s-vowel {
  margin: 0 0 24px;
  padding: 0 4px;
  scroll-margin-top: 80px;
}
.m7s-vowel__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--teal-border);
}
.m7s-vowel__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 0;
}
.m7s-vowel__rule {
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  color: var(--text-mid);
  font-style: italic;
  line-height: 1.5;
  flex: 1;
  min-width: 200px;
}
.m7s-vowel__rule strong {
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 600;
  font-family: var(--mono), monospace;
}

/* ── 7A "Rule-breakers" cluster at end of 7A ── */
.m7s-exc-cluster {
  margin: 8px 0 20px;
}
.m7s-exc-cluster__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.m7s-exc-cluster__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-pale);
  border: 1.5px solid var(--teal-border);
  color: var(--teal-dark);
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
}
.m7s-exc-cluster__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.m7s-exc-cluster__intro {
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* ── Inline sound button inside each 7A vowel section header ── */
.m7s-vowel__speaker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--teal-pale);
  border: 1px solid var(--teal-border);
  color: var(--teal-dark);
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, background 0.12s;
  flex-shrink: 0;
  margin-right: 4px;
}
.m7s-vowel__speaker:hover {
  background: white;
  border-color: var(--teal);
}
.m7s-vowel__speaker:active {
  transform: scale(0.92);
}

/* ── Inter-section divider (7a → 7b → 7c) ── */
/* Gives a clear visual break between sub-sections, larger than the
   standard section-divider used inside sections. */
.m7s-section-break {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0 24px;
  padding: 0 4px;
}
.m7s-section-break__line {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
}
.m7s-section-break__label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 7 — INTRO BLOCK, STRATEGY STRIPS, BONUS CHUNKS
   Added for the final Module 7 polish:
   • .m7-intro    — "how this module is structured" panel at the top
   • .m7-strategy — end-of-vowel-section honest strategy note
   • .m7-practice-note — "practice matters" rule-box variant
   • .m7-bonus    — dark bonus section for spelling chunks at module end
   ═══════════════════════════════════════════════════════════════ */

/* ── Module intro panel ── */
.m7-intro {
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 16px 0 22px;
}
.m7-intro__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.m7-intro__icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}
.m7-intro__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}
.m7-intro__body {
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.65;
}
.m7-intro__body p {
  margin: 0 0 10px;
}
.m7-intro__body p:last-child {
  margin-bottom: 0;
}
.m7-intro__list {
  list-style: none;
  padding: 0;
  margin: 10px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m7-intro__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.5;
}
.m7-intro__list-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.m7-intro__list-badge--a { background: var(--teal); }
.m7-intro__list-badge--b { background: var(--gold); }
.m7-intro__list-badge--c { background: #64748B; }
.m7-intro__list-badge--bonus { background: #1E293B; color: var(--gold); }
.m7-intro__list-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: var(--text);
  margin-right: 4px;
}
.m7-intro__closing {
  font-style: italic;
  color: var(--text-light);
  border-top: 1px dashed var(--border-mid);
  padding-top: 10px;
  margin-top: 12px;
}

/* ── Strategy strip (end of each long-vowel section) ── */
.m7-strategy {
  background: rgba(59, 188, 184, 0.06);
  border: 1px solid rgba(59, 188, 184, 0.2);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
  font-family: 'Lora', serif;
  font-size: 0.84rem;
  color: var(--text-mid);
  line-height: 1.55;
}
.m7-strategy__label {
  display: inline-block;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-dark);
  margin-right: 6px;
}
.m7-strategy strong {
  color: var(--text);
  font-weight: 600;
}

/* ── "Practice matters" note (between tool and exceptions in 7A) ── */
.m7-practice-note {
  background: white;
  border: 1.5px solid var(--border-mid);
  border-top: 3px solid var(--gold);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 20px 0 8px;
  box-shadow: var(--shadow-sm);
}
.m7-practice-note__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.m7-practice-note__icon {
  font-size: 1rem;
  line-height: 1;
}
.m7-practice-note__body {
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.65;
}
.m7-practice-note__body strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Bonus "Spelling Chunks" section (end of module) ── */
.m7-bonus {
  background: #1E293B;
  border-radius: 16px;
  padding: 24px 22px;
  margin: 36px 0 24px;
  color: #F8F7F4;
  box-shadow: 0 4px 20px rgba(30, 41, 59, 0.25);
}
.m7-bonus__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 168, 0, 0.25);
}
.m7-bonus__icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.m7-bonus__titles {
  flex: 1;
  min-width: 0;
}
.m7-bonus__eyebrow {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 2px;
}
.m7-bonus__title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 4px;
  line-height: 1.2;
}
.m7-bonus__sub {
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  color: rgba(248, 247, 244, 0.75);
  line-height: 1.55;
}
.m7-bonus__intro {
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  color: rgba(248, 247, 244, 0.88);
  line-height: 1.65;
  margin: 16px 0 18px;
}
.m7-bonus__intro strong {
  color: #F8F7F4;
  font-weight: 600;
}
.m7-bonus__group {
  margin-bottom: 18px;
}
.m7-bonus__group:last-child {
  margin-bottom: 0;
}
.m7-bonus__group-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 168, 0, 0.3);
}
.m7-bonus__chunk {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 9px 0;
  align-items: baseline;
}
.m7-bonus__chunk + .m7-bonus__chunk {
  border-top: 1px solid rgba(248, 247, 244, 0.08);
}
@media(max-width:480px){
  .m7-bonus__chunk {
    grid-template-columns: 72px 1fr;
    gap: 10px;
  }
}
.m7-bonus__pattern {
  font-family: var(--mono), 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255, 168, 0, 0.08);
  border: 1px solid rgba(255, 168, 0, 0.22);
  border-radius: 6px;
  padding: 3px 8px;
  text-align: center;
  line-height: 1.2;
}
.m7-bonus__words {
  font-family: var(--mono), 'Courier New', monospace;
  font-size: 0.82rem;
  color: rgba(248, 247, 244, 0.88);
  line-height: 1.7;
}
.m7-bonus__footer {
  font-family: 'Lora', serif;
  font-size: 0.82rem;
  font-style: italic;
  color: rgba(248, 247, 244, 0.7);
  border-top: 1px dashed rgba(255, 168, 0, 0.25);
  padding-top: 14px;
  margin-top: 18px;
  line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 1 — PHONEME COUNT TOOL (Sound Count)
   Word transformation: flat word → coloured pieces + sign + pieces → = word
   ══════════════════════════════════════════════════════════════════ */

.phcount-body {
  padding: 20px 18px 24px;
}

/* Stage — holds the word + the prompt */
.phcount-stage {
  text-align: center;
  margin-bottom: 24px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px; /* room for 🔊 hints below the word groups */
}

/* The word container.
   Initial state: letter groups flush together, + signs invisible,
   neutral font colour. It reads as one word.
   Revealed state: groups separate, + signs fade in, groups take colour. */
.phcount-word {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: 0;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  transition: gap 0.56s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@media (max-width: 480px) {
  .phcount-word { font-size: 2rem; }
}

.phcount-group {
  display: inline-block;
  padding: 4px 0;
  color: var(--text);
  position: relative;
  transition:
    color 0.52s cubic-bezier(0.2, 0.8, 0.25, 1),
    background 0.52s cubic-bezier(0.2, 0.8, 0.25, 1),
    padding 0.52s cubic-bezier(0.2, 0.8, 0.25, 1),
    transform 0.24s cubic-bezier(0.2, 0.8, 0.25, 1);
  border-radius: 8px;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* Plus signs sit between groups.
   In the initial state they occupy zero physical space (width collapsed,
   overflow hidden) so the word reads as one seamless word: "catch" not "c a tch".
   On reveal they expand to full width with the + character visible. */
.phcount-plus {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-light);
  margin: 0;
  opacity: 0;
  width: 0;
  max-width: 0;
  overflow: hidden;
  transform: scale(0.6);
  transition:
    opacity 0.42s cubic-bezier(0.2, 0.8, 0.25, 1) 0.18s,
    transform 0.42s cubic-bezier(0.2, 0.8, 0.25, 1) 0.18s,
    max-width 0.56s cubic-bezier(0.2, 0.8, 0.25, 1),
    margin 0.56s cubic-bezier(0.2, 0.8, 0.25, 1);
  display: inline-block;
  align-self: center;
  white-space: nowrap;
}

/* ── REVEALED STATE ──
   Triggered when .phcount--revealed is added to .phcount-word */
.phcount--revealed {
  gap: 6px;
}
.phcount--revealed .phcount-plus {
  opacity: 1;
  transform: scale(1);
  max-width: 24px;
  margin: 0 4px;
}

/* Tappable state — groups become interactive */
.phcount--revealed .phcount-group {
  cursor: pointer;
  padding: 6px 10px;
}
.phcount--revealed .phcount-group:hover {
  transform: translateY(-2px);
}
.phcount--revealed .phcount-group:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* Colour by type — applied only in revealed state so the initial word
   reads neutral. */
.phcount--revealed .phcount-group[data-type="cons"] {
  color: #64748B;
}
.phcount--revealed .phcount-group[data-type="cons-multi"] {
  color: var(--teal-dark);
  background: rgba(59, 188, 184, 0.1);
}
.phcount--revealed .phcount-group[data-type="vowel"] {
  color: var(--coral);
  background: rgba(255, 107, 68, 0.08);
}

/* Tapped indicator — small dot under the group (replaces the speaker hint) */
.phcount--revealed .phcount-group.phcount-group--tapped::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.7;
}

/* Speaker hint — 🔊 below each group, visible until the group is tapped.
   This is the "tap me" affordance that makes the pieces feel interactive. */
.phcount--revealed .phcount-group:not(.phcount-group--tapped)::before {
  content: '\1F50A';  /* 🔊 */
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  opacity: 0;
  animation: phcount-speaker-appear 0.4s cubic-bezier(0.2, 0.8, 0.25, 1) 0.56s forwards,
             phcount-speaker-pulse 1.8s ease-in-out 1s infinite;
  pointer-events: none;
}
@keyframes phcount-speaker-appear {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  100% { opacity: 0.75; transform: translateX(-50%) translateY(0); }
}
@keyframes phcount-speaker-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.95; }
}

/* Tap pulse animation */
@keyframes phcount-tap-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.phcount-group--pulse {
  animation: phcount-tap-pulse 0.38s cubic-bezier(0.2, 0.8, 0.25, 1);
}

/* Equation payoff — "= ship" appended after all groups tapped */
.phcount-equation {
  display: inline-flex;
  align-items: baseline;
  opacity: 0;
  transform: translateX(-6px);
  animation: phcount-equation-in 0.58s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
  margin-left: 6px;
}
.phcount-eq-sign {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-light);
  margin-right: 8px;
}
.phcount-eq-word {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: var(--teal-dark);
}

/* Whole-word speaker button — tap to hear the word said together */
.phcount-eq-speaker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 10px;
  border-radius: 50%;
  background: var(--teal-pale);
  border: 1.5px solid var(--teal-border);
  color: var(--teal-dark);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.25, 1),
              background 0.2s ease,
              border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  align-self: center;
  animation: phcount-speaker-in 0.5s cubic-bezier(0.2, 0.8, 0.25, 1) 0.3s both;
}
.phcount-eq-speaker:hover {
  background: white;
  border-color: var(--teal);
  transform: translateY(-1px);
}
.phcount-eq-speaker:active {
  transform: translateY(0) scale(0.95);
}
@keyframes phcount-speaker-in {
  0%   { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes phcount-speaker-tap-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); background: white; }
  100% { transform: scale(1); }
}
.phcount-eq-speaker--pulse {
  animation: phcount-speaker-tap-pulse 0.4s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes phcount-equation-in {
  0%   { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* Prompt — "How many sounds?" */
.phcount-prompt {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.86rem;
  color: var(--text-light);
  min-height: 22px;
  transition: opacity 0.3s ease;
}

/* Option buttons 2 / 3 / 4 / 5 */
.phcount-options {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.phcount-optbtn {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--border-mid);
  background: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.phcount-optbtn:hover:not(:disabled) {
  border-color: var(--teal);
  background: var(--teal-pale);
  transform: translateY(-1px);
}
.phcount-optbtn:disabled {
  cursor: default;
  opacity: 0.55;
}
.phcount-optbtn--correct {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
  color: white !important;
  opacity: 1 !important;
}
.phcount-optbtn--wrong {
  background: var(--coral) !important;
  border-color: var(--coral) !important;
  color: white !important;
  opacity: 1 !important;
}
.phcount-optbtn--reveal {
  background: white !important;
  border-color: var(--teal) !important;
  color: var(--teal-dark) !important;
  opacity: 1 !important;
  box-shadow: 0 0 0 2px rgba(59, 188, 184, 0.2);
}

/* Feedback line */
.phcount-feedback {
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
  min-height: 44px;
  color: var(--text-mid);
  padding: 0 8px;
  opacity: 0;
  transition: opacity 0.32s ease;
}
.phcount-feedback--correct,
.phcount-feedback--wrong {
  opacity: 1;
}
.phcount-feedback--correct { color: var(--teal-dark); }
.phcount-feedback--wrong   { color: var(--coral); }

/* Helper text below everything */
.phcount-helper {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-light);
  text-align: center;
  min-height: 18px;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}
.phcount-helper--show {
  opacity: 1;
  transform: translateY(0);
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .phcount-word,
  .phcount-group,
  .phcount-plus,
  .phcount-equation,
  .phcount-feedback,
  .phcount-helper,
  .phcount-optbtn {
    transition: none !important;
    animation: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 6 — IR word-family grouping
   The "tricky trio" has IR as a small learnable set. Visually grouped
   by ending pattern so the family structure is obvious.
   ══════════════════════════════════════════════════════════════════ */
.ir-family {
  margin-bottom: 8px;
}
.ir-family:last-child { margin-bottom: 0; }
.ir-family__label {
  font-family: var(--mono, 'IBM Plex Mono', monospace);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-light);
  margin-bottom: 4px;
  opacity: 0.85;
}
.ir-family__words {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 5 — C/G practice tool
   Soft/hard questions highlight the target letter (C or G) inside
   the full word, rather than showing a blank to fill.
   ══════════════════════════════════════════════════════════════════ */
.cg-target-letter {
  display: inline-block;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--cream-mid);
  color: var(--text);
  transition: background 0.32s cubic-bezier(0.2, 0.8, 0.25, 1),
              color 0.32s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.cg-target-letter--soft {
  background: var(--teal);
  color: white;
}
.cg-target-letter--hard {
  background: var(--coral);
  color: white;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 9 — "Double or Don't Double?" practice tool
   Single-decision-per-word format. Two large buttons. After answer,
   feedback shows the formed word + the 1-1-1 condition breakdown.
   ══════════════════════════════════════════════════════════════════ */
.d11-prompt {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin: 4px 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.d11-base { color: var(--text); }
.d11-plus {
  font-size: 1.4rem;
  color: var(--text-light);
  font-weight: 500;
  margin: 0 4px;
}
.d11-suffix {
  color: var(--gold);
  font-style: italic;
}
.d11-options {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.d11-choice {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 12px;
  border: 1.5px solid var(--border-mid);
  background: white;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease;
  min-width: 130px;
}
.d11-choice:hover:not(:disabled) {
  border-color: var(--teal);
  background: var(--teal-pale);
  color: var(--teal-dark);
  transform: translateY(-1px);
}
.d11-choice:disabled { cursor: default; }
.d11-choice--correct {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  transform: scale(1.04);
}
.d11-choice--wrong {
  background: var(--coral);
  border-color: var(--coral);
  color: white;
  animation: shake 0.32s ease;
}
.d11-choice--dimmed { opacity: 0.45; }

/* Feedback panel: the formed word + condition breakdown */
.d11-fb-header {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin-top: 14px;
  margin-bottom: 4px;
}
.d11-fb-icon {
  font-weight: 700;
  margin-right: 4px;
}
.d11-fb-word {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 700;
}
.d11-doubled-letter {
  color: var(--coral);
  font-weight: 800;
  background: rgba(255, 107, 68, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}
.d11-dropped-e {
  text-decoration: line-through;
  color: var(--text-light);
  opacity: 0.55;
}
.d11-fb-reason {
  font-family: 'Lora', serif;
  font-size: 0.86rem;
  color: var(--text-mid);
  text-align: center;
  margin: 4px 8px 14px;
  line-height: 1.5;
  font-style: italic;
}
.d11-fb-conditions {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 4px;
}
.d11-fb-cond-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 8px;
}
.d11-fb-cond {
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.d11-fb-cond:last-child { margin-bottom: 0; }
.d11-fb-cond-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.d11-fb-cond-icon--yes {
  background: var(--teal);
  color: white;
}
.d11-fb-cond-icon--no {
  background: var(--coral);
  color: white;
}
.d11-fb-cond-icon--info {
  background: var(--cream-mid);
  color: var(--text-light);
  font-style: italic;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 10 — d211 stress hint above the prompt
   Pre-question hint that helps the user identify stress without giving
   away whether to double (vowel team / 2-consonant cases still need
   the user to decide).
   ══════════════════════════════════════════════════════════════════ */
.d211-stress {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.86rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.d211-stress strong {
  font-family: 'DM Mono', 'IBM Plex Mono', monospace;
  font-style: normal;
  color: var(--teal-dark);
  background: var(--teal-pale);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.86rem;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 11 — "Drop the E or Keep It?" — kept-E highlight
   When the answer is "keep E", show the kept E in teal so the user
   can see the letter that stayed (mirror of d11-dropped-e for drops).
   ══════════════════════════════════════════════════════════════════ */
.de-kept-e {
  color: var(--teal-dark);
  font-weight: 800;
  background: var(--teal-pale);
  padding: 0 2px;
  border-radius: 3px;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 12 — Y to I — new-I highlight
   When Y changes to I, show the new I in coral as the visible change
   (mirrors d11-doubled-letter's coral highlight pattern).
   ══════════════════════════════════════════════════════════════════ */
.yti-new-i {
  color: var(--coral);
  font-weight: 800;
  background: rgba(255, 107, 68, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 0 — RULE CHECK QUIZ
   Scoped styles for the 10-question intro quiz. Reuses .d11-prompt,
   .d11-choice, .d11-doubled-letter, .d11-dropped-e, .wt-blank,
   .ho-blank from elsewhere — these styles only cover the quiz-
   specific layout chrome (progress dots, rule badge, clue line,
   feedback panel with Crumbs).
   ══════════════════════════════════════════════════════════════════ */
.sp-quiz-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-bottom: 16px;
}
.sp-quiz-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--border-mid);
  transition: all 0.3s;
}
.sp-quiz-dot.done   { background: var(--teal); }
.sp-quiz-dot.active { background: var(--coral); width: 18px; }

.sp-quiz-rule-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 12px;
}
.sp-quiz-rule-badge {
  display: inline-block;
  background: var(--teal-pale);
  color: var(--teal-dark);
  border: 1px solid var(--teal-border);
  border-radius: 20px;
  padding: 4px 14px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sp-quiz-clue {
  text-align: center;
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin: 0 0 14px;
}

/* Prompt sizing — slightly tighter than the default d11-prompt
   so it fits well inside mod-0's 16px tool-body padding. */
.sp-quiz-prompt {
  font-size: 1.85rem;
  margin: 4px 0 14px;
}

.sp-quiz-sound-chip {
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-pale);
  border: 1px solid var(--teal-border);
  border-radius: 16px;
  padding: 4px 12px;
  display: inline-block;
  margin: 0 auto 14px;
  /* Center the chip even though it's inline-block */
}
.sp-quiz-prompt + .sp-quiz-sound-chip {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Fixed-width blank slot for fill-blank questions.
   Width is the SAME for every question regardless of answer length —
   so showing 2-letter "ck" vs 4-letter "tion" doesn't leak the answer.
   Sized to comfortably hold the longest answer (4 chars) at the
   .d11-prompt font size. */
.sp-quiz-blank-slot {
  display: inline-block;
  min-width: 3.6ch;
  padding: 0 6px;
  margin: 0 2px;
  border-bottom: 2.5px solid var(--teal-border);
  color: var(--text-light);
  text-align: center;
  vertical-align: baseline;
  letter-spacing: 1px;
  transition: color 0.2s, border-color 0.2s;
  animation: wt-blank-pulse 2.2s ease-in-out infinite;
}
.sp-quiz-blank-slot.sp-quiz-blank--correct {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
  animation: wt-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  font-weight: 700;
}
.sp-quiz-blank-slot.sp-quiz-blank--wrong {
  color: var(--coral);
  border-bottom-color: var(--coral);
  animation: wt-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  font-weight: 700;
}

/* Fixed-width blank inside sentence prompts (homophones).
   Same principle — slot width doesn't reveal whether the answer is
   "their" (5) vs "they're" (7). Sized for the longest plausible
   homophone at the .sp-quiz-sentence font size. */
.sp-quiz-sentence-blank {
  display: inline-block;
  min-width: 6.5ch;
  padding: 0 8px;
  margin: 0 2px;
  border-bottom: 2.5px solid var(--teal-border);
  color: var(--text-light);
  text-align: center;
  vertical-align: baseline;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  transition: color 0.2s, border-color 0.2s;
  animation: wt-blank-pulse 2.2s ease-in-out infinite;
}
.sp-quiz-sentence-blank.sp-quiz-blank--correct {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
  animation: wt-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.sp-quiz-sentence-blank.sp-quiz-blank--wrong {
  color: var(--coral);
  border-bottom-color: var(--coral);
  animation: wt-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.sp-quiz-sentence {
  text-align: center;
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.7;
  margin: 4px 0 16px;
  padding: 0 4px;
}

.sp-quiz-letter-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 4px 0 14px;
  flex-wrap: wrap;
}
.sp-quiz-letter-chip {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  background: white;
  border: 2px solid var(--border-mid);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 42px;
  text-align: center;
  text-transform: lowercase;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.sp-quiz-letter-chip:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal-dark);
  transform: translateY(-1px);
}
.sp-quiz-letter-chip:disabled {
  cursor: default;
}
.sp-quiz-letter-chip--silent {
  background: var(--coral);
  border-color: var(--coral);
  color: white;
  transform: scale(1.05);
}
.sp-quiz-letter-chip--wrong {
  background: var(--cream-mid);
  border-color: var(--coral);
  color: var(--coral);
  animation: shake 0.32s ease;
}
.sp-quiz-letter-chip--dimmed {
  opacity: 0.4;
}

.sp-quiz-options {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 6px 0 4px;
}
.sp-quiz-choice {
  /* Inherits .d11-choice base styling. Slight padding/font tweak so
     longer labels like "Don't double" / "Change Y to I" fit comfortably
     on a phone without wrapping awkwardly. */
  font-size: 1rem;
  padding: 10px 18px;
  min-width: 110px;
}

.sp-quiz-feedback {
  margin-top: 16px;
  min-height: 20px;
}
.sp-quiz-fb {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.sp-quiz-reaction {
  width: clamp(48px, 9vw, 64px);
  height: auto;
  flex-shrink: 0;
  margin-top: 2px;
  animation: sp-quiz-reaction-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sp-quiz-reaction-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}
.sp-quiz-fb-body {
  flex: 1;
  min-width: 0;
}
.sp-quiz-fb-header {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4;
}
.sp-quiz-fb-header .d11-fb-icon {
  font-weight: 900;
  margin-right: 2px;
}
.sp-quiz-fb-header .d11-fb-word {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: var(--text);
}
.sp-quiz-fb-reason {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.55;
}
.sp-quiz-next-row {
  text-align: center;
  margin-top: 14px;
}

/* ══════════════════════════════════════════════════════════════════
   PLURAL RULE CARD — Module 13
   Dense, glance-readable rule statement. Each row is a complete
   teaching unit: condition \u2192 action \u2192 examples. Replaces the older
   pattern of separate rule-box + contrast cards + bonus card.
   ══════════════════════════════════════════════════════════════════ */
.rule-card {
  background: white;
  border: 1.5px solid var(--border-mid);
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 16px 0 24px;
}
.rule-card__header {
  background: var(--teal-pale);
  border-bottom: 1.5px solid var(--teal-border);
  padding: 10px 18px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-dark);
}
.rule-card__rows {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(120px, 0.9fr) minmax(0, 2fr);
  gap: 0;
}
.rule-card__row {
  display: contents;
}
.rule-card__row > * {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.rule-card__row:last-child > * {
  border-bottom: none;
}
.rule-card__condition {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  border-right: 1px solid var(--border);
  background: var(--cream-light, #FDFBF7);
  flex-wrap: wrap;
}
.rule-card__condition small {
  display: block;
  width: 100%;
  font-size: 0.7rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-light);
  margin-top: 3px;
  font-family: 'Lora', serif;
}
.rule-card__action {
  border-right: 1px solid var(--border);
  justify-content: center;
}
.rule-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1.5px solid var(--coral);
  color: var(--coral);
  border-radius: 999px;
  padding: 5px 13px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.rule-card__chip-arrow {
  color: var(--text-light);
  font-size: 0.78rem;
  font-weight: 400;
}
.rule-card__examples {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--text-mid);
  line-height: 1.7;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.rule-card__examples b {
  color: var(--coral);
  font-weight: 700;
}

/* Mobile: stack each row's three cells vertically */
@media (max-width: 600px) {
  .rule-card__rows {
    grid-template-columns: 1fr;
  }
  .rule-card__row > * {
    border-right: none !important;
    padding: 10px 16px;
  }
  .rule-card__condition {
    background: var(--cream-light, #FDFBF7);
    padding-bottom: 4px;
  }
  .rule-card__action {
    justify-content: flex-start;
    padding-top: 4px;
    padding-bottom: 4px;
    border-bottom: none !important;
  }
  .rule-card__examples {
    padding-top: 4px;
  }
  .rule-card__row > .rule-card__examples {
    border-bottom: 1px solid var(--border);
  }
  .rule-card__row:last-child > .rule-card__examples {
    border-bottom: none;
  }
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 13 — plural tool: highlight the added suffix
   When the answer is "+ S" or "+ ES", show the suffix in coral
   so the user sees what was appended.
   ══════════════════════════════════════════════════════════════════ */
.pl-suffix-add {
  color: var(--coral);
  font-weight: 800;
  background: rgba(255, 107, 68, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}

/* ══════════════════════════════════════════════════════════════════
   RULE CARD — audio row variant (Module 14)
   The condition cell can be made tappable to play a sound. The phoneme
   sits prominently with a small 🔊 hint so the user knows it plays.
   ══════════════════════════════════════════════════════════════════ */
.rule-card__condition--audio {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: background 0.18s ease;
}
.rule-card__condition--audio:hover {
  background: var(--cream-mid);
}
.rule-card__phoneme {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rule-card__phoneme small {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-pale);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}
.rule-card__row--coral .rule-card__phoneme,
.rule-card__row--coral .rule-card__phoneme small {
  color: var(--coral);
  background: rgba(255, 107, 68, 0.1);
}
.rule-card__row--coral .rule-card__chip {
  border-color: var(--coral);
  color: var(--coral);
}
.rule-card__cond-trigger {
  font-size: 0.72rem;
  color: var(--text-light);
  font-style: italic;
  font-family: 'Lora', serif;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   VOICED / UNVOICED — compact inline reference (Module 14)
   Replaces the older toggle-based bonus card.
   ══════════════════════════════════════════════════════════════════ */
.vu-inline {
  background: var(--cream-light, #FDFBF7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 18px 0;
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.65;
}
.vu-inline strong {
  color: var(--text);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
}
.vu-inline em {
  font-style: italic;
  color: var(--text-light);
}
.vu-test {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.vu-test__chip {
  background: white;
  border: 1.5px solid var(--border-mid);
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.vu-test__chip:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
  color: var(--teal-dark);
}
.vu-test__chip--voiced {
  border-color: var(--teal-border);
  color: var(--teal-dark);
  background: var(--teal-pale);
}
.vu-test__chip--unvoiced {
  border-color: rgba(255, 107, 68, 0.35);
  color: var(--coral);
  background: rgba(255, 107, 68, 0.06);
}
.vu-test__chip-icon {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 2 — "Hear it, spell it" play button
   Big, tappable, mobile-friendly. Auto-plays on word change but the
   user can also tap to replay.
   ══════════════════════════════════════════════════════════════════ */
.flo-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 2.5px solid var(--teal);
  color: var(--teal-dark);
  border-radius: 14px;
  padding: 16px 28px 16px 24px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(59, 188, 184, 0.15);
}
.flo-play-btn:hover {
  background: var(--teal-pale);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 188, 184, 0.25);
}
.flo-play-btn:active {
  transform: translateY(0);
  background: var(--teal-pale);
}
.flo-play-icon {
  font-size: 1.4rem;
  color: var(--teal);
}
.flo-play-label {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* Spelling choice buttons — slightly bigger than default d11-choice
   because they're the centerpiece of the tool */
.flo-spelling-choice {
  font-size: 1.4rem;
  min-width: 110px;
  padding: 14px 22px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 1 — "How Many Sounds?"
   ══════════════════════════════════════════════════════════════════ */

/* Prompt layout — play button next to the visible word */
.pc-prompt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pc-word-display {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  line-height: 1;
}
.pc-question-text {
  text-align: center;
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

/* Count buttons — wider than default d11-choice */
.pc-count-choice {
  font-size: 1.5rem;
  min-width: 60px;
  padding: 12px 18px;
  font-weight: 700;
}

/* ── Phoneme chips — the centerpiece of the feedback ── */
.pc-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 12px;
  padding: 14px 12px;
  background: var(--cream-light, #FDFBF7);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.pc-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px 6px;
  background: white;
  border: 1.5px solid var(--border-mid);
  border-radius: 10px;
  min-width: 48px;
  position: relative;
}
.pc-chip-num {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1;
}
.pc-chip-letter {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.pc-chip-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
  line-height: 1;
}

/* Single-letter (1:1) chip — neutral teal accent */
.pc-chip--single {
  border-color: var(--teal-border);
}
.pc-chip--single .pc-chip-letter {
  color: var(--teal-dark);
}

/* Digraph chip — coral accent (2 letters, 1 sound) */
.pc-chip--digraph {
  border-color: var(--coral);
  background: rgba(255, 107, 68, 0.06);
}
.pc-chip--digraph .pc-chip-letter {
  color: var(--coral);
}
.pc-chip--digraph .pc-chip-label {
  color: var(--coral);
}

/* Trigraph chip — gold accent (3 letters, 1 sound) */
.pc-chip--trigraph {
  border-color: rgba(245, 158, 11, 0.5);
  background: #FFFBEB;
}
.pc-chip--trigraph .pc-chip-letter {
  color: #B45309;
}
.pc-chip--trigraph .pc-chip-label {
  color: #B45309;
}

/* Silent letter — greyed, no number, struck through */
.pc-chip--silent {
  border-color: var(--border);
  background: var(--cream-mid);
  opacity: 0.7;
}
.pc-chip--silent .pc-chip-letter {
  color: var(--text-light);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  font-size: 1.15rem;
}
.pc-chip--silent .pc-chip-label {
  color: var(--text-light);
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 16 — "Spot the Silent Letter"
   Tappable letter chips for the word display + silent-letter
   strikethrough in feedback.
   ══════════════════════════════════════════════════════════════════ */

.sl-question {
  text-align: center;
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.sl-word-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* Each tappable letter — like a Scrabble tile but proper d11 styling */
.sl-letter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 52px;
  padding: 8px 12px;
  background: white;
  border: 2px solid var(--border-mid);
  border-radius: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  text-transform: lowercase;
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.sl-letter-chip:hover:not(:disabled) {
  border-color: var(--teal);
  background: var(--teal-pale);
  transform: translateY(-1px);
}
.sl-letter-chip:active:not(:disabled) {
  transform: translateY(0);
}
.sl-letter-chip:disabled {
  cursor: default;
  pointer-events: none;
}

/* Correct tap (or actual silent letter if user got it wrong) */
.sl-letter-chip--correct {
  background: var(--teal-pale);
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}

/* Wrong tap */
.sl-letter-chip--wrong {
  background: rgba(255, 107, 68, 0.1);
  border-color: var(--coral);
  color: var(--coral);
}

/* Other letters (faded after answer) */
.sl-letter-chip--dimmed {
  opacity: 0.45;
}

/* In feedback, the silent letter appears struck-through in coral */
.sl-silent-mark {
  color: var(--coral);
  text-decoration: line-through;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 15 — "Same Sound, Choose Right"
   Sentence display with a styled blank that fills in after answer.
   ══════════════════════════════════════════════════════════════════ */

.ho-sentence {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  color: var(--text);
  text-align: center;
  line-height: 1.7;
  padding: 14px 8px;
  margin-bottom: 4px;
}

/* The blank that gets filled after answering */
.ho-blank {
  display: inline-block;
  min-width: 80px;
  padding: 2px 8px;
  margin: 0 2px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: var(--text-light);
  background: var(--cream-mid);
  border-bottom: 2px solid var(--text-light);
  border-radius: 4px 4px 0 0;
  transition: all 0.25s ease;
}

/* After correct answer */
.ho-blank--filled {
  color: var(--teal-dark);
  background: var(--teal-pale);
  border-bottom-color: var(--teal-dark);
}

/* After wrong answer — still shows the right word, but in coral so it's clear */
.ho-blank--was-wrong {
  color: var(--coral);
  background: rgba(255, 107, 68, 0.08);
  border-bottom-color: var(--coral);
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 20 — "Which Vowel Is Hiding?" (Schwa)
   Hint shown above the prompt + blank that fills with chosen vowel.
   ══════════════════════════════════════════════════════════════════ */

/* Strategy hint — shown BEFORE the user answers, teaches the strategy in action */
.sw-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #FFFBEB;
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  text-align: center;
}
.sw-hint-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* The blank that fills with the chosen vowel after answering */
.sw-blank {
  display: inline-block;
  min-width: 36px;
  padding: 0 6px;
  margin: 0 2px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-light);
  background: var(--cream-mid);
  border-bottom: 2.5px solid var(--text-light);
  text-align: center;
  border-radius: 4px 4px 0 0;
  transition: all 0.22s ease;
}
.sw-blank--correct {
  color: var(--coral);
  background: rgba(255, 107, 68, 0.08);
  border-bottom-color: var(--coral);
}
.sw-blank--was-wrong {
  color: var(--coral);
  background: rgba(255, 107, 68, 0.08);
  border-bottom-color: var(--coral);
}

/* Vowel buttons — slightly larger, single-character */
.sw-vowel-choice {
  font-size: 1.5rem;
  min-width: 56px;
  padding: 12px 18px;
  text-transform: lowercase;
}

/* In feedback, the hidden schwa vowel appears highlighted in coral */
.sw-schwa-mark {
  color: var(--coral);
  font-weight: 700;
  background: rgba(255, 107, 68, 0.1);
  padding: 0 3px;
  border-radius: 3px;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 21 — V/J rule tool
   The blank that fills with the chosen ending after answering.
   Inline with the prompt text — completes the visual word.
   ══════════════════════════════════════════════════════════════════ */

.vj-blank {
  display: inline-block;
  min-width: 60px;
  padding: 0 6px;
  margin: 0 2px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-light);
  background: var(--cream-mid);
  border-bottom: 2.5px solid var(--text-light);
  text-align: center;
  border-radius: 4px 4px 0 0;
  text-transform: lowercase;
  vertical-align: baseline;
  line-height: 1.1;
  transition: all 0.22s ease;
}
.vj-blank--correct {
  color: var(--teal-dark);
  background: var(--teal-pale);
  border-bottom-color: var(--teal-dark);
}
.vj-blank--was-wrong {
  color: var(--coral);
  background: rgba(255, 107, 68, 0.08);
  border-bottom-color: var(--coral);
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 22 — Spelling Detective
   Misspelled word with wavy strikethrough + rule-pick buttons that
   wrap to multiple lines (full-sentence rule labels).
   ══════════════════════════════════════════════════════════════════ */

/* The misspelled word — wavy red underline like spell-check (legible, not strikethrough) */
.det-wrong-word {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: 1px;
  text-decoration: underline wavy var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  padding: 12px 0 16px;
}

/* Rule-pick buttons — full width, vertically stacked, left-aligned text */
.det-rule-choice {
  text-align: left !important;
  width: 100%;
  font-size: 0.9rem !important;
  padding: 12px 16px !important;
  white-space: normal !important;
  line-height: 1.4;
  min-height: auto;
}

/* Stack the 4 rule-pick buttons vertically with spacing */
#det-options.d11-options {
  flex-direction: column;
  gap: 8px;
}

/* In feedback: "wrong → right" with strikethrough on the wrong word */
.det-fix {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Fredoka', sans-serif;
}
.det-fix-wrong {
  color: var(--coral);
  text-decoration: line-through;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 1.5px;
}
.det-fix-right {
  color: var(--teal-dark);
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════
   MODULE 23 — "British or American?"
   Flag-button pair (UK/US) + states, plus progress-dot wrap
   for the 32-word set.
   ══════════════════════════════════════════════════════════════════ */

/* Flag button pair container */
.bva-flag-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
}
.bva-flag-row .bva-flag-btn {
  flex: 1;
  max-width: 220px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border-mid);
  background: white;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.bva-flag-row .bva-flag-btn:hover:not(:disabled) {
  border-color: var(--teal);
  background: var(--teal-pale);
  transform: translateY(-1px);
}
.bva-flag-row .bva-flag-btn:disabled {
  cursor: default;
}

/* Flag button states after answer */
.bva-flag-btn--correct {
  background: var(--teal-pale) !important;
  border-color: var(--teal-dark) !important;
  color: var(--teal-dark) !important;
}
.bva-flag-btn--wrong {
  background: rgba(255, 107, 68, 0.1) !important;
  border-color: var(--coral) !important;
  color: var(--coral) !important;
}
.bva-flag-btn--dimmed {
  opacity: 0.45;
}

/* The word being asked about */
.bva-target-word {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.5px;
  padding: 6px 0;
}
.bva-pattern-label {
  font-size: 0.78rem;
  color: var(--text-light);
  font-family: 'Lora', serif;
  font-style: italic;
  text-align: center;
  margin-top: 4px;
}

/* For long word lists (32 items in M23), let progress dots wrap */
.tool-wrap.tool-wrap--long-set .rc-practice-progress__dots {
  flex-wrap: wrap;
  row-gap: 4px;
}

/* ══════════════════════════════════════════════════════════════════
   1-1-1 / 2-1-1 CHECKLIST — mobile responsive fix (mod-9, mod-10)
   The 4-row checklist grids in mod-9 and mod-10 use inline-style
   grid-template-columns: 54px 1fr 220px. On narrow viewports the
   220px right column ("if NO → don't double") squeezes the middle
   question text into a strip that wraps every 1-2 words.
   This @media rule:
     • Drops the right column on mobile (info repeats 4× anyway, and
       the green "All 4 YES → DOUBLE" footer makes the implied
       "any NO = don't double" message clear)
     • Tightens the row padding/gap for mobile breathing room
   No HTML changes needed — attribute selector targets the inline style.
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  div[style*="grid-template-columns:54px 1fr 220px"] {
    grid-template-columns: 42px 1fr !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    gap: 10px !important;
  }
  div[style*="grid-template-columns:54px 1fr 220px"] > div:nth-child(3) {
    display: none;
  }
}
