/* StatUp Shared Styles - Dark Theme
   ==================================
   Common CSS for all lesson pages.
   Override --color-accent in individual pages for module-specific colors:
   - Module 1: #8B5CF6 (purple)
   - Module 2: #10B981 (green)
   - Module 3: #3B82F6 (blue)
*/

:root {
    --color-bg: #1a1a2e;
    --color-bg-end: #16213e;
    --color-bg-elevated: rgba(255,255,255,0.05);
    --color-bg-card: rgba(255,255,255,0.05);
    --color-surface: rgba(255,255,255,0.08);
    --color-border: rgba(255,255,255,0.1);
    --color-border-light: rgba(255,255,255,0.15);
    --color-text: #e0e0e0;
    --color-text-primary: #ffffff;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #71717A;
    --color-accent: #3B82F6;
    --color-accent-dim: #2563EB;
    --color-accent-light: #60A5FA;
    --color-accent-glow: rgba(59, 130, 246, 0.15);
    --color-warning: #F59E0B;
    --color-warning-dim: #D97706;
    --color-error: #EF4444;
    --color-error-light: rgba(239, 68, 68, 0.15);
    --color-success: #22c55e;
    --color-success-light: rgba(34, 197, 94, 0.15);
    --font-display: 'Space Grotesk', sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
    --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-end) 100%);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Global Stats Bar */
.global-stats-bar {
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
}

.global-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.global-stat-label {
    color: var(--color-text-muted);
}

.global-stat-value {
    color: var(--color-warning);
    font-weight: 600;
}

.global-stat-icon {
    font-size: 1rem;
}

/* Lesson Header */
.lesson-header {
    background: rgba(0,0,0,0.4);
    color: var(--color-text);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.back-btn:hover {
    background: var(--color-surface);
    color: var(--color-text-primary);
}

.lesson-header-title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.lesson-header-module {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-accent);
}

.lesson-header-points {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-warning);
    background: rgba(245, 158, 11, 0.15);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    margin-left: auto;
    transition: all 0.3s ease;
}

.lesson-header-points.points-added {
    transform: scale(1.1);
    background: rgba(245, 158, 11, 0.3);
}

/* Points Popup Animation */
.points-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-warning);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    pointer-events: none;
    z-index: 1000;
    animation: popupFloat 1s ease-out forwards;
}

@keyframes popupFloat {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -80%) scale(1);
    }
}

/* Lesson Content */
.lesson-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.lesson-progress-container {
    position: sticky;
    top: 57px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 99;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.lesson-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.lesson-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 3px;
}

.lesson-progress-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.section.active {
    display: block;
}

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

/* Typography */
h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

h3 {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
}

p {
    color: var(--color-text);
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

.lesson-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

/* Cards */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.card-accent {
    border-left: 4px solid var(--color-accent);
}

.card-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    border-left: 4px solid var(--color-warning);
}

/* Reveal Box */
.reveal-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.reveal-box h3 {
    color: var(--color-accent-light);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Scenario Box */
.scenario-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
}

.scenario-box h3 {
    color: var(--color-accent-light);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

/* Teaching Point */
.teaching-point {
    display: flex;
    gap: 1rem;
    background: var(--color-success-light);
    border-left: 4px solid var(--color-success);
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    margin: 20px 0;
}

.teaching-number {
    width: 32px;
    height: 32px;
    background: var(--color-success);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.teaching-content {
    flex: 1;
}

.teaching-content h3 {
    color: var(--color-text-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.teaching-content p {
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.teaching-content p:last-child {
    margin-bottom: 0;
}

/* Warning Point */
.warning-point {
    background: var(--color-error-light);
    border-left: 4px solid var(--color-error);
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    margin: 20px 0;
}

/* Hierarchy Pyramid */
.hierarchy-list {
    list-style: none;
    margin: 1.5rem 0;
}

.hierarchy-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--level-color);
}

.hierarchy-item .level-badge {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--level-color);
    margin-bottom: 0.5rem;
}

.hierarchy-item h4 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.hierarchy-item .description {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.hierarchy-item .limitation {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Insight Box */
.insight-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.08));
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--color-accent);
}

.insight-box p {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 500;
    margin: 0;
    color: var(--color-accent-light);
}

/* Key Insight */
.key-insight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.key-insight h4 {
    color: var(--color-accent-light);
    margin-bottom: 8px;
}

/* Example Comparison */
.example-comparison {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.example-header {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.example-row {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.example-row:last-child {
    border-bottom: none;
}

.example-design {
    font-weight: 600;
    color: var(--color-text-primary);
    min-width: 140px;
}

.example-interpretation {
    color: var(--color-text-secondary);
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

.comparison-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
}

.comparison-card.fragile,
.comparison-card.misleading {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.comparison-card.robust,
.comparison-card.honest {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.comparison-card h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.comparison-card.fragile h4,
.comparison-card.misleading h4 {
    color: var(--color-error);
}

.comparison-card.robust h4,
.comparison-card.honest h4 {
    color: var(--color-success);
}

/* Stat Number */
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

/* Tricky Cases */
.tricky-case {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.tricky-case .question {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.tricky-case .answer {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.tricky-case .answer strong {
    color: var(--color-accent);
}

/* Exercise */
.exercise-container {
    margin: 2rem 0;
}

.exercise-progress {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.exercise-scenario {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.exercise-scenario h3 {
    color: var(--color-accent-light);
    margin-bottom: 12px;
}

.scenario-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.scenario-description {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    line-height: 1.5;
}

/* Answer Buttons */
.answer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.answer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg-card);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    min-height: 56px;
}

.answer-btn:hover:not(:disabled) {
    border-color: var(--color-accent);
    background: rgba(59, 130, 246, 0.1);
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.answer-btn.correct {
    border-color: var(--color-success);
    background: var(--color-success-light);
}

.answer-btn.incorrect {
    border-color: var(--color-error);
    background: var(--color-error-light);
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.option-btn {
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: 10px;
    padding: 16px;
    color: var(--color-text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:hover:not(.disabled) {
    border-color: var(--color-accent);
    background: rgba(59, 130, 246, 0.1);
}

.option-btn.disabled {
    pointer-events: none;
}

.option-btn.correct {
    border-color: var(--color-success);
    background: var(--color-success-light);
}

.option-btn.incorrect {
    border-color: var(--color-error);
    background: var(--color-error-light);
}

/* Feedback */
.feedback {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    display: none;
    line-height: 1.6;
}

.feedback.show,
.feedback.correct,
.feedback.incorrect {
    display: block;
    animation: fadeIn 0.3s ease;
}

.feedback.correct {
    background: var(--color-success-light);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.feedback.incorrect {
    background: var(--color-error-light);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.feedback-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feedback.correct .feedback-header {
    color: var(--color-success);
}

.feedback.incorrect .feedback-header {
    color: var(--color-error);
}

.feedback p {
    font-size: 0.9375rem;
    margin: 0;
}

/* Navigation */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    gap: 16px;
}

.btn {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dim));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:disabled {
    background: rgba(255,255,255,0.1);
    color: var(--color-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
}

/* Summary List */
.summary-list {
    list-style: none;
}

.summary-list li {
    padding: 0.875rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.summary-list li:last-child {
    border-bottom: none;
}

.summary-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.1rem;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
}

/* Score Display */
.score-display {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.score-number {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

.score-breakdown,
.points-breakdown {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: left;
}

.breakdown-item,
.points-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.breakdown-item span:last-child,
.points-row span:last-child {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--color-accent);
}

/* Lesson Complete Box */
.lesson-complete {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
}

.lesson-complete-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.lesson-complete h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.lesson-complete p {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.lead {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.highlight {
    color: var(--color-accent-light);
    font-weight: 600;
}

.hidden {
    display: none !important;
}

/* Visual Demo */
.visual-demo {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
}

/* Table Demo */
.table-demo {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.table-demo th,
.table-demo td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.table-demo th {
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Checklist */
.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.checklist li:last-child {
    border-bottom: none;
}

.check-icon {
    width: 32px;
    height: 32px;
    background: rgba(59, 130, 246, 0.2);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-accent);
    flex-shrink: 0;
}

/* Red Flag */
.red-flag {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
}

.red-flag-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.red-flag-content h4 {
    color: #f87171;
    margin-bottom: 8px;
}

/* Fragility Meter */
.fragility-meter {
    height: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin: 16px 0;
    position: relative;
    overflow: hidden;
}

.fragility-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.fragility-low {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.fragility-medium {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.fragility-high {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Stat Highlight */
.stat-highlight {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-error);
    text-align: center;
    margin: 20px 0;
}

/* NNT Visual */
.nnt-visual {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0;
    justify-content: center;
}

.person-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
}

.person-icon.helped {
    background: var(--color-success);
}

.person-icon.not-helped {
    background: rgba(255,255,255,0.1);
}

/* Formula Box */
.formula-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-family: var(--font-mono);
    text-align: center;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .lesson-container {
        padding: 1.5rem 1rem 4rem;
    }

    .card {
        padding: 1.5rem;
    }

    .nav-buttons {
        gap: 0.75rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 600px) {
    /* Grids stack */
    .answer-grid,
    .options-grid,
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Container */
    .lesson-container {
        padding: 1rem 1rem 6rem;
    }

    /* Header */
    .lesson-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .lesson-header-title {
        order: 3;
        width: 100%;
        font-size: 0.8125rem;
    }

    .lesson-header-module {
        order: 4;
        font-size: 0.8rem;
    }

    .lesson-header-points {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    .back-btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }

    /* Typography */
    h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1rem;
    }

    .lead, .lesson-subtitle {
        font-size: 1rem;
    }

    /* Cards */
    .card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .reveal-box,
    .scenario-box,
    .key-insight {
        padding: 1rem;
    }

    /* Buttons - Touch friendly (min 44px) */
    .btn {
        padding: 14px 20px;
        font-size: 0.9rem;
        min-height: 48px;
    }

    .answer-btn,
    .option-btn {
        padding: 1rem;
        min-height: 56px;
        font-size: 0.9rem;
    }

    /* Navigation */
    .nav-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-buttons .btn-secondary {
        order: 2;
    }

    .nav-buttons .btn-primary {
        order: 1;
    }

    /* Progress */
    .lesson-progress-container {
        top: 52px;
        padding: 0.75rem 0;
    }

    .lesson-progress-text {
        font-size: 0.8rem;
    }

    /* Score Display */
    .score-display {
        padding: 1.5rem 1rem;
    }

    .score-number {
        font-size: 3rem;
    }

    .score-label {
        font-size: 1rem;
    }

    .breakdown-item,
    .points-row {
        font-size: 0.875rem;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    /* Teaching Points */
    .teaching-point {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .teaching-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    /* Checklist */
    .checklist li {
        padding: 12px 0;
        gap: 12px;
    }

    .check-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    /* Tables - horizontal scroll */
    .table-demo {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-demo th,
    .table-demo td {
        padding: 10px 8px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Feedback */
    .feedback {
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* Hierarchy items */
    .hierarchy-item {
        padding: 1rem;
    }

    .hierarchy-item h4 {
        font-size: 0.95rem;
    }

    /* Summary list */
    .summary-list li {
        padding: 0.75rem 0;
        padding-left: 1.25rem;
        font-size: 0.9rem;
    }

    /* Global stats bar */
    .global-stats-bar {
        padding: 0.375rem 1rem;
    }

    .global-stat {
        font-size: 0.75rem;
    }

    /* Visual elements */
    .stat-highlight {
        font-size: 2rem;
    }

    .nnt-visual {
        gap: 4px;
    }

    .person-icon {
        width: 20px;
        height: 20px;
    }
}

/* Extra small devices (iPhone SE, older Android) */
@media (max-width: 380px) {
    h1 {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    .lesson-container {
        padding: 0.75rem 0.75rem 5rem;
    }

    .card {
        padding: 1rem;
    }

    .score-number {
        font-size: 2.5rem;
    }

    .lesson-header {
        padding: 0.625rem 0.75rem;
    }

    .lesson-header-title {
        font-size: 0.75rem;
    }

    .lesson-header-module {
        font-size: 0.75rem;
    }

    .lesson-progress-text {
        font-size: 0.75rem;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .answer-btn,
    .option-btn {
        padding: 0.875rem;
        min-height: 48px;
        font-size: 0.85rem;
    }

    .global-stats-bar {
        padding: 0.25rem 0.75rem;
    }

    .global-stat {
        font-size: 0.7rem;
    }

    /* Ensure all interactive elements meet 44px touch target */
    button,
    .btn,
    input,
    textarea,
    select {
        min-height: 44px;
    }

    /* Tables need smaller text on tiny screens */
    .table-demo th,
    .table-demo td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
}
