/**
 * L² Lab - Master CSS
 *
 * Complete styling for Think Cards + Thinking Lenses
 * Cards should ONLY define category color variables in their <style>
 *
 * Usage:
 * <link rel="stylesheet" href="../lens-system.css">
 */

/* ========== LENS COLOR PALETTE ========== */
:root {
    /* Lens Colors */
    --lens-comparing: #7C3AED;        /* Purple */
    --lens-comparing-light: #EDE9FE;
    --lens-ordering: #0EA5E9;         /* Sky Blue */
    --lens-ordering-light: #E0F2FE;
    --lens-imagining: #EC4899;        /* Pink */
    --lens-imagining-light: #FCE7F3;
    --lens-testing: #F59E0B;          /* Amber */
    --lens-testing-light: #FEF3C7;
    --lens-breaking: #14B8A6;         /* Teal */
    --lens-breaking-light: #CCFBF1;
    --lens-patterns: #8B5CF6;         /* Violet */
    --lens-patterns-light: #F3E8FF;
    --lens-why: #059669;              /* Green */
    --lens-why-light: #D1FAE5;

    /* Layout */
    --page-padding: clamp(12px, 4vw, 24px);
    --card-padding: clamp(16px, 4vw, 40px);
    --header-v-padding: clamp(10px, 2.5vw, 16px);
    --content-max: 800px;
    --radius: 16px;

    /* Text colors (defaults, override in card) */
    --text: #1F2937;
    --text-light: #4B5563;
    --text-muted: #9CA3AF;

    /* Capability Tier Colors */
    --tier-seedling: #10B981;
    --tier-explorer: #3B82F6;
    --tier-thinker: #8B5CF6;
    --tier-practitioner: #F59E0B;

    /* Practitioner Sub-Context Colors */
    --context-work: #6366F1;
    --context-life: #EC4899;
    --context-self: #14B8A6;
}

/* ========== BASE RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg, #F5F5F4);
    color: var(--text);
    line-height: 1.6;
}

/* ========== HEADER ========== */
.header {
    background: var(--card, white);
    padding: var(--header-v-padding) var(--page-padding);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.header-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    padding: 6px 12px;
    background: var(--bg, #F0F9FF);
    border-radius: 20px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.back-link:hover {
    color: var(--category, #0EA5E9);
    background: var(--category-soft, #E0F2FE);
}

.category-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(0.7rem, 2.2vw, 0.8rem);
    font-weight: 700;
    color: var(--category, #0EA5E9);
    background: var(--category-soft, #E0F2FE);
    padding: 5px 12px;
    border-radius: 16px;
}

/* ========== MAIN CONTENT ========== */
main {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--page-padding) var(--page-padding) 80px;
}

/* ========== THINK CARD ========== */
.think-card {
    background: var(--card, white);
    border-radius: clamp(16px, 3vw, 24px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Card Header */
.card-header {
    background: linear-gradient(135deg, var(--category-soft, #E0F2FE), var(--category-light, #F0F9FF));
    padding: 32px 24px;
    text-align: center;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 20px;
    background: var(--card, white);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.card-number {
    background: var(--category, #0EA5E9);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-visual {
    font-size: clamp(40px, 10vw, 56px);
    margin-bottom: 20px;
    line-height: 1.2;
}

.card-question {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
}

/* Card Body */
.card-body {
    padding: 28px 24px;
}

/* ========== THINKING PROMPT ========== */
.thinking-prompt {
    background: var(--bg-warm, var(--category-light, #F0F9FF));
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border-left: 4px solid var(--category, #0EA5E9);
}

.prompt-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--category, #0EA5E9);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.thinking-prompt p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.7;
}

/* ========== SCENARIO VISUAL ========== */
.scenario-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.context-box {
    background: var(--category-light, #F0F9FF);
    border: 2px solid var(--category-soft, #E0F2FE);
    border-radius: 16px;
    padding: 20px 24px;
    text-align: center;
    min-width: 140px;
    flex: 1;
    max-width: 200px;
}

.context-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.context-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--category, #0EA5E9);
    margin-bottom: 4px;
}

.context-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

.context-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.vs-badge {
    background: var(--category, #0EA5E9);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== CHOICE SECTION ========== */
.choice-section {
    margin-bottom: 24px;
}

.choice-label {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    text-align: center;
    font-size: 1rem;
}

.choice-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.choice-btn {
    padding: 14px 24px;
    border: 3px solid;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-width: 120px;
}

.choice-btn.always {
    background: #D1FAE5;
    border-color: #10B981;
    color: #065F46;
}

.choice-btn.always:hover {
    background: #10B981;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.choice-btn.sometimes {
    background: #FEF3C7;
    border-color: #F59E0B;
    color: #92400E;
}

.choice-btn.sometimes:hover {
    background: #F59E0B;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.choice-btn.never {
    background: #FEE2E2;
    border-color: #EF4444;
    color: #991B1B;
}

.choice-btn.never:hover {
    background: #EF4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.choice-btn.selected {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.choice-btn.selected.always {
    background: #10B981;
    color: white;
}

.choice-btn.selected.sometimes {
    background: #F59E0B;
    color: white;
}

.choice-btn.selected.never {
    background: #EF4444;
    color: white;
}

.choice-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.choice-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Reset button - starts hidden, JS shows it after choice is made */
.reset-btn {
    /* display controlled by JS inline style */
    margin: 16px auto 0;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--text-muted, #9CA3AF);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #9CA3AF);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.reset-btn:hover {
    background: var(--text-muted, #9CA3AF);
    color: white;
}

/* ========== RESPONSE SECTION (after choice) ========== */
.response-section {
    display: none;
    background: var(--category-light, #F0F9FF);
    border: 2px solid var(--category-soft, #E0F2FE);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    animation: fadeInSlide 0.4s ease;
}

.response-section.visible {
    display: block;
}

.response-prompt h3 {
    margin: 0 0 8px 0;
    color: var(--category-dark, var(--category));
    font-size: 1.1rem;
}

.response-prompt p {
    margin: 0 0 16px 0;
    color: var(--text-light);
    font-style: italic;
}

/* ========== DEPENDS SECTION ========== */
.depends-section {
    display: none;
    background: var(--category-light, #F0F9FF);
    border: 2px solid var(--category-soft, #E0F2FE);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    animation: fadeInSlide 0.4s ease;
}

.depends-section.visible {
    display: block;
}

.depends-prompt h3 {
    margin: 0 0 8px 0;
    color: var(--category-dark, var(--category));
    font-size: 1.1rem;
}

.depends-prompt p {
    margin: 0 0 16px 0;
    color: var(--text-light);
}

.show-perspectives-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--category, #0EA5E9), var(--category-dark, #0284C7));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-top: 16px;
}

.show-perspectives-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ========== PERSPECTIVES SECTION ========== */
.perspectives-section {
    display: none;
    margin-bottom: 24px;
    animation: fadeInSlide 0.4s ease;
}

.perspectives-section.visible {
    display: block;
}

.perspectives-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    text-align: center;
}

.perspectives-grid {
    display: grid;
    gap: 16px;
}

.perspective-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.perspective-card.sometimes-view {
    border-color: #F59E0B;
    background: linear-gradient(135deg, #FFFBEB, white);
}

.perspective-card.always-view {
    border-color: #10B981;
    background: linear-gradient(135deg, #ECFDF5, white);
}

.perspective-card.never-view {
    border-color: #EF4444;
    background: linear-gradient(135deg, #FEF2F2, white);
}

.perspective-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.perspective-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.perspective-badge.sometimes {
    background: #FEF3C7;
    color: #92400E;
}

.perspective-badge.always {
    background: #D1FAE5;
    color: #065F46;
}

.perspective-badge.never {
    background: #FEE2E2;
    color: #991B1B;
}

.perspective-title {
    font-weight: 700;
    color: var(--text);
}

.perspective-text {
    margin: 0 0 12px 0;
    color: var(--text-light);
    line-height: 1.7;
}

.perspective-example {
    background: rgba(0, 0, 0, 0.03);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* ========== KEY INSIGHT ========== */
.key-insight {
    display: none;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 2px solid #F59E0B;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    animation: fadeInSlide 0.4s ease;
}

.key-insight.visible {
    display: block;
}

.insight-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400E;
    margin-bottom: 12px;
}

.key-insight p {
    margin: 0;
    color: #78350F;
    line-height: 1.8;
}

/* ========== TEXTAREA ========== */
.thinking-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid #E5E7EB;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.thinking-textarea:focus {
    outline: none;
    border-color: var(--category, #0EA5E9);
    box-shadow: 0 0 0 3px var(--category-light, rgba(14, 165, 233, 0.1));
}

.thinking-textarea::placeholder {
    color: var(--text-muted);
}

/* ========== HINTS SYSTEM ========== */
.hints-section {
    margin-bottom: 24px;
}

.hints-locked {
    background: #FEF3C7;
    border: 2px dashed #F59E0B;
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    color: #92400E;
}

.hints-instruction {
    text-align: center;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #E0F2FE, #BAE6FD);
    border-radius: 8px;
    color: #0369A1;
    font-size: 0.9rem;
    font-weight: 600;
}

.hints-container {
    display: none;
}

.hints-container.unlocked {
    display: block;
}

.hints-set {
    display: none;
}

.hint-card {
    background: var(--bg, #F5F5F4);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 2px solid transparent;
    overflow: hidden;
    transition: border-color 0.2s;
}

.hint-card.revealed {
    border-color: var(--category, #0EA5E9);
    background: var(--category-light, #F0F9FF);
}

.hint-btn {
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    font-family: inherit;
    text-align: left;
    transition: background 0.2s;
}

.hint-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.03);
}

.hint-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hint-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    background: var(--category, #0EA5E9);
    flex-shrink: 0;
}

.hint-content {
    display: none;
    padding: 12px 18px 16px 58px;
    padding-right: 50px; /* Space for TTS button */
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

.hint-content p {
    margin: 0 0 8px 0;
}

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

.hint-card.revealed .hint-content {
    display: block;
}

/* ========== COMPLETE ANSWER ========== */
.complete-answer {
    background: linear-gradient(135deg, var(--category-soft, #E0F2FE), var(--category-light, #F0F9FF));
    border: 2px solid var(--category, #0EA5E9);
    border-radius: var(--radius);
    margin-top: 16px;
    overflow: hidden;
}

.complete-btn {
    width: 100%;
    padding: 16px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: var(--category-dark, var(--category, #0EA5E9));
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: inherit;
    transition: background 0.2s;
}

.complete-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.03);
}

.complete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.complete-content {
    display: none;
    padding: 0 18px 20px;
}

.complete-answer.revealed .complete-content {
    display: block;
}

.complete-response {
    background: white;
    border-radius: 12px;
    padding: 20px;
    line-height: 1.8;
    border-left: 4px solid var(--category, #0EA5E9);
}

.complete-response p {
    margin: 0 0 12px 0;
}

.complete-response p:last-child {
    margin-bottom: 0;
}

.complete-response strong {
    color: var(--text);
}

/* ========== LENS REFLECTION SECTION ========== */
.lens-reflection {
    background: linear-gradient(135deg, #FAFAF9 0%, #F5F5F4 100%);
    border: 2px solid #E7E5E4;
    border-radius: 20px;
    padding: 32px 28px;
    margin-top: 32px;
    margin-bottom: 24px;
}

.lens-reflection-header {
    text-align: center;
    margin-bottom: 28px;
}

.lens-reflection-header h3 {
    font-size: 1.3rem;
    color: var(--text);
    margin: 0 0 8px 0;
    font-weight: 700;
}

.lens-reflection-header p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Lens selector grid */
.lens-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.lens-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-family: inherit;
}

.lens-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.lens-option.selected {
    border-width: 3px;
    font-weight: 700;
}

/* Individual lens option colors */
.lens-option[data-lens="comparing"]:hover,
.lens-option[data-lens="comparing"].selected {
    background: var(--lens-comparing-light);
    border-color: var(--lens-comparing);
    color: var(--lens-comparing);
}

.lens-option[data-lens="ordering"]:hover,
.lens-option[data-lens="ordering"].selected {
    background: var(--lens-ordering-light);
    border-color: var(--lens-ordering);
    color: var(--lens-ordering);
}

.lens-option[data-lens="imagining"]:hover,
.lens-option[data-lens="imagining"].selected {
    background: var(--lens-imagining-light);
    border-color: var(--lens-imagining);
    color: var(--lens-imagining);
}

.lens-option[data-lens="testing"]:hover,
.lens-option[data-lens="testing"].selected {
    background: var(--lens-testing-light);
    border-color: var(--lens-testing);
    color: var(--lens-testing);
}

.lens-option[data-lens="breaking-apart"]:hover,
.lens-option[data-lens="breaking-apart"].selected {
    background: var(--lens-breaking-light);
    border-color: var(--lens-breaking);
    color: var(--lens-breaking);
}

.lens-option[data-lens="patterns"]:hover,
.lens-option[data-lens="patterns"].selected {
    background: var(--lens-patterns-light);
    border-color: var(--lens-patterns);
    color: var(--lens-patterns);
}

.lens-option[data-lens="asking-why"]:hover,
.lens-option[data-lens="asking-why"].selected {
    background: var(--lens-why-light);
    border-color: var(--lens-why);
    color: var(--lens-why);
}

/* Confirmation message */
.lens-confirmation {
    display: none;
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    border: 2px solid #059669;
    border-radius: 12px;
    text-align: center;
    animation: fadeInSlide 0.4s ease;
}

.lens-confirmation.visible {
    display: block;
}

.lens-confirmation-text {
    font-size: 0.95rem;
    color: #065F46;
    font-weight: 600;
    margin: 0;
}

.lens-learn-more {
    margin-top: 20px;
    text-align: center;
}

.lens-learn-more a {
    color: var(--category, #7C3AED);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--category-light, #EDE9FE);
    transition: all 0.2s ease;
}

.lens-learn-more a:hover {
    background: var(--category-soft, #DDD6FE);
    text-decoration: underline;
}

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

/* ========== NAVIGATION SECTION ========== */
.nav-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #E5E7EB;
}

/* ========== PARENT/TEACHER GUIDANCE ========== */
.adult-guidance {
    margin-top: 32px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 2px solid #F59E0B;
    border-radius: 16px;
    overflow: hidden;
}

/* Header - always visible */
.adult-guidance .guidance-header {
    padding: 16px 20px 0;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
}

.adult-guidance .guidance-label {
    font-weight: 700;
    color: #92400E;
    font-size: 1.05rem;
}

/* Micro-story - always visible */
.adult-guidance .micro-story {
    background: linear-gradient(135deg, #FEF9C3, #FEF3C7);
    border-left: 4px solid #F59E0B;
    padding: 16px;
    margin: 16px 20px;
    border-radius: 0 12px 12px 0;
}

.adult-guidance .micro-story p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #78350F;
}

.adult-guidance .micro-story p:last-child {
    margin-bottom: 0;
}

/* "See more" expandable section */
.adult-guidance .guidance-more {
    margin: 0;
    border: none;
    background: none;
}

.adult-guidance .guidance-more summary {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #B45309;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.adult-guidance .guidance-more summary:hover {
    color: #92400E;
}

.adult-guidance .guidance-more summary::-webkit-details-marker {
    display: none;
}

.adult-guidance .guidance-more[open] summary {
    border-bottom: 1px solid #FCD34D;
    padding-bottom: 12px;
}

/* Expanded content */
.adult-guidance .guidance-content {
    padding: 16px 20px 20px;
    background: #FFFBEB;
}

.adult-guidance .guidance-content p {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #78350F;
}

.adult-guidance .guidance-content ul {
    margin: 8px 0 16px 20px;
    color: #78350F;
}

.adult-guidance .guidance-content li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.adult-guidance .guidance-content em {
    font-style: italic;
    color: #92400E;
}

/* ========== TEXT-TO-SPEECH BUTTON ========== */
.tts-btn {
    background: none;
    border: 2px solid var(--category, #7C3AED);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--category, #7C3AED);
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.tts-btn:hover {
    background: var(--category-light, #EDE9FE);
    transform: scale(1.1);
}

.tts-btn.playing {
    background: var(--category, #7C3AED);
    color: white;
    animation: pulse-tts 1s ease-in-out infinite;
}

.tts-btn:focus {
    outline: 3px solid var(--category, #7C3AED);
    outline-offset: 2px;
}

@keyframes pulse-tts {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* TTS in card header - floating top-right */
.card-header {
    position: relative;
}

.card-header .tts-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-header .tts-btn:hover {
    background: var(--category-light, #EDE9FE);
}

/* TTS inline with section headers */
.tts-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tts-inline .tts-btn {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
}

/* TTS for hints - smaller, inline */
.hint-btn .tts-btn {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    margin-left: auto;
}

/* TTS inside hint content - floating top-right */
.hint-content {
    position: relative;
}

.hint-content .tts-hint {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* TTS inside complete response - floating top-right */
.complete-response {
    position: relative;
}

.complete-response .tts-complete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* TTS inside micro-story - floating top-right */
.micro-story {
    position: relative;
}

.micro-story .tts-story {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    background: white;
    border-color: #F59E0B;
    color: #F59E0B;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.micro-story .tts-story:hover {
    background: #FEF3C7;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg, #F5F5F4);
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--category-light, #F0F9FF);
    border-color: var(--category, #0EA5E9);
    color: var(--category, #0EA5E9);
}

.nav-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.nav-link-prev {
    margin-right: auto;
}

.nav-link-next {
    margin-left: auto;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 24px var(--page-padding);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========== LENS TAGS (Optional Header Badges) ========== */
.lens-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lens-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: help;
    position: relative;
}

.lens-tag.primary {
    border: 2px solid;
    font-weight: 700;
}

.lens-tag.secondary {
    border: 1.5px dashed;
    opacity: 0.85;
    font-weight: 600;
}

.lens-tag[data-lens="comparing"] {
    background: var(--lens-comparing-light);
    color: var(--lens-comparing);
    border-color: var(--lens-comparing);
}

.lens-tag[data-lens="ordering"] {
    background: var(--lens-ordering-light);
    color: var(--lens-ordering);
    border-color: var(--lens-ordering);
}

.lens-tag[data-lens="imagining"] {
    background: var(--lens-imagining-light);
    color: var(--lens-imagining);
    border-color: var(--lens-imagining);
}

.lens-tag[data-lens="testing"] {
    background: var(--lens-testing-light);
    color: var(--lens-testing);
    border-color: var(--lens-testing);
}

.lens-tag[data-lens="breaking-apart"] {
    background: var(--lens-breaking-light);
    color: var(--lens-breaking);
    border-color: var(--lens-breaking);
}

.lens-tag[data-lens="patterns"] {
    background: var(--lens-patterns-light);
    color: var(--lens-patterns);
    border-color: var(--lens-patterns);
}

.lens-tag[data-lens="asking-why"] {
    background: var(--lens-why-light);
    color: var(--lens-why);
    border-color: var(--lens-why);
}

.lens-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== CAPABILITY TOGGLE ========== */
.capability-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.tier-row {
    display: flex;
    gap: 4px;
    background: var(--bg, #F5F5F4);
    padding: 4px;
    border-radius: 20px;
}

.tier-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.5;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tier-btn.active {
    opacity: 1;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tier-btn:hover:not(.active) {
    opacity: 0.8;
    background: rgba(255,255,255,0.5);
}

.tier-btn:focus {
    outline: 3px solid var(--tier-thinker);
    outline-offset: 2px;
}

/* Tier neutralizer - prevents prestige coding */
.tier-neutralizer {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 6px;
    opacity: 0.8;
}

/* Practitioner sub-context toggle */
.practitioner-context {
    display: none;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    background: var(--bg, #F5F5F4);
    border-radius: 12px;
    animation: fadeInSlide 0.3s ease;
}

.practitioner-context.visible {
    display: flex;
}

.context-btn {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid transparent;
    background: white;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.context-btn.active {
    border-color: var(--tier-practitioner);
    background: #FEF3C7;
}

.context-btn:hover:not(.active) {
    background: #FEFCE8;
}

/* Tier-specific content visibility */
.tier-content {
    display: none;
}

.tier-content.active {
    display: block;
    animation: fadeInSlide 0.3s ease;
}

/* ========== CONDITION CHIPS (Explorer Tier) ========== */
.condition-chips {
    margin-top: 16px;
    padding: 16px;
    background: #EFF6FF;
    border-radius: 12px;
    border: 1px solid #BFDBFE;
    animation: fadeInSlide 0.3s ease;
}

.condition-prompt {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1E40AF;
    margin-bottom: 12px;
    text-align: center;
}

.chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.condition-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 2px solid #BFDBFE;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
    font-family: inherit;
    font-size: 0.9rem;
}

.condition-chip:hover {
    border-color: #3B82F6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15);
}

.condition-chip.selected {
    background: #3B82F6;
    color: white;
    border-color: #3B82F6;
}

.condition-chip .chip-help {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 4px;
}

.condition-chip.selected .chip-help {
    color: rgba(255, 255, 255, 0.8);
}

.chip-feedback {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #166534;
    border-left: 3px solid #10B981;
    animation: fadeInSlide 0.3s ease;
}

/* ========== SERIES-PAUSE SECTION ========== */
.series-pause, .gym-pause {
    margin-top: 32px;
    padding: 32px 24px;
    background: linear-gradient(135deg, #F0FDF4 0%, white 100%);
    border-radius: 20px;
    text-align: center;
    border: 2px solid #86EFAC;
}

.pause-reflection {
    margin-bottom: 24px;
}

.pause-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.pause-reflection h2 {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 1.4rem;
    color: #166534;
    margin: 0 0 8px 0;
}

.pause-reflection p {
    color: var(--text);
    font-size: 1rem;
    margin: 0;
}

.pause-prompt {
    max-width: 400px;
    margin: 0 auto 24px;
    text-align: left;
}

.pause-prompt .prompt-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.pause-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    height: 60px;
}

.pause-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto 16px;
}

.pause-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    font-family: inherit;
}

.pause-btn.primary {
    background: #166534;
    color: white;
}

.pause-btn.secondary {
    background: white;
    color: #166534;
    border: 2px solid #166534;
}

.pause-btn.tertiary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid #D1D5DB;
}

.pause-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 4px;
}

.home-link {
    color: var(--text-light);
    font-size: 0.9rem;
    text-decoration: none;
}

.home-link:hover {
    color: var(--category, #7C3AED);
    text-decoration: underline;
}

/* ========== META-REFLECTION ========== */
.meta-reflection {
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #FDF4FF 0%, white 100%);
    border-radius: 12px;
    border-left: 3px solid #A855F7;
    text-align: center;
}

.reflection-prompt {
    font-size: 0.95rem;
    color: #7E22CE;
    font-weight: 500;
    margin: 0;
}

/* ========== MICRO-CHOICE (FAQ-Only Folders) ========== */
.micro-choice {
    margin: 20px 0;
    padding: 16px;
    background: #F0F9FF;
    border-radius: 12px;
    border: 1px solid #BAE6FD;
}

.micro-prompt {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0369A1;
    margin-bottom: 12px;
    text-align: center;
}

.micro-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.micro-btn {
    padding: 10px 16px;
    background: white;
    border: 2px solid #BAE6FD;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.micro-btn:hover {
    border-color: #0EA5E9;
    transform: translateY(-1px);
}

.micro-btn.selected {
    background: #0EA5E9;
    color: white;
    border-color: #0EA5E9;
}

.micro-feedback {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #0369A1;
    text-align: center;
    animation: fadeInSlide 0.3s ease;
}

/* ========== FAQ SECTION ========== */
.faq-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg, #F5F5F4);
    border-radius: var(--radius);
}

.faq-section h3 {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 1.1rem;
    margin: 0 0 16px 0;
    color: var(--text);
}

.faq-works, .faq-limits, .faq-caution {
    margin-bottom: 16px;
}

.faq-works:last-child, .faq-limits:last-child, .faq-caution:last-child {
    margin-bottom: 0;
}

.faq-works h4 {
    color: #059669;
    font-size: 0.9rem;
    margin: 0 0 8px 0;
}

.faq-limits h4, .faq-caution h4 {
    color: #DC2626;
    font-size: 0.9rem;
    margin: 0 0 8px 0;
}

.faq-item {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item strong {
    color: var(--category, #7C3AED);
}

.faq-item em {
    color: var(--text-light);
    font-style: normal;
}

/* ========== SEEDLING SCAFFOLDS ========== */
.nudge-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: #FEF3C7;
    border: 2px dashed #F59E0B;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #92400E;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-bottom: 12px;
}

.nudge-btn:hover {
    background: #FDE68A;
}

.nudge-text {
    padding: 12px 16px;
    background: #FFFBEB;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #78350F;
    border-left: 3px solid #F59E0B;
    margin-bottom: 16px;
    animation: fadeInSlide 0.3s ease;
}

/* Reveal section (Seedling tier) */
.reveal-section {
    margin-top: 16px;
}

.reveal-locked {
    padding: 16px;
    background: #FEF3C7;
    border: 2px dashed #F59E0B;
    border-radius: var(--radius);
    text-align: center;
    color: #92400E;
    font-size: 0.9rem;
}

.reveal-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--category, #0EA5E9), var(--category-dark, #0284C7));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-bottom: 12px;
}

.reveal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.reveal-text {
    background: white;
    border-radius: 12px;
    padding: 20px;
    line-height: 1.8;
    border-left: 4px solid var(--category, #0EA5E9);
    animation: fadeInSlide 0.3s ease;
}

.reveal-text p {
    margin: 0 0 12px 0;
}

.reveal-text p:last-child {
    margin-bottom: 0;
}

/* ========== UTILITY CLASSES ========== */
.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: clamp(8px, 2vw, 12px);
    justify-items: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
    .card-header {
        padding: 24px 16px;
    }

    .card-body {
        padding: 20px 16px;
    }

    .thinking-prompt {
        padding: 16px;
    }

    /* Choice buttons - keep in same row on mobile */
    .choice-buttons {
        gap: 8px;
    }

    .choice-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
        min-width: auto;
        flex: 1;
    }

    /* Wider textarea on mobile */
    .thinking-textarea {
        min-height: 100px;
    }

    .response-section,
    .depends-section {
        padding: 16px;
    }

    /* Scenario visual - stack on very small screens */
    .scenario-visual {
        gap: 12px;
    }

    .context-box {
        padding: 16px;
        min-width: 100px;
    }

    .context-number {
        font-size: 1.5rem;
    }

    .vs-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .hint-content {
        padding: 10px 44px 12px 44px;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .hint-content p {
        margin: 0 0 6px 0;
    }

    /* Complete answer - tighter on mobile */
    .complete-answer {
        margin-top: 12px;
    }

    .complete-btn {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .complete-content {
        padding: 0 12px 14px;
    }

    .complete-response {
        padding: 14px;
        line-height: 1.6;
    }

    .complete-response p {
        margin: 0 0 8px 0;
        font-size: 0.9rem;
    }

    /* Hint cards - tighter spacing on mobile */
    .hint-card {
        margin-bottom: 8px;
    }

    .hint-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .hints-instruction {
        padding: 10px 12px;
        margin-bottom: 8px;
        font-size: 0.85rem;
    }

    .hints-section {
        margin-bottom: 16px;
    }

    .hints-locked {
        padding: 12px;
        font-size: 0.9rem;
    }

    .lens-selector {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .lens-option {
        padding: 12px 10px;
        font-size: 0.8rem;
    }

    .lens-reflection {
        padding: 20px 16px;
        margin-top: 24px;
        margin-bottom: 16px;
        border-radius: 16px;
    }

    .lens-reflection-header {
        margin-bottom: 20px;
    }

    .lens-reflection-header h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .lens-reflection-header p {
        font-size: 0.85rem;
    }

    .nav-links {
        flex-direction: column;
    }

    /* Capability toggle - mobile */
    .tier-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .tier-neutralizer {
        font-size: 0.7rem;
    }

    .practitioner-context {
        flex-wrap: wrap;
    }

    .context-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* Condition chips - 2x2 grid on mobile */
    .chips-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .condition-chip {
        min-width: unset;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .condition-chip .chip-help {
        font-size: 0.7rem;
    }

    /* Series-pause - mobile */
    .series-pause, .gym-pause {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .pause-icon {
        font-size: 2rem;
    }

    .pause-reflection h2 {
        font-size: 1.2rem;
    }

    .pause-btn {
        padding: 14px 20px;
    }

    /* Meta-reflection - mobile */
    .meta-reflection {
        padding: 14px;
        margin-top: 20px;
    }

    .reflection-prompt {
        font-size: 0.9rem;
    }

    /* Micro-choice - mobile */
    .micro-choice {
        padding: 14px;
    }

    .micro-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* FAQ section - mobile */
    .faq-section {
        padding: 16px;
    }

    .faq-section h3 {
        font-size: 1rem;
    }

    .faq-item {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Seedling scaffolds - mobile */
    .nudge-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .reveal-section {
        margin-top: 12px;
    }

    .reveal-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .reveal-text {
        padding: 16px;
    }

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

    .nav-link-prev,
    .nav-link-next {
        margin: 0;
    }
}

@media (max-width: 400px) {
    .lens-selector {
        grid-template-columns: 1fr;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .lens-tag,
    .lens-option,
    .hint-btn,
    .nav-link {
        transition: none;
    }

    .lens-tag:hover,
    .lens-option:hover {
        transform: none;
    }

    .lens-confirmation {
        animation: none;
    }
}

.lens-option:focus,
.hint-btn:focus,
.complete-btn:focus,
.nav-link:focus {
    outline: 3px solid #3B82F6;
    outline-offset: 2px;
}

/* ========== PRINT STYLES ========== */
@media print {
    .header {
        position: static;
        box-shadow: none;
    }

    .hints-locked,
    .lens-reflection,
    .nav-section {
        display: none;
    }

    .hints-container {
        display: block !important;
    }

    .hint-content {
        display: block !important;
    }

    .complete-content {
        display: block !important;
    }
}
