/* Tutorial Page Styles */

.tutorial-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #f8fafc;
    border-radius: 20px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.tutorial-hero {
    margin-bottom: 2.5rem;
    text-align: center;
}

.tutorial-hero-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tutorial-hero-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tutorial-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#chapter-subject-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e293b;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-color);
}

.back-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: none;
    background: #f0f4f8;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 
        3px 3px 6px rgba(163, 177, 198, 0.3), 
        -3px -3px 6px rgba(255, 255, 255, 0.8);
}

.back-pill i {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.back-pill:hover {
    transform: translateY(-2px);
    color: var(--primary-color);
    box-shadow: 
        5px 5px 10px rgba(163, 177, 198, 0.4), 
        -5px -5px 10px rgba(255, 255, 255, 0.9);
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.subject-card {
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-align: left;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.subject-card:hover {
    transform: translateY(-10px) scale(1.01);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 25px 30px -5px rgba(67, 97, 238, 0.18),
        0 12px 12px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.subject-card.locked {
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
    overflow: hidden;
}

.subject-card.locked:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.lock-badge {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0 0.8rem;
    height: 32px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    width: 32px; /* Start as circle */
    padding: 0;
}

.lock-text {
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
}

.subject-card.locked:hover .lock-badge {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    width: auto; /* Expand to fit text */
    padding: 0 0.8rem;
}

.subject-card.locked:hover .lock-text {
    max-width: 60px;
    opacity: 1;
}

.subject-card.locked .subject-icon {
    background: #eef2ff; /* Light lavender-blue from image */
    color: #4361ee;      /* Primary blue from image */
    box-shadow: none;    /* Clean look like image */
}

.subject-card.locked:hover .subject-icon {
    background: #e0e7ff; /* Slightly darker on hover */
}

.subject-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(67, 97, 238, 0.05));
    color: var(--primary-color);
    font-size: 1.5rem;
    box-shadow: inset 0 0 10px rgba(67, 97, 238, 0.1);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.subject-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

.subject-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.chapter-card {
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.chapter-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 25px 30px -5px rgba(67, 97, 238, 0.18), 0 12px 12px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(67, 97, 238, 0.4);
}

.chapter-icon-box {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-circle-bg {
    fill: none;
    stroke: rgba(59, 130, 246, 0.1);
    stroke-width: 3;
}

.progress-circle-bar {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.chapter-left-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    color: #3b82f6;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chapter-icon-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.chapter-icon-inner i {
    font-size: 1.5rem;
    color: #3b82f6;
    opacity: 0.9;
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1;
}

.chapter-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.chapter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.1rem;
}

.chapter-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.chapter-stats {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.difficulty-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chapter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.chapter-pill i {
    font-size: 0.8rem;
    margin-right: 0.1rem;
}

.chapter-pill.easy {
    background: #dcfce7;
    color: #166534;
}

.chapter-pill.medium {
    background: #fef3c7;
    color: #92400e;
}

.chapter-pill.hard {
    background: #fee2e2;
    color: #991b1b;
}

.chapter-pill.type-theory {
    background: #ede9fe;
    color: #5b21b6;
}

.chapter-pill.type-practice {
    background: #dbeafe;
    color: #1e40af;
}

.chapter-pill.type-game {
    background: #fce7f3;
    color: #9d174d;
}

.chapter-arrow {
    color: #cbd5e1;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.chapter-card:hover .chapter-arrow {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* Daily Challenge Card */
.daily-challenge-card {
    grid-column: span 2;
    background: white;
    border-radius: 24px;
    padding: 1.6rem 2.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    position: relative;
    border: 1px solid rgba(168, 85, 247, 0.1);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.daily-challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(236, 72, 153, 0.15));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.daily-challenge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 50px -12px rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.25);
}

.daily-info h4 {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #9333ea;
    margin-bottom: 0.7rem;
    letter-spacing: 0.1em;
}

.daily-info h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.daily-info p {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    opacity: 0.9;
}

.daily-icon {
    width: 56px;
    height: 56px;
    background: #f5f3ff;
    color: #7c3aed;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08);
}

.problems-list {
    display: flex;
    flex-direction: column;
    min-height: 600px;
    position: relative;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.problem-card {
    background: white;
    border-radius: 20px;
    padding: 36px 36px 28px;
    box-shadow: 0 8px 40px rgba(80,100,160,0.10);
    border: 1px solid #e5e7eb;
    width: 100%;
    margin-bottom: 2rem;
    animation: fadeInSlide 0.4s ease-out;
    overflow: visible;
}

/* Problems section card: fixed width and centered */
#problems-section .problem-card {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Handwritten sheet variant (applies only to targeted problem) */
/* handwriting variant removed */

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.problem-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #4361ee;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.problem-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.problem-question {
    font-size: 1.15rem;
    color: #334155;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
}

.section-label {
    font-weight: 800;
    color: #0f172a;
    margin: 0.25rem 0 0.5rem;
}

.solution-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 1rem 0 0.3rem;
}
.solution-title::before {
    content: '◆';
    color: #2563eb;
    font-size: 0.8rem;
}

.info-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 1rem;
}

.info-banner i {
    color: #f59e0b;
}

.info-banner {
    display: none;
}

.steps-container {
    margin-bottom: 1.25rem;
}

.handwriting-steps {
    font-family: 'Galada', 'Poppins', sans-serif;
}
.handwriting-steps .plain-step {
    font-size: 1.1rem;
    line-height: 1.6;
    letter-spacing: 0.15px;
}
.handwriting-steps .plain-step.equation {
    font-size: 1.2rem;
}

.plain-steps-area {
    background: #ffffff;
    border: none;
    border-radius: 0;
    min-height: 0;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.collapsible-bubble {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 14px;
    margin: 0.5rem 0;
    padding: 0;
    overflow: hidden;
}
.collapsible-bubble > summary {
    list-style: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.12);
}
.collapsible-bubble > summary:hover { filter: brightness(0.97); }
.collapsible-bubble .bubble-body {
    padding: 0.55rem 0.8rem 0.75rem 0.8rem;
    color: #334155;
    opacity: 0;
    transform: translateY(-2px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease;
}
.collapsible-bubble[open] .bubble-body {
    opacity: 1;
    transform: none;
    max-height: 260px;
}

.equation-hover {
    position: static;
    background: transparent;
    border: 0;
    border-radius: 0;
    min-height: 0;
    display: block;
    padding: 0;
    margin: 0.25rem 0;
    text-align: center;
}
.equation-hover .katex {
    font-size: 1.05rem;
    line-height: 1.4;
}

/* Right-side collapsible chat bar for equations */
.eq-chat-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.2rem 0;
}
.eq-chat-left {
    flex: 1;
}
.eq-chat {
    position: relative;
    flex: 0 0 auto;
}
.eq-chat > summary {
    list-style: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
}
.eq-chat > summary:hover {
    filter: brightness(0.96);
}
.eq-chat-box {
    width: 240px;
    max-width: 42vw;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.6rem 0.8rem;
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    margin-top: 0.35rem;
    opacity: 0;
    transform: translateY(-2px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease;
}
.eq-chat[open] .eq-chat-box {
    opacity: 1;
    transform: none;
    max-height: 300px;
}
.eq-chat-box .katex {
    font-size: 1.05rem;
}
@media (max-width: 768px) {
    .eq-chat-row {
        flex-direction: column;
        align-items: center;
    }
    .eq-chat {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .eq-chat-box {
        width: 100%;
        max-width: 100%;
    }
}
.eq-label {
    display: none;
}

.eq-tooltip {
    display: none;
}

.equation-hover:hover .eq-tooltip { opacity: 0; }

.plain-step {
    color: #1f2937;
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.15rem 0;
}

.plain-step + .plain-step {
    margin-top: 0.25rem;
}


.plain-step.caption {
    font-weight: 600;
    color: #0f172a;
    margin-top: 0.6rem;
    margin-bottom: 0.2rem;
}
.plain-step.caption.mini {
    font-weight: 600;
    color: #64748b;
    font-size: 0.98rem;
    margin-top: 0.25rem;
    margin-bottom: 0.3rem;
}

.plain-step.equation {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0.2rem 0 0.4rem 0;
}

.eq-line {
    position: relative;
    margin: 0.2rem 0 0.4rem 0;
}
.eq-line .plain-step.equation {
    padding-right: 34px;
}
.eq-right-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.12);
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
    z-index: 20;
}
.eq-right-icon:hover {
    filter: brightness(0.97);
    transform: translateY(-50%) scale(1.05);
}
.eq-note-popover {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%) translateY(-2px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.65rem 0.9rem;
    color: #334155;
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    max-width: min(420px, 80vw);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, max-height 0.25s ease, transform 0.25s ease, right 0.25s ease;
    z-index: 1000;
    pointer-events: none;
}
.eq-note-popover.open {
    opacity: 1;
    max-height: 260px;
    transform: translateY(-50%) translateY(0);
    right: -36px;
    pointer-events: auto;
}
.problem-step {
    padding: 1rem 1rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.problem-step.visible {
    opacity: 1;
    transform: translateX(0);
}

.step-number-circle {
    width: 24px;
    height: 24px;
    background: #e0e7ff;
    color: #312e81;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-hint {
    margin-left: auto;
    color: #fca5a5;
}

.final-answer-gradient {
    display: none; /* deprecated in favor of sliding toggle */
}

.final-caret {
    margin-right: 0.5rem;
}

/* Sliding Final Answers Toggle */
.final-slide-wrapper {
    display: none; /* old sliding toggle no longer used */
}

/* Single Final Answer button (adjacent to Hide Previous Step) */
.final-answer-btn {
    margin-left: 0;
}

/* Final answer reveal card placed below the problem card */
.final-reveal-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 16px rgba(99,102,241,0.10);
    max-width: 1100px;
    width: 100%;
    margin: -0.5rem auto 2rem auto;
}
.final-reveal-card[hidden] { display: none !important; }
.final-reveal-inner {
    font-weight: 700;
    color: #0f766e;
    text-align: center;
}

/* New Pagination & Controls Bar */
.pagination-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(0,0,0,0.04);
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.control-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.step-btn {
    padding: 0.65rem 1.15rem;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.step-btn.primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}

.step-btn.undo {
    background: #fff1f2;
    color: #b91c1c;
    border-color: #fecaca;
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.15);
}
.step-btn.undo:hover {
    background: #fee2e2;
    color: #b91c1c;
}
.step-btn.undo:active {
    transform: translateY(0.5px);
    filter: brightness(0.98);
}

.step-btn.secondary {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #e2e8f0;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}
.step-btn.secondary:hover { background: #e2e8f0; }
.step-btn:hover { transform: translateY(-1px); filter: brightness(0.98); box-shadow: 0 8px 18px rgba(0,0,0,0.08); }
.step-btn:active { transform: translateY(0); box-shadow: 0 5px 10px rgba(0,0,0,0.06); }
.step-btn i { font-size: 0.95rem; }

.step-btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

.plain-step {
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.plain-step.appear {
    opacity: 0;
    transform: translateY(4px);
}
.plain-step.appear.revealed {
    opacity: 1;
    transform: none;
}

.floating-pagination {
    position: sticky;
    bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.pagination-dots {
    background: white;
    border-radius: 50px;
    padding: 0.5rem 0.7rem;
    display: flex;
    gap: 0.5rem;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}

.pagination-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.pagination-dot.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 15px rgba(79, 70, 229, 0.3);
}

.next-page-pill {
    border: none;
    border-radius: 45px;
    background: #dc2626;
    color: white;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.9rem 1.3rem;
    box-shadow: 0 14px 25px rgba(220, 38, 38, 0.35);
    cursor: pointer;
}

.next-page-pill.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.problem-footer {
    display: none;
}

.status-toggle {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    user-select: none;
    margin-left: auto;
    flex-shrink: 0;
}

.status-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    transition: color 0.3s ease;
}

.status-toggle.active .status-label {
    color: #059669;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-toggle.active .toggle-switch {
    background: #10b981;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-toggle.active .toggle-slider {
    left: calc(100% - 21px);
}

.problem-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transform: none;
}

.problem-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.problem-title {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
}

.difficulty-pill {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-pill.easy {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.difficulty-pill.medium {
    background-color: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.difficulty-pill.hard {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.problem-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
}

.filter-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
    margin-right: 0.5rem;
}

.filter-pills {
    display: flex;
    gap: 0.75rem;
}

.filter-pill {
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    color: #64748b;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-pill:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.filter-pill.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-pill.active.easy {
    background: #22c55e;
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.filter-pill.active.medium {
    background: #eab308;
    color: white;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}

.filter-pill.active.hard {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.visualization-container {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5);
}

.steps-container {
    margin-top: 2rem;
}

.problems-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: #f8fafc;
    border-radius: 20px;
    color: #64748b;
    font-weight: 500;
    border: 1px dashed #cbd5e1;
    margin-top: 1rem;
}

.problem-step {
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 5px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 1px 3px rgba(0, 0, 0, 0.05);
    transform: translateY(15px) scale(0.98);
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: 
        opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.3s ease,
        box-shadow 0.3s ease;
    will-change: transform, opacity;
}

.problem-step.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.problem-step.removing {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
}

.problem-step.active-step {
    background: white;
    box-shadow: 
        0 10px 15px -3px rgba(67, 97, 238, 0.1),
        0 4px 6px -2px rgba(67, 97, 238, 0.05);
    border-color: rgba(67, 97, 238, 0.2);
}

.problem-step.removing {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.problem-step.active-step {
    background: white;
    box-shadow: 
        0 10px 15px -3px rgba(67, 97, 238, 0.1),
        0 4px 6px -2px rgba(67, 97, 238, 0.05);
    border-color: rgba(67, 97, 238, 0.2);
}

.hidden {
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.button-group {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    align-items: center;
}

.step-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    width: auto;
    background: #f1f5f9;
    color: var(--primary-color);
    border: 1px solid rgba(67, 97, 238, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
}

.step-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.step-button i {
    font-size: 0.8rem;
}

.step-button.hide-mode {
    background: #fee2e2;
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.1);
}

.step-button.hide-mode:hover {
    background: #ef4444;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .tutorial-main {
        padding: 1.5rem;
        margin: 1rem;
    }

    .tutorial-hero-text h1 {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .back-pill {
        align-self: flex-start;
    }

    .problem-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .filter-pills {
        flex-wrap: wrap;
    }

    .daily-challenge-card {
        padding: 1.2rem 1.5rem;
    }

    .daily-info h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 640px) {
    .tutorial-main {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 14px;
    }

    .chapter-grid {
        grid-template-columns: 1fr;
    }

    /* When chapter-grid is 1-col, the daily challenge card should not span 2 */
    .daily-challenge-card {
        grid-column: span 1;
    }

    .chapter-icon-box {
        width: 70px;
        height: 70px;
    }

    .chapter-card {
        padding: 1rem;
    }

    .tutorial-hero-text h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .tutorial-main {
        margin: 0;
        border-radius: 0;
    }

    .pagination-controls-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .control-buttons {
        width: 100%;
        flex-wrap: wrap;
    }

    .step-btn {
        font-size: 0.82rem;
        padding: 0.55rem 0.85rem;
    }
}

/* ═══════════════════════════════════════════════════════
   NOTEBOOK PROBLEM CARD  — matches math_tutorial_full
═══════════════════════════════════════════════════════ */

.notebook-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 36px 28px;
  border: 1px solid #e5e7eb;
  position: relative;
  overflow: visible;
  box-shadow: 0 8px 40px rgba(80,100,160,0.10);
}

.nb-example-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 6px;
}

.nb-problem-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 16px;
}

.nb-q-label {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
}

.nb-question-text {
  font-family: 'Kalam', 'Poppins', cursive;
  font-size: 19px;
  color: #374151;
  margin-bottom: 22px;
  line-height: 1.75;
}

.nb-solution-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 16px;
}
.nb-solution-label::before {
  content: '◆';
  color: #6366f1;
  font-size: 10px;
}

/* ── Ruled notebook area ── */
.nb-notebook-area {
  position: relative;
  background: #fffef9;
  border-radius: 8px;
  padding: 22px 24px 22px 60px;
  min-height: 280px;
  background-image:
    linear-gradient(to right, #f5c4c4 1px, transparent 1px),
    repeating-linear-gradient(to bottom,
      transparent, transparent 47px,
      #d4e4f7 47px, #d4e4f7 48px);
  background-size: 64px 100%, 100% 48px;
  background-position: 0 0, 0 24px;
  overflow: visible;
  margin-bottom: 20px;
}

/* Problems-only: shift grid to create the left notebook margin */
#problems-section .nb-notebook-area {
  background-position: 52px 0, 0 24px;
}
.notebook-area {
  position: relative;
  background: #fffef9;
  border-radius: 8px;
  padding: 22px 24px 22px 60px;
  min-height: 280px;
  background-image:
    linear-gradient(to right, #f5c4c4 1px, transparent 1px),
    repeating-linear-gradient(to bottom,
      transparent, transparent 35px,
      #d4e4f7 35px, #d4e4f7 36px);
  background-size: 52px 100%, 100% 36px;
  background-position: 0 0, 0 18px;
  overflow: visible;
  margin-bottom: 20px;
}
.notebook-area::before {
  content: '';
  position: absolute;
  left: 52px;
  top: 0; bottom: 0;
  width: 1.5px;
  background: #f5c4c4;
}
.nb-notebook-area::before {
  content: '';
  position: absolute;
  left: 52px;
  top: 0; bottom: 0;
  width: 1.5px;
  background: #f5c4c4;
}

.nb-steps-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 200px;
}

/* ── Step row ── */
.nb-step-row {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 48px;
}

.nb-step-text {
  font-family: 'Kalam', 'Poppins', cursive;
  font-size: 20px;
  color: #1e293b;
  line-height: 48px;
  flex: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

/* Plain text steps use Kalam naturally */
.nb-math {
  font-family: 'Kalam', cursive;
  font-size: 21px;
  line-height: 48px;
}

/* KaTeX steps: allow natural height, align on baseline */
.nb-katex-span {
  font-family: inherit;
  font-size: 20px;
  line-height: normal;
  display: inline-flex;
  align-items: baseline;
}

.nb-katex-span .katex {
  font-size: 1.15em;
  line-height: normal;
}

.nb-comment {
  font-family: 'Kalam', 'Poppins', cursive;
  font-size: 15px;
  color: #9ca3af;
  line-height: 1;
  align-self: baseline;
  flex: 0 0 auto;
  white-space: nowrap;
  opacity: 0.9;
}

.nb-step-content {
  flex: 1 1 auto;
  min-width: 0;
}

/* ── Bubble dot ── */
.nb-bubble-dot {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
  padding: 0;
}
.nb-bubble-dot:hover { transform: scale(1.18); }
.nb-bubble-dot svg {
  width: 10px; height: 10px; fill: white;
}

/* ── Bubble panel ── */
.nb-bubble-panel {
  position: absolute;
  left: calc(100% + 20px);
  top: -4px;
  width: 300px;
  background: linear-gradient(145deg, #eef2ff, #e0e7ff);
  border: 1.5px solid #818cf8;
  border-radius: 14px;
  padding: 14px 16px 13px;
  box-shadow: 0 8px 28px rgba(99,102,241,0.18);
  z-index: 200;
  display: none;
  animation: nbPopIn 0.22s ease;
}
.nb-bubble-panel::before {
  content: '';
  position: absolute;
  left: -9px; top: 12px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 9px solid #818cf8;
}
.nb-bubble-panel::after {
  content: '';
  position: absolute;
  left: -7px; top: 13px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 7px solid #eef2ff;
}
@keyframes nbPopIn {
  from { opacity: 0; transform: scale(0.92) translateX(-6px); }
  to   { opacity: 1; transform: scale(1)    translateX(0); }
}
.nb-bubble-panel.open { display: block; }

.nb-panel-close {
  position: absolute;
  top: 7px; right: 10px;
  background: none; border: none;
  color: #9ca3af; cursor: pointer;
  font-size: 16px; line-height: 1;
  transition: color 0.2s;
}
.nb-panel-close:hover { color: #6366f1; }

.nb-panel-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 8px;
  font-family: 'Poppins', sans-serif;
}

.nb-panel-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}
.nb-tab-btn {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid #818cf8;
  cursor: pointer;
  background: transparent;
  color: #6366f1;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}
.nb-tab-btn.active { background: #6366f1; color: white; border-color: #6366f1; }

.nb-notes-content {
  font-size: 14px;
  color: #374151;
  line-height: 1.75;
  font-family: 'Poppins', sans-serif;
}
.nb-notes-content strong { color: #6366f1; }

.nb-ask-input {
  width: 100%;
  font-size: 14px;
  border: 1.5px solid #c7d2fe;
  border-radius: 8px;
  padding: 8px 11px;
  background: white;
  color: #374151;
  outline: none;
  resize: none;
  height: 58px;
  transition: border-color 0.2s;
  font-family: 'Poppins', sans-serif;
  display: block;
  box-sizing: border-box;
}
.nb-ask-input:focus { border-color: #6366f1; }

.nb-ask-btn {
  margin-top: 7px;
  width: 100%;
  font-size: 13.5px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Poppins', sans-serif;
}
.nb-ask-btn:hover { background: #4f46e5; }
.nb-ask-btn:disabled { background: #a5b4fc; cursor: not-allowed; }

.nb-ai-response {
  margin-top: 8px;
  font-size: 13.5px;
  color: #374151;
  line-height: 1.65;
  background: white;
  border-radius: 8px;
  padding: 8px 11px;
  border: 1px solid #e0e7ff;
  display: none;
  font-family: 'Poppins', sans-serif;
}

.nb-spinner {
  display: inline-block;
  width: 11px; height: 11px;
  border: 2px solid #c7d2fe;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: nbSpin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 3px;
}
@keyframes nbSpin { to { transform: rotate(360deg); } }

/* ── QED ── */
.nb-qed-line {
  font-size: 16px;
  color: #374151;
  text-align: right;
  padding-top: 8px;
  opacity: 0;
  transition: opacity 0.5s;
  font-family: 'Poppins', sans-serif;
}
.nb-qed-line.show { opacity: 1; }
.nb-qed-line span {
  display: inline-block;
  border: 1.5px solid #374151;
  padding: 2px 10px;
  border-radius: 3px;
}

/* ── Controls bar ── */
.nb-controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.nb-control-btns {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.nb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 24px;
  padding: 11px 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.nb-btn-next {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.nb-btn-next:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(99,102,241,0.45); }
.nb-btn-next:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.nb-btn-undo {
  background: white;
  color: #374151;
  border: 1.5px solid #e5e7eb;
}
.nb-btn-undo:hover { border-color: #6366f1; color: #6366f1; }
.nb-btn-undo:disabled { opacity: 0.4; cursor: not-allowed; }

.nb-btn-final {
  background: white;
  color: #374151;
  border: 1.5px solid #e5e7eb;
}
.nb-btn-final:hover { border-color: #6366f1; color: #6366f1; }

/* ── Done toggle ── */
.nb-done-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}
.nb-toggle-track {
  width: 42px; height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  position: relative;
  transition: background 0.25s;
}
.nb-done-toggle.active .nb-toggle-track { background: #22c55e; }
.nb-toggle-thumb {
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 3px;
  transition: left 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.nb-done-toggle.active .nb-toggle-thumb { left: 21px; }

/* ── Responsive: panel below on small screens ── */
@media (max-width: 860px) {
  .nb-bubble-panel {
    position: fixed;
    left: 50%;
    top: auto;
    bottom: 20px;
    transform: translateX(-50%);
    width: min(90vw, 340px);
  }
  .nb-bubble-panel::before,
  .nb-bubble-panel::after { display: none; }
}

@media (max-width: 680px) {
  .notebook-card,
  .problem-card {
    padding: 22px 18px 18px;
  }
  .nb-notebook-area,
  .notebook-area {
    padding: 16px 14px 16px 50px;
  }
  .nb-btn {
    padding: 9px 16px;
    font-size: 13px;
  }
  .nb-step-text {
    font-size: 17px;
  }
  .nb-question-text {
    font-size: 16px;
  }
  .problems-list {
    width: 100%;
    margin: 0;
  }
  #problems-section .problem-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* ==========================================================================
   ░░  TUTORIAL 2.0 DE-SLOP  ░░  indigo/violet (#4f46e5 #6366f1 #7c3aed …) →
   emerald; glass + violet gradients removed. Difficulty pills (green/amber/
   red) kept — they are a meaningful scale. Tokens from design-system.css. */
.tutorial-main { background: var(--color-surface); box-shadow: var(--shadow-sm); }
.tutorial-hero-text h1 { color: var(--color-ink); text-shadow: none; }
.section-header { border-bottom: 1px solid var(--color-border); }
#chapter-subject-title, .section-title { color: var(--color-ink); }
.back-pill { background: var(--color-surface); border: 1px solid var(--color-border-strong); box-shadow: var(--btn-inset-light); color: var(--color-ink-2); }
.back-pill:hover { background: var(--color-surface-2); color: var(--color-accent); box-shadow: var(--shadow-sm); }
.back-pill i { color: var(--color-accent); }

.subject-card { background: var(--color-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.subject-card:hover { background: var(--color-surface); border-color: var(--color-accent); box-shadow: var(--shadow-pop); }
.subject-card.locked:hover { background: var(--color-surface); box-shadow: var(--shadow-sm); border-color: var(--color-border); }
.subject-icon { background: var(--color-accent-soft); color: var(--color-accent-active); box-shadow: none; }
.subject-card.locked .subject-icon { background: var(--color-accent-soft); color: var(--color-accent); }
.subject-card.locked:hover .subject-icon { background: var(--emerald-200); }
.subject-card h3 { color: var(--color-ink); }

.chapter-card { border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); border-radius: var(--radius-lg); }
.chapter-card:hover { box-shadow: var(--shadow-pop); border-color: var(--color-accent); }
.progress-circle-bg { stroke: var(--color-accent-soft); }
.progress-circle-bar { stroke: var(--color-accent); }
.chapter-left-icon { background: var(--color-surface-2); color: var(--color-accent); }
.chapter-icon-inner i, .progress-text { color: var(--color-accent); }
.chapter-title { color: var(--color-ink); }
.chapter-card:hover .chapter-arrow { color: var(--color-accent); }
.chapter-pill.type-theory { background: var(--color-accent-soft); color: var(--color-accent-active); }

.daily-challenge-card { border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.daily-challenge-card::before { display: none; }
.daily-challenge-card:hover { box-shadow: var(--shadow-pop); border-color: var(--color-accent); }
.daily-info h4 { color: var(--color-accent); }
.daily-info h2 { color: var(--color-ink); }
.daily-icon { background: var(--color-accent-soft); color: var(--color-accent-active); box-shadow: none; }

.problem-label { color: var(--color-accent); }
.solution-title::before { color: var(--color-accent); }
.step-btn.primary { background: var(--color-accent); color: #fff; border-color: transparent; box-shadow: var(--btn-inset); }
.step-btn.undo { background: var(--color-danger-soft); color: var(--color-danger); border-color: var(--color-danger); }
.step-number-circle { background: var(--color-accent-soft); color: var(--color-accent-active); }
.step-button { background: var(--color-surface-2); color: var(--color-accent); border: 1px solid var(--color-border); }
.step-button:hover { background: var(--color-accent); color: #fff; }
.pagination-dot.active { background: var(--color-accent); border-color: transparent; box-shadow: var(--btn-inset); }
.next-page-pill { background: var(--color-accent); box-shadow: var(--btn-inset); }
.next-page-pill.disabled { background: var(--color-surface-2); color: var(--color-muted); box-shadow: none; }
.visualization-container { background: var(--color-surface-2); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--color-border); box-shadow: none; }
.problem-step { background: var(--color-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--color-border); border-left: 5px solid var(--color-accent); box-shadow: var(--shadow-sm); }
.problem-step.active-step { background: var(--color-surface); border-color: var(--color-accent); box-shadow: var(--shadow-pop); }
.final-reveal-inner { color: var(--color-accent-active); }
.collapsible-bubble > summary, .eq-chat > summary, .eq-right-icon { background: var(--color-accent-soft); color: var(--color-accent-active); box-shadow: none; }

/* Notebook problem viewer */
.nb-example-tag, .nb-problem-title, .nb-panel-title, .nb-notes-content strong { color: var(--color-accent); }
.nb-solution-label::before { color: var(--color-accent); }
.nb-bubble-dot { background: var(--color-accent); box-shadow: none; }
.nb-bubble-panel { background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-pop); }
.nb-bubble-panel::before { border-right-color: var(--color-border); }
.nb-bubble-panel::after { border-right-color: var(--color-surface); }
.nb-tab-btn { border: 1.5px solid var(--color-border-strong); color: var(--color-ink-2); }
.nb-tab-btn.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.nb-ask-input { border: 1.5px solid var(--color-border-strong); }
.nb-ask-input:focus { border-color: var(--color-accent); }
.nb-ask-btn { background: var(--color-accent); }
.nb-ask-btn:hover { background: var(--color-accent-hover); }
.nb-spinner { border-color: var(--color-accent-soft); border-top-color: var(--color-accent); }
.nb-btn-next { background: var(--color-accent); box-shadow: var(--btn-inset); }
.nb-btn-undo:hover, .nb-btn-final:hover { border-color: var(--color-accent); color: var(--color-accent); }
.nb-panel-close:hover { color: var(--color-accent); }
