/* =============================================
   GUIDES NEW — Duolingo-style Career Learning
   Hub View | Path View | Step View | Completion
   ============================================= */


/* ===========================================
   1. HUB VIEW — Path Selection
   =========================================== */

/* Hero */
.paths-hero {
    text-align: center;
    padding: 140px 1.5rem 2.5rem;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(26, 58, 143, 0.12), transparent);
    animation: pageEnter 0.6s ease both;
}
[data-theme="light"] .paths-hero { background: none; }
@keyframes pageEnter { from { opacity: 0; } to { opacity: 1; } }
.paths-hero .container { max-width: 720px; position: relative; z-index: 1; }

.paths-hero h1 {
    font-family: 'Space Grotesk', var(--font-display);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    animation: fadeUp 0.7s var(--ease-out) 0.1s both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.paths-hero .subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 540px;
    margin-inline: auto;
}

.paths-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-light);
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    margin-bottom: 1.25rem;
}

/* .gradient-text is now defined in styles.css as a solid color */

/* Streak Banner */
.streak-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.streak-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.streak-flame-wrap {
    position: relative;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.streak-flame-wrap svg {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
}

.streak-flame-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 168, 106, 0.4) 0%, transparent 70%);
    animation: pulseGlow 2.5s ease-in-out infinite;
    z-index: 0;
}

.streak-count {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--orange);
    line-height: 1;
    font-family: var(--font-display);
}

.streak-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.streak-greeting {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 0.25rem;
}

/* Sign-in Prompt Banner */
.signin-prompt {
    border-bottom: 1px solid var(--border);
    background: rgba(36, 80, 184, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.6rem 1.5rem;
}

.signin-prompt-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.signin-prompt-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.signin-prompt-btn {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-light);
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    padding: 0.3rem 0.9rem;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition);
    cursor: pointer;
}

.signin-prompt-btn:hover {
    background: rgba(36, 80, 184, 0.15);
    border-color: var(--accent-light);
}

.signin-prompt-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.signin-prompt-close:hover {
    opacity: 1;
}

/* Progress Sync Indicator */
.progress-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--green);
    background: rgba(76, 175, 80, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    margin-top: 0.75rem;
}

.progress-sync-link {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: 0.75rem;
    transition: color var(--transition);
}

.progress-sync-link:hover {
    color: var(--accent-light);
}

/* Continue Section */
.continue-section {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
}

.continue-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.continue-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 24px rgba(36, 80, 184, 0.1);
}

.continue-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.continue-card-left .path-icon {
    flex-shrink: 0;
}

.continue-info {
    min-width: 0;
}

.continue-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.continue-path-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 2px;
}

.continue-step-name {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.continue-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 140px;
}

.continue-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.continue-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-sm);
    transition: width 0.6s var(--ease-out);
}

.continue-progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.continue-card-right .step-btn-primary {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* Paths Grid */
.paths-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* Path Card */
.path-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
}

.path-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(36, 80, 184, 0.12);
    border-color: var(--border-accent);
}

.path-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.path-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.path-icon svg {
    width: 24px;
    height: 24px;
}

.path-icon.color-blue {
    background: linear-gradient(135deg, rgba(36, 80, 184, 0.15), rgba(51, 102, 214, 0.08));
    color: var(--accent-light);
}

.path-icon.color-green {
    background: linear-gradient(135deg, rgba(95, 212, 163, 0.15), rgba(95, 212, 163, 0.08));
    color: var(--green);
}

.path-icon.color-orange {
    background: linear-gradient(135deg, rgba(232, 168, 106, 0.15), rgba(232, 168, 106, 0.08));
    color: var(--orange);
}

.path-icon.color-red {
    background: linear-gradient(135deg, rgba(232, 106, 106, 0.15), rgba(232, 106, 106, 0.08));
    color: var(--red);
}

.path-icon.color-yellow {
    background: linear-gradient(135deg, rgba(232, 211, 106, 0.15), rgba(232, 211, 106, 0.08));
    color: var(--yellow);
}

.path-icon.color-cyan {
    background: linear-gradient(135deg, rgba(106, 170, 232, 0.15), rgba(106, 170, 232, 0.08));
    color: var(--blue);
}

/* Progress Ring */
.path-progress-ring {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.path-progress-ring svg {
    width: 56px;
    height: 56px;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 4;
}

.ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 151;
    stroke-dashoffset: calc(151 - (151 * var(--progress, 0) / 100));
    transition: stroke-dashoffset 0.8s var(--ease-out);
}

.ring-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: var(--font-display);
}

/* Card Typography */
.path-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.path-card-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.55;
}

.path-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 4px;
}

.path-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.path-stat svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.path-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-light);
    text-decoration: none;
    margin-top: 4px;
    transition: gap var(--transition);
}

.path-card-cta:hover {
    gap: 10px;
}

.path-card-cta svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition);
}

.path-card-cta:hover svg {
    transform: translateX(2px);
}


/* ===========================================
   2. PATH VIEW — Category List
   =========================================== */

.path-view {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 1.5rem 4rem;
}

.path-view-header {
    margin-bottom: 2.5rem;
}

.path-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent-light);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: all var(--transition);
    cursor: pointer;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-family: var(--font-body);
}

.path-back-link:hover {
    gap: 10px;
    background: rgba(36, 80, 184, 0.18);
    border-color: var(--accent);
}

.path-back-link svg {
    width: 16px;
    height: 16px;
}

.path-view-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0.75rem;
}

.path-view-title-row .path-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.path-view-title-row h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.2;
}

.path-view-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    line-height: 1.55;
}

/* Overall Progress Bar */
.path-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.path-progress-bar .fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-sm);
    transition: width 0.6s var(--ease-out);
}

/* Continue Row */
.path-continue-row {
    margin-bottom: 2rem;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.category-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

/* Category Status Variants */
.category-card[data-status="locked"] {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.category-card[data-status="in-progress"] {
    border-left: 3px solid var(--accent);
    border-color: var(--border-accent);
}

.category-card[data-status="in-progress"]:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(36, 80, 184, 0.08);
}

.category-card[data-status="complete"] {
    border-left: 3px solid var(--green);
}

.category-card[data-status="complete"]:hover {
    border-color: var(--green-border);
}

/* Category Layout */
.category-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.category-card-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.category-card-right .mini-progress {
    width: 60px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.category-card-right .mini-progress .fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s var(--ease-out);
}

.category-card-right .category-cta {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-light);
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: var(--font-body);
}

.category-card-right .category-cta:hover {
    background: rgba(36, 80, 184, 0.18);
    border-color: var(--accent);
}

.category-card[data-status="complete"] .category-cta {
    color: var(--green);
    background: var(--green-bg);
    border-color: var(--green-border);
}

.category-card[data-status="complete"] .category-cta:hover {
    background: rgba(95, 212, 163, 0.14);
}

/* Status Icon */
.category-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-status-icon svg {
    width: 16px;
    height: 16px;
}

.status-locked {
    background: var(--bg-elevated);
    border: 1.5px solid var(--border);
    color: var(--text-muted);
}

.status-in-progress {
    background: var(--accent-glow);
    border: 1.5px solid var(--accent);
    color: var(--accent-light);
}

.status-complete {
    background: var(--green);
    border: none;
    color: #fff;
}

/* Category Text */
.category-card-info {
    min-width: 0;
}

.category-card-info .category-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.2rem;
    line-height: 1.3;
}

.category-card-info .category-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0 0 0.25rem;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-card-info .category-step-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}


/* ===========================================
   3. STEP VIEW — Interactive Lessons
   =========================================== */

.step-view {
    max-width: 640px;
    margin: 0 auto;
    /* Top padding accounts for the 60px main navbar + 56px progress bar +
       breathing room so the step title never sits flush with the chrome. */
    padding: 7rem 1.5rem 6rem;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

/* Step Progress Bar — sits BELOW the main site navbar (60px) with a clear
   gap and its own shadow so it visually separates from the top chrome. */
.step-progress-bar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 90;
    gap: 14px;
}

.step-progress-track {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.step-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s var(--ease-out);
}

.step-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.step-close-btn:hover {
    border-color: var(--border-accent);
    color: var(--text-secondary);
    background: var(--bg-card);
}

.step-close-btn svg {
    width: 16px;
    height: 16px;
}

/* Step Counter */
.step-counter {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

/* Step Content */
.step-content {
    flex: 1;
    animation: stepSlideIn 0.35s var(--ease-out);
}

.step-content.slide-out {
    animation: stepSlideOut 0.25s var(--ease-out) forwards;
}

/* Step Footer */
.step-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 99;
}

/* --- Step Types --- */

/* Read */
.step-type-read .step-tip-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.step-type-read .step-tip-icon svg {
    width: 18px;
    height: 18px;
}

.step-type-read h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 1rem;
    line-height: 1.25;
}

.step-type-read .step-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 1.25rem;
}

.step-type-read .step-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-type-read .step-bullets li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 20px;
    position: relative;
}

.step-type-read .step-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* Choice */
.step-type-choice h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.step-type-choice .step-prompt {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

/* Rewrite */
.step-type-rewrite h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.step-type-rewrite .step-prompt {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

/* Mistake */
.step-type-mistake h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.step-type-mistake .step-prompt {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem;
}

.step-type-mistake .step-passage {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.7;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 1.5rem;
}

/* Fill */
.step-type-fill h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.step-type-fill .step-prompt {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

.step-type-fill .step-fill-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 2;
}

/* --- Step Options --- */

.step-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-option {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    width: 100%;
    /* Fixed height (not min-height) so a 2-line option is the SAME height as
       a 1-line option. This prevents users from picking the answer based on
       the visual size of the choice. */
    height: 76px;
    cursor: pointer;
    background: transparent;
    transition: all var(--transition);
    text-align: left;
    font-family: var(--font-body);
    color: var(--text-primary);
}

.step-option:hover {
    border-color: var(--border-accent);
    background: var(--accent-glow);
}

.step-option.selected {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.step-option.correct {
    border-color: var(--green);
    background: var(--green-bg);
}

.step-option.incorrect {
    border-color: var(--red);
    background: var(--red-bg);
}

.step-option-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all var(--transition);
}

.step-option.selected .step-option-letter {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-glow);
}

.step-option.correct .step-option-letter {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-bg);
}

.step-option.incorrect .step-option-letter {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-bg);
}

.step-option-text {
    font-size: 0.88rem;
    line-height: 1.5;
    flex: 1;
    /* Clamp every option to two lines so the visual length of the correct
       answer never gives the answer away. The full explanation is shown in
       the feedback panel after the user answers. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* --- Feedback --- */

.step-feedback {
    position: fixed;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 640px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    z-index: 98;
    animation: slideUp 0.3s var(--ease-spring);
}

.step-feedback-correct {
    border-color: var(--green-border);
}

.step-feedback-incorrect {
    border-color: var(--red-border);
}

.step-feedback-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-feedback-correct .step-feedback-icon {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.step-feedback-incorrect .step-feedback-icon {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.step-feedback-icon svg {
    width: 16px;
    height: 16px;
}

.step-feedback-text {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
    flex: 1;
}

.step-feedback-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.step-feedback-correct .step-feedback-text strong {
    color: var(--green);
}

.step-feedback-incorrect .step-feedback-text strong {
    color: var(--red);
}

/* --- Buttons --- */

.step-btn {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
    font-size: 0.88rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.step-btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 14px 32px;
    font-weight: 700;
}

.step-btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(36, 80, 184, 0.25);
}

.step-btn-primary:active {
    transform: translateY(0);
}

.step-btn-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.step-btn-secondary {
    background: transparent;
    color: var(--accent-light);
    border: 1.5px solid var(--border-accent);
    padding: 13px 28px;
    font-weight: 600;
}

.step-btn-secondary:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* --- Rewrite Specific --- */

.step-weak-version {
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 1.5rem;
}

.step-weak-version p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.step-version-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    margin-bottom: 8px;
}

.step-label-weak {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.step-label-a,
.step-label-b {
    background: var(--accent-glow);
    color: var(--accent-light);
    border: 1px solid var(--border-accent);
}

.step-rewrite-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-rewrite-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    width: 100%;
    cursor: pointer;
    background: transparent;
    transition: all var(--transition);
    text-align: left;
    font-family: var(--font-body);
}

.step-rewrite-option:hover {
    border-color: var(--border-accent);
    background: var(--accent-glow);
}

.step-rewrite-option.selected {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.step-rewrite-option.correct {
    border-color: var(--green);
    background: var(--green-bg);
}

.step-rewrite-option.incorrect {
    border-color: var(--red);
    background: var(--red-bg);
}

.step-rewrite-option .option-text {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.55;
}

/* --- Fill Blank Specific --- */

.step-fill-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent);
    color: var(--accent-light);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 2px 20px 4px 4px;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233366d6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    background-size: 12px;
}

.step-fill-select:hover {
    border-color: var(--accent-light);
}

.step-fill-select:focus {
    border-color: var(--accent-light);
}

.step-fill-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}


/* ===========================================
   4. COMPLETION MOMENTS
   =========================================== */

/* Completion Toast */
.completion-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 1000;
    animation: toastSlideUp 0.4s var(--ease-spring), toastFadeOut 0.3s ease 2s forwards;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    max-width: 360px;
}

.completion-toast .toast-check {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.completion-toast .toast-check .check-circle {
    fill: none;
    stroke: var(--green);
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCircle 0.5s var(--ease-out) 0.1s forwards;
}

.completion-toast .toast-check .check-tick {
    fill: none;
    stroke: var(--green);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    animation: drawTick 0.3s var(--ease-out) 0.5s forwards;
}

.completion-toast .toast-text {
    flex: 1;
}

.completion-toast .toast-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.15rem;
}

.completion-toast .toast-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Celebration Overlay */
.celebration-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

/* Celebration Card */
.celebration-card {
    background: var(--bg-card);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    animation: celebrationPop 0.5s var(--ease-spring);
    position: relative;
}

.celebration-badge {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.celebration-badge .badge-ring {
    fill: none;
    stroke: var(--green);
    stroke-width: 3;
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: drawCircle 0.8s var(--ease-out) 0.2s forwards;
}

.celebration-badge .badge-star {
    animation: starPop 0.4s var(--ease-spring) 0.6s both;
}

.celebration-badge .badge-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
}

.celebration-badge .badge-icon svg {
    width: 32px;
    height: 32px;
}

.celebration-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
}

.celebration-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    line-height: 1.55;
}

.celebration-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.celebration-stat {
    text-align: center;
}

.celebration-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green);
    display: block;
    font-family: var(--font-display);
}

.celebration-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.celebration-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Confetti */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2001;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 12px;
    top: -12px;
    animation: confettiFall var(--fall-duration, 3s) var(--fall-delay, 0s) linear forwards;
    opacity: 0.9;
    border-radius: 1px;
}

.confetti-piece:nth-child(6n+1) { background: var(--accent-light); }
.confetti-piece:nth-child(6n+2) { background: var(--green); }
.confetti-piece:nth-child(6n+3) { background: var(--orange); }
.confetti-piece:nth-child(6n+4) { background: var(--blue); }
.confetti-piece:nth-child(6n+5) { background: var(--yellow); }
.confetti-piece:nth-child(6n+6) { background: var(--red); }

/* Milestone Toast */
.milestone-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--orange-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 1000;
    animation: toastSlideUp 0.4s var(--ease-spring), toastFadeOut 0.3s ease 2s forwards;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    max-width: 360px;
}

.milestone-toast .milestone-flame {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.milestone-toast .milestone-flame svg {
    width: 24px;
    height: 24px;
    color: var(--orange);
    position: relative;
    z-index: 1;
}

.milestone-toast .milestone-flame::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 168, 106, 0.3) 0%, transparent 70%);
    animation: pulseGlow 2s ease-in-out infinite;
}

.milestone-toast .toast-text {
    flex: 1;
}

.milestone-toast .toast-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--orange);
    margin: 0 0 0.15rem;
}

.milestone-toast .toast-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
}


/* ===========================================
   5. ANIMATION KEYFRAMES
   =========================================== */

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes stepSlideOut {
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

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

@keyframes toastFadeOut {
    to {
        transform: translateY(20px);
        opacity: 0;
    }
}

@keyframes celebrationPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotateZ(0deg) rotateX(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg) rotateX(360deg);
        opacity: 0;
    }
}

@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawTick {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes starPop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-30deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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


/* ===========================================
   5c. OVERALL PROGRESS BAR (Hub View)
   =========================================== */

.overall-progress-section {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem 1.5rem;
}

.overall-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.overall-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.overall-progress-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.overall-progress-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.overall-progress-fraction {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-display);
    line-height: 1.2;
}

.overall-progress-fraction .overall-pct {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 6px;
}

.overall-progress-streak {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--orange);
    background: rgba(232, 168, 106, 0.1);
    border: 1px solid rgba(232, 168, 106, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.overall-progress-streak .streak-fire {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    vertical-align: middle;
}

.overall-progress-bar-wrap {
    width: 100%;
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.overall-progress-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width 0.8s var(--ease-out);
    position: relative;
}

.overall-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
    animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.overall-progress-paths {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.overall-progress-path-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3px 10px;
}

.overall-progress-path-chip .chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===========================================
   5d. PER-PATH PROGRESS BAR (on Path Cards)
   =========================================== */

.path-card-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.path-card-progress-bar {
    width: 100%;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.path-card-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s var(--ease-out);
}

.path-card-progress-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.path-card-progress-text .progress-steps {
    display: flex;
    align-items: center;
    gap: 4px;
}

.path-card-progress-text .progress-pct {
    font-weight: 700;
    font-family: var(--font-display);
}

/* ===========================================
   5e. RESET PROGRESS (Modal + Buttons)
   =========================================== */

.path-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reset-path-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    padding: 0;
}

.path-card:hover .reset-path-btn {
    opacity: 0.6;
}

.reset-path-btn:hover {
    opacity: 1 !important;
    color: var(--red);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.reset-all-section {
    text-align: center;
    padding: 1.5rem 0 2rem;
}

.reset-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.reset-all-btn:hover {
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.reset-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: resetFadeIn 0.15s ease;
}

@keyframes resetFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reset-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    animation: resetSlideUp 0.25s ease;
}

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

.reset-modal-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.reset-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.reset-modal-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 24px;
}

.reset-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.reset-modal-btn {
    flex: 1;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    font-family: inherit;
}

.reset-modal-btn:active {
    transform: scale(0.97);
}

.reset-modal-btn-cancel {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-secondary);
}

.reset-modal-btn-cancel:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.reset-modal-btn-danger {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.reset-modal-btn-danger:hover {
    background: #d45555;
    border-color: #d45555;
}


/* ===========================================
   6. LIGHT THEME OVERRIDES
   =========================================== */

[data-theme="light"] .path-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .path-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    border-color: var(--border-accent);
}

[data-theme="light"] .step-option:hover {
    background: rgba(36, 80, 184, 0.04);
}

[data-theme="light"] .step-option.selected {
    background: rgba(36, 80, 184, 0.06);
}

[data-theme="light"] .celebration-overlay {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .celebration-card {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .streak-flame-glow {
    opacity: 0.6;
}

[data-theme="light"] .step-weak-version {
    background: rgba(232, 106, 106, 0.05);
}

[data-theme="light"] .step-footer {
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .step-progress-bar {
    background: transparent;
}

[data-theme="light"] .completion-toast,
[data-theme="light"] .milestone-toast {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .continue-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .continue-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .path-back-link {
    background: rgba(36, 80, 184, 0.06);
    border-color: rgba(36, 80, 184, 0.15);
}

[data-theme="light"] .path-back-link:hover {
    background: rgba(36, 80, 184, 0.1);
}

[data-theme="light"] .category-card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .category-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .step-fill-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232450b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

[data-theme="light"] .step-type-mistake .step-passage {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .confetti-piece {
    opacity: 0.85;
}

/* -- Sign-in & User Feature Light Overrides -- */

[data-theme="light"] .signin-prompt {
    background: rgba(36, 80, 184, 0.04);
}

[data-theme="light"] .signin-prompt-text {
    color: var(--text-primary);
}

[data-theme="light"] .signin-prompt-close {
    color: var(--text-primary);
}

[data-theme="light"] .progress-sync-badge {
    background: rgba(76, 175, 80, 0.06);
}

[data-theme="light"] .progress-sync-link {
    color: var(--text-secondary);
}

[data-theme="light"] .progress-sync-link:hover {
    color: var(--accent);
}

/* -- Overall & Per-Path Progress Light Overrides -- */

[data-theme="light"] .overall-progress-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .overall-progress-path-chip {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .overall-progress-bar-wrap {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .path-card-progress-bar {
    background: rgba(0, 0, 0, 0.06);
}

/* -- Reset Button & Modal Light Overrides -- */

[data-theme="light"] .reset-path-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

[data-theme="light"] .reset-all-btn:hover {
    background: rgba(239, 68, 68, 0.06);
}

[data-theme="light"] .reset-modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .reset-modal {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}


/* ===========================================
   7. RESPONSIVE BREAKPOINTS
   =========================================== */

@media (max-width: 1100px) {
    .paths-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .paths-hero h1 {
        font-size: 1.85rem;
    }

    .paths-hero .subtitle {
        font-size: 0.92rem;
    }

    .paths-hero {
        padding: 120px 1.25rem 2rem;
    }

    .overall-progress-card {
        padding: 20px 22px;
    }

    .overall-progress-fraction {
        font-size: 1.2rem;
    }

    .step-view {
        padding: 3rem 1.25rem 5.5rem;
    }

    .step-type-read h2,
    .step-type-choice h2,
    .step-type-rewrite h2,
    .step-type-mistake h2,
    .step-type-fill h2 {
        font-size: 1.25rem;
    }

    .celebration-card {
        padding: 36px 28px;
    }

    .celebration-title {
        font-size: 1.3rem;
    }

    .celebration-stats {
        gap: 1.25rem;
    }

    .path-view-title-row h1 {
        font-size: 1.4rem;
    }

    .path-view-subtitle {
        font-size: 0.84rem;
    }

    .continue-card {
        padding: 20px;
        gap: 16px;
    }

    .continue-card-right .step-btn-primary {
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    .completion-toast,
    .milestone-toast {
        right: 1rem;
        bottom: 1.5rem;
        max-width: 320px;
    }

    .signin-prompt {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 600px) {
    .paths-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 1rem 2.5rem;
    }

    .path-card {
        padding: 22px;
    }

    .category-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .category-card-left {
        width: 100%;
    }

    .category-card-right {
        width: 100%;
        justify-content: space-between;
        padding-left: 46px;
    }

    .category-card-right .mini-progress {
        flex: 1;
        max-width: 120px;
    }

    .step-option {
        padding: 12px 14px;
        gap: 12px;
    }

    .step-option-letter {
        width: 26px;
        height: 26px;
        font-size: 0.72rem;
    }

    .step-option-text {
        font-size: 0.84rem;
    }

    .step-rewrite-option {
        padding: 14px 16px;
    }

    .step-feedback {
        bottom: 68px;
        width: calc(100% - 2rem);
        padding: 14px 16px;
    }

    .step-btn-primary {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .step-btn-secondary {
        padding: 11px 20px;
        font-size: 0.85rem;
    }

    .continue-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .continue-card-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .continue-card-right {
        align-items: stretch;
        min-width: 0;
    }

    .continue-card-right .step-btn-primary {
        align-self: flex-start;
    }

    .continue-step-name {
        white-space: normal;
    }

    .paths-hero {
        padding: 100px 1rem 1.75rem;
    }

    .overall-progress-section {
        padding: 0 1rem 1.25rem;
    }

    .overall-progress-card {
        padding: 16px 18px;
        gap: 10px;
    }

    .overall-progress-top {
        flex-wrap: wrap;
    }

    .overall-progress-fraction {
        font-size: 1.1rem;
    }

    .path-card-progress-text {
        font-size: 0.68rem;
    }

    .reset-path-btn {
        opacity: 0.5;
    }

    .continue-section {
        padding: 0 1rem;
        margin-bottom: 1.5rem;
    }

    .path-view {
        padding: 3rem 1rem 3.5rem;
    }
}

@media (max-width: 480px) {
    .paths-hero h1 {
        font-size: 1.55rem;
    }

    .paths-hero .subtitle {
        font-size: 0.85rem;
    }

    .paths-hero-badge {
        font-size: 0.68rem;
        padding: 0.25rem 0.7rem;
    }

    .path-card {
        padding: 18px;
        gap: 12px;
    }

    .path-card-title {
        font-size: 1.05rem;
    }

    .path-card-desc {
        font-size: 0.8rem;
    }

    .path-progress-ring {
        width: 48px;
        height: 48px;
    }

    .path-progress-ring svg {
        width: 48px;
        height: 48px;
    }

    .ring-pct {
        font-size: 0.65rem;
    }

    .streak-count {
        font-size: 1.1rem;
    }

    .streak-label {
        font-size: 0.75rem;
    }

    .step-type-read h2,
    .step-type-choice h2,
    .step-type-rewrite h2,
    .step-type-mistake h2,
    .step-type-fill h2 {
        font-size: 1.15rem;
    }

    .step-type-read .step-text,
    .step-type-choice .step-prompt,
    .step-type-rewrite .step-prompt,
    .step-type-mistake .step-prompt,
    .step-type-fill .step-prompt {
        font-size: 0.86rem;
    }

    .step-counter {
        font-size: 0.72rem;
    }

    .celebration-card {
        padding: 32px 20px;
    }

    .celebration-title {
        font-size: 1.2rem;
    }

    .celebration-subtitle {
        font-size: 0.82rem;
    }

    .celebration-stat .stat-value {
        font-size: 1.25rem;
    }

    .celebration-stats {
        gap: 1rem;
    }

    .path-view-title-row h1 {
        font-size: 1.25rem;
    }

    .category-card-info .category-title {
        font-size: 0.88rem;
    }

    .category-card-info .category-desc {
        font-size: 0.75rem;
    }

    .category-status-icon {
        width: 28px;
        height: 28px;
    }

    .category-status-icon svg {
        width: 14px;
        height: 14px;
    }

    .completion-toast,
    .milestone-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }

    .step-footer {
        padding: 0.75rem 1rem;
    }
}


/* (Reset styles are in Section 5e above) */
