    /* Mathematics landing — scoped styles (matematica-*). Mirrors promotion-ingles.css
       structure but uses a math-forward palette (deep violet to teal + gold accent). */
    .matematica-hero {
        background: linear-gradient(135deg, #8754A1 0%, #4BC6BD 100%);
        position: relative;
        overflow: hidden;
    }
    .matematica-hero::before {
        content: '';
        position: absolute;
        top: -50px; right: -50px;
        width: 300px; height: 300px;
        background: radial-gradient(circle, rgba(255,255,255,0.15), transparent);
        border-radius: 50%;
    }
    .matematica-hero::after {
        content: '';
        position: absolute;
        bottom: -80px; left: -80px;
        width: 400px; height: 400px;
        background: radial-gradient(circle, rgba(250,176,59,0.18), transparent);
        border-radius: 50%;
    }
    /* Decorative math glyphs floating in hero (CSS only, no JS) — keeps the hero
       distinct from the ingles one without adding noise. */
    .matematica-hero-glyphs {
        position: absolute;
        inset: 0;
        pointer-events: none;
        overflow: hidden;
    }
    .matematica-hero-glyphs span {
        position: absolute;
        color: rgba(255,255,255,0.13);
        font-family: 'Nunito', sans-serif;
        font-weight: 900;
        animation: mg-float 12s ease-in-out infinite;
    }
    .matematica-hero-glyphs span:nth-child(1) { top: 12%; left: 6%;  font-size: 3.8rem; animation-delay: 0s;   }
    .matematica-hero-glyphs span:nth-child(2) { top: 70%; left: 10%; font-size: 2.6rem; animation-delay: 2s;   }
    .matematica-hero-glyphs span:nth-child(3) { top: 22%; left: 85%; font-size: 3.2rem; animation-delay: 4s;   }
    .matematica-hero-glyphs span:nth-child(4) { top: 78%; left: 88%; font-size: 2.2rem; animation-delay: 6s;   }
    .matematica-hero-glyphs span:nth-child(5) { top: 45%; left: 48%; font-size: 4rem;   animation-delay: 1.5s; }
    @keyframes mg-float {
        0%, 100% { transform: translateY(0) rotate(-4deg); }
        50%      { transform: translateY(-18px) rotate(4deg); }
    }

    .typed-word {
        display: inline-block;
        min-height: 1.2em;
        min-width: 1ch;
    }

    /* Axis pillar cards (Numbers, Algebra, Geometry, Data) */
    .axis-card {
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        cursor: default;
    }
    .axis-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.12) !important;
    }
    .axis-icon {
        width: 70px; height: 70px;
        display: inline-flex; align-items: center; justify-content: center;
        border-radius: 50%;
        color: #fff;
    }
    .axis-numbers   { background-color: #4BC6BD; }
    .axis-algebra   { background-color: #8754A1; }
    .axis-geometry  { background-color: #FF5630; }
    .axis-data      { background-color: #FAB03B; }

    .border-top-numbers   { border-top: 4px solid #4BC6BD !important; }
    .border-top-algebra   { border-top: 4px solid #8754A1 !important; }
    .border-top-geometry  { border-top: 4px solid #FF5630 !important; }
    .border-top-data      { border-top: 4px solid #FAB03B !important; }

    /* Demo simulator */
    .demo-simulator-wrapper {
        max-width: 920px;
        margin: 0 auto;
        position: relative;
    }
    .demo-simulator-frame {
        width: 100%;
        aspect-ratio: 4 / 3;
        border: none;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(135, 84, 161, 0.25);
        background: #fff;
    }
    .demo-simulator-badge {
        position: absolute;
        top: -25px; left: 50%;
        transform: translateX(-50%);
        background: #FAB03B;
        color: #fff;
        font-size: 0.85rem;
        font-weight: 700;
        padding: 6px 18px;
        border-radius: 30px;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(250,176,59,0.4);
    }

    /* How it works */
    .how-step {
        position: relative;
        text-align: center;
    }
    .how-step-number {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 90px; height: 90px;
        border-radius: 50%;
        background: linear-gradient(135deg, #8754A1, #4BC6BD);
        color: #fff;
        font-size: 2.4rem;
        font-weight: 900;
        margin-bottom: 1.2rem;
        box-shadow: 0 10px 30px rgba(135,84,161,0.25);
    }

    /* FAQ accordion — <h3> wrapper is structural (SEO heading hierarchy) and must not impose its own styling. */
    .faq-item h3 { margin: 0; padding: 0; font-size: inherit; font-weight: inherit; }
    .faq-item {
        border: 1px solid #e9ecef;
        border-radius: 12px;
        margin-bottom: 12px;
        overflow: hidden;
        transition: box-shadow 0.2s ease;
    }
    .faq-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
    .faq-question {
        width: 100%;
        background: #fff;
        border: none;
        text-align: left;
        padding: 18px 22px;
        font-weight: 700;
        font-size: 1.05rem;
        color: #52617A;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .faq-question[aria-expanded="true"] { color: #8754A1; }
    .faq-question[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
    .faq-chevron { transition: transform 0.2s ease; color: #8754A1; }
    .faq-answer {
        padding: 0 22px 18px 22px;
        color: #576279;
        line-height: 1.7;
        display: none;
    }
    .faq-answer.open { display: block; }

    @media (max-width: 767px) {
        .demo-simulator-frame { aspect-ratio: 3 / 4; }
    }

    /* Math publications cards */
    .matematica-post-card {
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        border-radius: 14px;
        overflow: hidden;
    }
    .matematica-post-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 36px rgba(135, 84, 161, 0.14) !important;
    }
    .matematica-post-img {
        aspect-ratio: 16 / 9;
        object-fit: cover;
        width: 100%;
    }
    .matematica-post-card a { text-decoration: none; }

    /* Accessibility — skip-link is only visible when focused. */
    .matematica-skip-link {
        position: absolute;
        top: -100px;
        left: 0;
        background: #8754A1;
        color: #fff;
        padding: 10px 18px;
        border-radius: 0 0 8px 0;
        z-index: 9999;
        text-decoration: none;
        font-weight: 700;
    }
    .matematica-skip-link:focus {
        top: 0;
        color: #fff;
        text-decoration: none;
    }

    /* FAQ question button: make focus outline visible for keyboard users. */
    .faq-question:focus-visible { outline: 3px solid #FAB03B; outline-offset: -3px; }

    /* "Feels like" card in the Why section — math example with step-by-step trace */
    .math-feel-card {
        background: linear-gradient(180deg, #F8F4FC 0%, #EEF6F5 100%);
        border-radius: 18px;
        padding: 24px 22px;
        box-shadow: 0 20px 50px rgba(135,84,161,0.14);
    }
    .math-feel-title {
        font-size: 0.85rem;
        font-weight: 800;
        color: #8754A1;
        letter-spacing: 1px;
        text-transform: uppercase;
        margin-bottom: 10px;
    }
    .math-feel-problem {
        background: #fff;
        border-radius: 14px;
        padding: 14px 16px;
        font-family: 'Nunito', sans-serif;
        font-weight: 800;
        color: #2D3748;
        font-size: 1.1rem;
        box-shadow: 0 4px 12px rgba(135,84,161,0.08);
        margin-bottom: 14px;
    }
    .math-feel-problem .math-eq {
        display: inline-block;
        background: #F6F0FB;
        color: #8754A1;
        padding: 2px 10px;
        border-radius: 8px;
        margin: 0 4px;
    }
    .math-feel-steps {
        list-style: none;
        padding: 0;
        margin: 0 0 14px 0;
        counter-reset: matfeel;
    }
    .math-feel-steps li {
        counter-increment: matfeel;
        position: relative;
        padding: 8px 10px 8px 38px;
        font-size: 0.92rem;
        color: #52617A;
        line-height: 1.4;
    }
    .math-feel-steps li::before {
        content: counter(matfeel);
        position: absolute;
        left: 8px;
        top: 8px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: linear-gradient(135deg, #8754A1, #4BC6BD);
        color: #fff;
        font-weight: 900;
        font-size: 0.72rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .math-feel-badge {
        display: inline-block;
        padding: 6px 14px;
        background: #E8FAF7;
        color: #16A085;
        border-radius: 20px;
        font-weight: 800;
        font-size: 0.9rem;
    }

    /* =======================================================================
       PRODUCT PROTOTYPE (.proto-*) — interactive in-page mock of the teacher
       dashboard and student workstation. Scoped entirely under .proto-* to
       avoid collisions with the rest of the landing or the global layout.
       ======================================================================= */
    /* Split-view stage — both panels coexist; no macOS frame, no toggle */
    .proto-stage {
        position: relative;
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px 20px 60px 20px;
        perspective: 1400px;
    }
    .proto-glow {
        position: absolute;
        inset: -40px -20px;
        background:
            radial-gradient(ellipse at 30% 45%, rgba(135, 84, 161, 0.20), transparent 55%),
            radial-gradient(ellipse at 75% 60%, rgba(75, 198, 189, 0.18), transparent 55%);
        filter: blur(20px);
        pointer-events: none;
        z-index: 0;
    }
    .proto-panels {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 28px;
    }
    .proto-panel {
        background: #F4F5F9;
        border-radius: 14px;
        overflow: hidden;
        position: relative;
        flex: 0 0 auto;
        transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
        box-shadow:
            0 30px 60px -18px rgba(30, 30, 60, 0.30),
            0 12px 28px -10px rgba(135, 84, 161, 0.18),
            0 2px 6px rgba(0, 0, 0, 0.05);
    }
    /* Fixed natural widths — each panel has enough room for its content to breathe
       as a proper dashboard/workstation (not a phone-shaped card). */
    .proto-panel-teacher {
        width: 560px;
        transform: rotateZ(-1.2deg) translateY(12px);
        transform-origin: right center;
        z-index: 1;
    }
    .proto-panel-student {
        width: 420px;
        transform: rotateZ(1.2deg) translateY(-12px);
        transform-origin: left center;
        z-index: 2;
        margin-left: -20px;
    }
    .proto-stage:hover .proto-panel-teacher,
    .proto-stage:hover .proto-panel-student {
        transform: rotateZ(0deg) translateY(0);
    }

    /* Inside the split-view the sidebars are dropped — each panel is a curated
       hero shot, not a full-app screenshot. Inner layouts are tightened so the
       content looks natural at panel-width (not compressed or phone-like). */
    .proto-panel-teacher .proto-sidebar,
    .proto-panel-student .proto-sidebar-right { display: none; }
    .proto-panel-teacher .proto-teacher { grid-template-columns: 1fr; min-height: 0; }
    .proto-panel-student .proto-student-view { grid-template-columns: 1fr; padding: 22px 20px; }
    .proto-panel-teacher .proto-main { padding: 22px 24px 24px 24px; gap: 18px; }
    .proto-panel-teacher .proto-topbar { margin-bottom: 4px; }
    .proto-panel-teacher .proto-kpi-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .proto-panel-teacher .proto-kpi-card { padding: 12px 14px; }
    .proto-panel-teacher .proto-kpi-label { font-size: 0.7rem; line-height: 1.2; }
    .proto-panel-teacher .proto-kpi-value { font-size: 1.55rem; }
    .proto-panel-teacher .proto-kpi-delta { font-size: 0.7rem; }
    /* Compact student list inside the dashboard card: avatar + name + axis badge */
    .proto-panel-teacher .proto-student { grid-template-columns: 28px 1fr auto; gap: 10px; padding: 7px 8px; }
    .proto-panel-teacher .proto-student-initials { width: 28px; height: 28px; font-size: 0.68rem; }
    .proto-panel-teacher .proto-student-info strong { font-size: 0.86rem; }
    .proto-panel-teacher .proto-student-progress { display: none; }
    .proto-panel-teacher .proto-student-badge { font-size: 0.66rem; padding: 2px 8px; }

    /* Student panel: exercise-centered, no topstrip/chips, alts grid tight */
    .proto-panel-student .proto-topstrip { padding: 14px 18px; }
    .proto-panel-student .proto-xp { width: 140px; }
    .proto-panel-student .proto-exercise { padding: 18px; }
    .proto-panel-student .proto-alts { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .proto-panel-student .proto-alt { padding: 10px 6px; }
    .proto-panel-student .proto-alt-emoji { font-size: 2rem; }
    .proto-panel-student .proto-alt-label { font-size: 0.82rem; }
    .proto-panel-student .proto-character { font-size: 2.4rem; }
    .proto-panel-student .proto-bubble { font-size: 0.88rem; }
    .proto-panel-student .proto-play-btn { width: 44px; height: 44px; }

    /* --- TEACHER VIEW --- */
    .proto-teacher {
        display: grid;
        grid-template-columns: 220px 1fr;
        min-height: 560px;
    }
    .proto-sidebar {
        background: #fff;
        border-right: 1px solid #EEF0F5;
        padding: 18px 14px;
        display: flex;
        flex-direction: column;
    }
    .proto-brand {
        font-family: 'Nunito', sans-serif;
        font-weight: 900;
        color: #8754A1;
        font-size: 1.25rem;
        letter-spacing: -0.5px;
        margin-bottom: 18px;
        padding-left: 4px;
    }
    .proto-brand .proto-brand-accent { color: #4BC6BD; }
    .proto-user {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px;
        background: linear-gradient(135deg, rgba(135,84,161,0.08), rgba(75,198,189,0.08));
        border-radius: 10px;
        margin-bottom: 16px;
    }
    .proto-avatar-circle {
        width: 38px; height: 38px;
        border-radius: 50%;
        background: linear-gradient(135deg, #8754A1, #4BC6BD);
        color: #fff;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    .proto-user-meta { line-height: 1.15; min-width: 0; }
    .proto-user-meta strong { color: #2D3748; font-size: 0.88rem; display: block; }
    .proto-user-meta span { color: #8898AA; font-size: 0.75rem; }
    .proto-nav { list-style: none; padding: 0; margin: 0; flex: 1; }
    .proto-nav li {
        padding: 9px 12px;
        margin-bottom: 3px;
        border-radius: 8px;
        color: #52617A;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: all 0.15s ease;
    }
    .proto-nav li:hover { background: #F6F0FB; color: #8754A1; }
    .proto-nav li.active {
        background: linear-gradient(135deg, #8754A1, #4BC6BD);
        color: #fff;
    }
    .proto-nav li.active:hover { color: #fff; }
    .proto-nav i { width: 16px; text-align: center; }
    .proto-sidebar-footer {
        font-size: 0.72rem;
        color: #B0B7C3;
        padding-top: 12px;
        border-top: 1px solid #EEF0F5;
    }

    .proto-main { padding: 20px 24px; overflow: hidden; }
    .proto-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
    }
    .proto-breadcrumb { font-size: 0.82rem; color: #8898AA; }
    .proto-breadcrumb strong { color: #2D3748; font-weight: 700; }
    .proto-breadcrumb .sep { margin: 0 6px; color: #CBD2D9; }
    .proto-topbar-right { display: flex; align-items: center; gap: 14px; }
    .proto-bell {
        position: relative;
        width: 34px; height: 34px;
        border-radius: 50%;
        background: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #8898AA;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }
    .proto-bell:hover { color: #8754A1; transform: translateY(-1px); }
    .proto-bell-dot {
        position: absolute;
        top: 7px; right: 8px;
        width: 8px; height: 8px;
        background: #FF5630;
        border: 2px solid #fff;
        border-radius: 50%;
    }

    .proto-kpi-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        margin-bottom: 18px;
    }
    .proto-kpi {
        background: #fff;
        border-radius: 12px;
        padding: 14px 16px;
        box-shadow: 0 2px 10px rgba(135,84,161,0.06);
        border-left: 4px solid #8754A1;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .proto-kpi:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 22px rgba(135,84,161,0.12);
    }
    .proto-kpi.accent-teal { border-left-color: #4BC6BD; }
    .proto-kpi.accent-orange { border-left-color: #FAB03B; }
    .proto-kpi-label { color: #8898AA; font-size: 0.74rem; font-weight: 600; margin-bottom: 4px; }
    .proto-kpi-value {
        font-size: 1.55rem;
        font-weight: 900;
        color: #2D3748;
        line-height: 1.1;
        font-family: 'Nunito', sans-serif;
    }
    .proto-kpi-sub { font-size: 0.72rem; color: #52617A; margin-top: 2px; }
    .proto-kpi-sub .up { color: #4BC6BD; font-weight: 700; }
    .proto-kpi-sub .down { color: #FF5630; font-weight: 700; }
    .proto-kpi-cta {
        margin-top: 10px;
        border: none;
        background: linear-gradient(135deg, #8754A1, #4BC6BD);
        color: #fff;
        font-size: 0.72rem;
        font-weight: 800;
        padding: 6px 14px;
        border-radius: 20px;
        cursor: pointer;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(135, 84, 161, 0.22);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .proto-kpi-cta:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(135, 84, 161, 0.3);
    }

    /* Topic difficulty rows — readable list with icon + title + action at the right */
    .proto-topic-row {
        display: grid;
        grid-template-columns: 36px 1fr auto;
        align-items: center;
        gap: 12px;
        padding: 10px 8px;
        border-radius: 10px;
        transition: background 0.15s ease;
    }
    .proto-topic-row + .proto-topic-row {
        margin-top: 4px;
        border-top: 1px solid #F3F4F8;
        padding-top: 14px;
    }
    .proto-topic-row:hover { background: #FAFBFD; }
    .proto-topic-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.92rem;
        flex-shrink: 0;
    }
    .proto-topic-body { min-width: 0; }
    .proto-topic-body strong {
        display: block;
        font-size: 0.88rem;
        color: #2D3748;
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 2px;
    }
    .proto-topic-body span { font-size: 0.72rem; color: #8898AA; }
    .proto-topic-cta {
        border: 1px solid #E0D5EA;
        background: #fff;
        color: #8754A1;
        font-size: 0.7rem;
        font-weight: 800;
        padding: 6px 12px;
        border-radius: 20px;
        cursor: pointer;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, gap 0.18s ease, padding 0.18s ease;
    }
    .proto-topic-cta::after {
        content: '→';
        font-weight: 900;
        font-size: 0.85rem;
        opacity: 0;
        max-width: 0;
        overflow: hidden;
        transition: opacity 0.18s ease, max-width 0.18s ease;
    }
    .proto-topic-cta:hover,
    .proto-topic-row:hover .proto-topic-cta {
        background: #8754A1;
        border-color: #8754A1;
        color: #fff;
        padding-right: 14px;
    }
    .proto-topic-cta:hover::after,
    .proto-topic-row:hover .proto-topic-cta::after {
        opacity: 1;
        max-width: 14px;
    }

    /* Urgency pill inside KPI — makes "2 urgentes" pop without dominating */
    .proto-kpi-urgent {
        display: inline-block;
        font-size: 0.68rem;
        font-weight: 800;
        color: #C24919;
        background: #FFEBE3;
        padding: 2px 8px;
        border-radius: 10px;
        margin-left: 6px;
        vertical-align: middle;
        letter-spacing: 0.2px;
    }


    /* Trust-signals chip row above the stage (curriculum, offline guides, parent reports) */
    .proto-meta-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin: 0 auto 24px auto;
        max-width: 960px;
    }
    .proto-meta-chip {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #fff;
        border: 1px solid #EEE9F5;
        color: #52617A;
        font-size: 0.82rem;
        font-weight: 700;
        padding: 8px 16px;
        border-radius: 30px;
        box-shadow: 0 2px 8px rgba(135,84,161,0.06);
    }
    .proto-meta-chip i { color: #8754A1; }

    /* Text-only alternative card (no emoji) — for numeric answers */
    .proto-alt-word {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 60px;
        font-family: 'Nunito', sans-serif;
        font-weight: 900;
        font-size: 1.15rem;
        color: #2D3748;
        letter-spacing: 0.3px;
    }
    .proto-alt-word .proto-alt-label { font-size: inherit; color: inherit; }

    /* Inner teacher sub-grid (stacks cards vertically so topics get full panel width) */
    .proto-subgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
    .proto-card {
        background: #fff;
        border-radius: 12px;
        padding: 16px 18px;
        box-shadow: 0 2px 10px rgba(135, 84, 161, 0.06);
    }
    .proto-card-title {
        font-size: 0.92rem;
        font-weight: 800;
        color: #2D3748;
        margin-bottom: 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    .proto-card-title .proto-card-tag {
        font-size: 0.68rem;
        background: #F2EEF7;
        color: #8754A1;
        padding: 3px 10px;
        border-radius: 12px;
        font-weight: 700;
        white-space: nowrap;
    }

    .proto-students { list-style: none; padding: 0; margin: 0; }
    .proto-student {
        display: grid;
        grid-template-columns: 34px 1fr auto;
        align-items: center;
        gap: 10px;
        padding: 8px 6px;
        border-bottom: 1px solid #F3F4F8;
        transition: background 0.15s ease;
        cursor: pointer;
    }
    .proto-student:last-child { border-bottom: none; }
    .proto-student:hover { background: #FAFAFE; }
    .proto-student-initials {
        width: 34px; height: 34px;
        border-radius: 50%;
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 0.82rem;
    }
    .proto-student-info { min-width: 0; }
    .proto-student-info strong { display: block; font-size: 0.88rem; color: #2D3748; font-weight: 700; }
    .proto-student-progress {
        height: 4px;
        background: #F0F2F7;
        border-radius: 3px;
        margin-top: 4px;
        overflow: hidden;
    }
    .proto-student-progress > div {
        height: 100%;
        background: linear-gradient(90deg, #4BC6BD, #8754A1);
    }
    .proto-student-badge {
        font-size: 0.68rem;
        padding: 3px 9px;
        border-radius: 10px;
        font-weight: 700;
        color: #fff;
        white-space: nowrap;
    }
    /* Math-axis badges replace listen/speak/read/write — each with a clear color */
    .proto-badge-numbers   { background: #4BC6BD; }
    .proto-badge-algebra   { background: #8754A1; }
    .proto-badge-geometry  { background: #FF5630; }
    .proto-badge-data      { background: #FAB03B; }

    /* --- STUDENT VIEW --- */
    .proto-student-view {
        background: linear-gradient(180deg, #FDFBFF 0%, #EEF6F5 100%);
        min-height: 560px;
        padding: 16px 20px 20px 20px;
        display: grid;
        grid-template-columns: 1fr 240px;
        gap: 16px;
    }
    .proto-student-main { display: flex; flex-direction: column; }
    .proto-topstrip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #fff;
        border-radius: 14px;
        padding: 10px 14px;
        box-shadow: 0 2px 8px rgba(135,84,161,0.08);
        margin-bottom: 14px;
    }
    .proto-player { display: flex; align-items: center; gap: 10px; }
    .proto-player-avatar {
        width: 40px; height: 40px;
        border-radius: 50%;
        background: linear-gradient(135deg, #FAB03B, #FF5630);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        box-shadow: 0 4px 12px rgba(255,86,48,0.25);
    }
    .proto-player-meta strong { color: #2D3748; font-size: 0.92rem; font-weight: 800; display: block; }
    .proto-xp {
        width: 110px;
        height: 6px;
        background: #F0F2F7;
        border-radius: 4px;
        margin-top: 3px;
        overflow: hidden;
    }
    .proto-xp > div {
        height: 100%;
        width: 62%;
        background: linear-gradient(90deg, #8754A1, #4BC6BD);
        border-radius: 4px;
    }
    .proto-chips { display: flex; gap: 8px; }
    .proto-chip {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: #FFF6E7;
        color: #C47C0A;
        font-weight: 800;
        font-size: 0.82rem;
        padding: 5px 11px;
        border-radius: 20px;
    }
    .proto-chip.streak { background: #FFE8E2; color: #E64526; }

    /* Exercise card — the actual math activity */
    .proto-exercise {
        background: #fff;
        border-radius: 16px;
        padding: 18px 20px;
        box-shadow: 0 6px 20px rgba(135,84,161,0.1);
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .proto-exercise-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }
    .proto-exercise-title { font-size: 0.82rem; font-weight: 800; color: #8754A1; letter-spacing: 0.2px; }
    .proto-exercise-counter { font-size: 0.78rem; color: #8898AA; font-weight: 600; }
    .proto-speaker-row {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 12px;
        background: linear-gradient(135deg, #F6F0FB, #E8FAF7);
        border-radius: 14px;
        margin-bottom: 14px;
    }
    .proto-character {
        font-size: 2.8rem;
        line-height: 1;
        flex-shrink: 0;
        animation: proto-bob 2.2s ease-in-out infinite;
    }
    @keyframes proto-bob {
        0%, 100% { transform: translateY(0); }
        50%      { transform: translateY(-4px); }
    }
    .proto-bubble {
        background: #fff;
        border-radius: 14px;
        padding: 10px 14px;
        color: #2D3748;
        font-size: 0.95rem;
        font-weight: 700;
        position: relative;
        flex: 1;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .proto-bubble::before {
        content: '';
        position: absolute;
        left: -7px;
        top: 50%;
        transform: translateY(-50%);
        border: 7px solid transparent;
        border-right-color: #fff;
        border-left: 0;
    }
    .proto-bubble small {
        display: block;
        font-weight: 500;
        color: #8898AA;
        font-size: 0.78rem;
        margin-top: 2px;
    }
    /* Math equation pill inside the bubble — highlights the expression */
    .proto-math-eq {
        display: inline-block;
        background: #F6F0FB;
        color: #8754A1;
        padding: 2px 10px;
        border-radius: 8px;
        font-weight: 900;
        font-size: 1rem;
        letter-spacing: 0.3px;
    }

    .proto-alts {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-bottom: 14px;
    }
    .proto-alt {
        background: #fff;
        border: 2px solid #EEF0F5;
        border-radius: 12px;
        padding: 14px 8px;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s ease;
        user-select: none;
    }
    .proto-alt:hover {
        border-color: #8754A1;
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(135,84,161,0.14);
    }
    .proto-alt-emoji { font-size: 2.2rem; line-height: 1; margin-bottom: 6px; }
    .proto-alt-label { font-size: 0.9rem; font-weight: 800; color: #2D3748; }
    .proto-alt.correct {
        border-color: #4BC6BD;
        background: #E8FAF7;
        animation: proto-shake-ok 0.4s ease;
    }
    .proto-alt.wrong {
        border-color: #FF5630;
        background: #FFE8E2;
        animation: proto-shake-err 0.4s ease;
    }
    @keyframes proto-shake-ok {
        0%, 100% { transform: scale(1); }
        50%      { transform: scale(1.05); }
    }
    @keyframes proto-shake-err {
        0%, 100% { transform: translateX(0); }
        25%      { transform: translateX(-5px); }
        75%      { transform: translateX(5px); }
    }
    .proto-alt.disabled { pointer-events: none; opacity: 0.55; }
    .proto-feedback {
        min-height: 30px;
        text-align: center;
        font-weight: 800;
        font-size: 0.95rem;
        padding: 8px 12px;
        border-radius: 10px;
        margin-bottom: 12px;
        display: none;
    }
    .proto-feedback.show { display: block; }
    .proto-feedback.ok  { background: #E8FAF7; color: #16A085; }
    .proto-feedback.err { background: #FFE8E2; color: #E64526; }

    .proto-progress { height: 10px; background: #F0F2F7; border-radius: 6px; overflow: hidden; }
    .proto-progress > div {
        height: 100%;
        width: 30%;
        background: linear-gradient(90deg, #4BC6BD, #8754A1);
        border-radius: 6px;
        transition: width 0.3s ease;
    }
    .proto-progress-label {
        display: flex;
        justify-content: space-between;
        font-size: 0.78rem;
        color: #8898AA;
        font-weight: 600;
        margin-top: 6px;
    }

    /* Student sidebar (right) */
    .proto-sidebar-right { display: flex; flex-direction: column; gap: 12px; }
    .proto-side-card {
        background: #fff;
        border-radius: 14px;
        padding: 12px 14px;
        box-shadow: 0 2px 10px rgba(135,84,161,0.08);
    }
    .proto-side-title {
        font-size: 0.78rem;
        color: #8898AA;
        font-weight: 700;
        margin-bottom: 8px;
    }
    .proto-next { display: flex; align-items: center; gap: 10px; }
    .proto-next-thumb {
        width: 42px; height: 42px;
        border-radius: 10px;
        background: linear-gradient(135deg, #FAB03B, #FF5630);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    .proto-next-info strong { display: block; color: #2D3748; font-size: 0.85rem; font-weight: 800; }
    .proto-next-info span { color: #8898AA; font-size: 0.72rem; }
    .proto-medals { display: flex; justify-content: space-around; gap: 6px; }
    .proto-medal {
        width: 48px; height: 48px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        background: linear-gradient(135deg, #FFE9B8, #FAB03B);
        box-shadow: 0 4px 10px rgba(250,176,59,0.3);
        cursor: default;
        transition: transform 0.2s ease;
    }
    .proto-medal:hover { transform: translateY(-3px) rotate(-6deg); }
    .proto-medal.silver { background: linear-gradient(135deg, #E8EDF4, #B0B7C3); box-shadow: 0 4px 10px rgba(176,183,195,0.3); }
    .proto-medal.bronze { background: linear-gradient(135deg, #F5CBA7, #C47C0A); box-shadow: 0 4px 10px rgba(196,124,10,0.3); }

    /* Tablet (<1060px): stack panels vertically — 560+420+28 gap overflows below that. */
    @media (max-width: 1059px) {
        .proto-stage { padding: 20px 10px 40px 10px; }
        .proto-panels { flex-direction: column; gap: 28px; }
        .proto-panel {
            width: 100%;
            max-width: 560px;
            margin-left: 0 !important;
            transform: none !important;
        }
        .proto-stage:hover .proto-panel { transform: none !important; }
        .proto-teacher { grid-template-columns: 1fr; }
        .proto-sidebar {
            border-right: none;
            border-bottom: 1px solid #EEF0F5;
            flex-direction: row;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            padding: 12px;
        }
        .proto-brand { margin-bottom: 0; }
        .proto-user { margin-bottom: 0; }
        .proto-nav {
            display: flex;
            flex: 1 1 100%;
            gap: 6px;
            overflow-x: auto;
            padding-bottom: 4px;
        }
        .proto-nav li { white-space: nowrap; flex-shrink: 0; margin-bottom: 0; }
        .proto-sidebar-footer { display: none; }
        .proto-student-view { grid-template-columns: 1fr; }
    }

    /* Mobile (<576px): tighten spacings, shrink alt grid to 2 cols */
    @media (max-width: 575px) {
        .proto-main { padding: 14px; }
        .proto-kpi-row { grid-template-columns: 1fr; }
        .proto-kpi-value { font-size: 1.35rem; }
        .proto-student-view { padding: 12px; }
        .proto-alts { grid-template-columns: repeat(2, 1fr); }
        .proto-alt-emoji { font-size: 1.8rem; }
        .proto-character { font-size: 2.2rem; }
        .proto-bubble { font-size: 0.85rem; padding: 8px 10px; }
    }
