/* AI Fluency Course Styles */

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%);
    min-height: 100vh;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a202c;
}

.course-container {
    max-width: 900px;
    margin: 0 auto;
    /* 24px top: compact gap below the Preview banner (or sticky header).
       60px bottom keeps comfortable breathing room above the footer. */
    padding: 24px 20px 60px;
}

/* ── Views ── */
.view { display: none; }
.view.active { display: block; }

/* ── Picker ── */
.picker-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(102,126,234,0.12);
    padding: 56px 48px;
    text-align: center;
    max-width: 580px;
    margin: 60px auto 0;
}

.picker-card h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.picker-card .picker-subtitle {
    font-size: 1.05rem;
    color: #4a5568;
    margin-bottom: 36px;
    line-height: 1.7;
}

.picker-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.picker-form label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    display: block;
}

.picker-form select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    color: #1a202c;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: auto;
}

.picker-form select:focus {
    outline: none;
    border-color: #4d59c5;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.picker-form select.picker-error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229,62,62,0.1);
}

.picker-btn {
    margin-top: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.picker-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
}

.picker-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}

/* ── Course Hero ── */
.course-hero {
    text-align: center;
    margin-bottom: 32px;
}

.course-hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.course-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-hero-subtitle {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto 20px;
}

.course-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.context-badge {
    background: #eef2ff;
    color: #4c51bf;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
}

.change-link {
    color: #4d59c5;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.change-link:hover { text-decoration: underline; }

.progress-overview {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(102,126,234,0.08);
    padding: 20px 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    border-radius: 8px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.88rem;
    color: #596780;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Knowledge Score Badge ── */
.knowledge-score-badge {
    display: inline-block;
    background: #eef2ff;
    color: #4c51bf;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-top: 8px;
}

/* ── Competency Group Headers ── */
.competency-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #f8f9ff;
    border-left: 4px solid #718096;
    font-size: 0.82rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f0f0f5;
}

.competency-group-header:first-child {
    border-radius: 20px 20px 0 0;
}

.competency-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.competency-group-count {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: #a0aec0;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Lesson List ── */
.lesson-list {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.08);
    overflow: hidden;
}

/* ── Time Estimate ── */
.lesson-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #a0aec0;
    font-weight: 600;
    margin-left: 10px;
}

.lesson-time svg {
    width: 12px;
    height: 12px;
}

/* ── Learning Objectives ── */
.learning-objectives {
    margin-top: 12px;
    margin-bottom: 16px;
    padding: 0;
    list-style: none;
}

.learning-objectives li {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.6;
    padding: 4px 0;
    padding-left: 18px;
    position: relative;
}

.learning-objectives li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4d59c5;
}

.lesson-row {
    display: flex;
    align-items: flex-start;
    padding: 20px 28px;
    border-bottom: 1px solid #f0f0f5;
    cursor: pointer;
    transition: background 0.15s;
    gap: 20px;
}

.lesson-row:last-child { border-bottom: none; }
.lesson-row:hover { background: #fafbff; }

.lesson-info {
    flex: 1;
    min-width: 0;
}

.lesson-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 3px;
}

.lesson-desc {
    font-size: 0.85rem;
    color: #596780;
    line-height: 1.5;
}

.lesson-links {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.lesson-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4d59c5;
    text-decoration: none;
}

.lesson-link:hover {
    text-decoration: underline;
}

.lesson-status-label {
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 4px 12px;
    border-radius: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.lesson-status-label.status-completed {
    background: #c6f6d5;
    color: #276749;
}

.lesson-status-label.status-in_progress {
    background: #bee3f8;
    color: #2b6cb0;
}

.lesson-status-label.status-not_started {
    background: #edf2f7;
    color: #a0aec0;
}

/* ── Certificate button ── */
.certificate-row {
    margin-top: 24px;
    text-align: center;
}

.certificate-btn {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.certificate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
}

/* ── Lesson Detail ── */
.lesson-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4d59c5;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 20px;
}

.lesson-back:hover { text-decoration: underline; }

.lesson-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.lesson-progress-bar {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.lesson-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    border-radius: 6px;
}

.lesson-progress-label {
    font-size: 0.82rem;
    color: #a0aec0;
    font-weight: 600;
    white-space: nowrap;
}

.lesson-detail-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(102,126,234,0.10);
    overflow: hidden;
}

.lesson-detail-header {
    padding: 36px 40px 28px;
    border-bottom: 1px solid #f0f0f5;
}

.lesson-detail-header h1 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.lesson-detail-body {
    padding: 36px 40px 40px;
}

.lesson-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a0aec0;
    margin-bottom: 14px;
    margin-top: 36px;
}

.lesson-section-title:first-child { margin-top: 0; }

.lesson-text {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 16px;
}

.lesson-body-list {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.7;
    margin: 8px 0 20px 0;
    padding-left: 24px;
}
.lesson-body-list li {
    margin-bottom: 10px;
}
.lesson-body-list li:last-child { margin-bottom: 0; }
.lesson-body-list li strong {
    color: #1a202c;
    font-weight: 600;
}

/* ── Inline pro-tip callout (max 1-2 per lesson, author-placed) ── */
.lesson-pro-tip {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 18px 0;
}
.lesson-pro-tip-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}
.lesson-pro-tip-body { flex: 1; min-width: 0; }
.lesson-pro-tip-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #92400e;
    margin-bottom: 4px;
}
.lesson-pro-tip-text {
    font-size: 0.95rem;
    color: #1a202c;
    line-height: 1.55;
}
.lesson-pro-tip-text strong { font-weight: 700; }

/* ── Defensibility callouts (4 types, author-placed, voice-mapped) ── */
.lesson-callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 18px 0;
    border-left: 4px solid;
}
.lesson-callout-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}
.lesson-callout-body { flex: 1; min-width: 0; }
.lesson-callout-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    opacity: 0.75;
}
.lesson-callout-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
}
.lesson-callout-text {
    font-size: 0.95rem;
    color: #1a202c;
    line-height: 1.55;
}
.lesson-callout-text strong { font-weight: 700; }
.lesson-callout-text em { font-style: italic; }

/* What to log — neutral gray, "log/record" register */
.lesson-what-to-log { background: #f8fafc; border-color: #64748b; }
.lesson-what-to-log .lesson-callout-eyebrow { color: #475569; }

/* Failure case — amber/red, urgency */
.lesson-failure-case { background: #fef2f2; border-color: #dc2626; }
.lesson-failure-case .lesson-callout-eyebrow { color: #991b1b; }

/* Role-fit — blue, industry-specific framing */
.lesson-role-fit { background: #eff6ff; border-color: #2563eb; }
.lesson-role-fit .lesson-callout-eyebrow { color: #1e40af; }

/* Audit question — purple, future-review framing */
.lesson-audit-question { background: #faf5ff; border-color: #7c3aed; }
.lesson-audit-question .lesson-callout-eyebrow { color: #5b21b6; }

/* ── Collapsible lesson sections (accordion) ── */
.lesson-accordion-item {
    margin: 12px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fafbff;
    border: 1px solid #e9ecf6;
    transition: box-shadow 0.18s;
}

.lesson-accordion-item.expanded {
    box-shadow: 0 4px 14px rgba(102,126,234,0.06);
}

.lesson-accordion-header {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: inherit;
}

.lesson-accordion-header:hover {
    background: rgba(0, 0, 0, 0.025);
}

.lesson-accordion-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.lesson-accordion-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b6b7a;
}

.lesson-accordion-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.4;
}

.lesson-accordion-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #6b6b7a;
    transition: transform 0.2s;
}

.lesson-accordion-item.expanded .lesson-accordion-chevron {
    transform: rotate(180deg);
}

.lesson-accordion-content {
    padding: 4px 22px 22px;
    display: none;
}

.lesson-accordion-item.expanded .lesson-accordion-content {
    display: block;
}

.lesson-accordion-content p:last-child,
.lesson-accordion-content > ul:last-child,
.lesson-accordion-content > ol:last-child {
    margin-bottom: 0;
}

/* Variant: case anchor (amber, risk-mapping sidebar) */
.lesson-accordion-item.section-case-anchor {
    background: #fff8e1;
    border: 0;
    border-left: 4px solid #d97706;
    border-radius: 8px;
}
.lesson-accordion-item.section-case-anchor .lesson-accordion-eyebrow { color: #92400e; }

.case-anchor-claims {
    font-size: 0.85rem;
    color: #6b6b7a;
    margin-bottom: 10px;
    font-style: italic;
}

.case-anchor-summary {
    font-size: 0.9rem;
    color: #2d3748;
    line-height: 1.65;
    margin-bottom: 10px;
}

.case-anchor-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #92400e;
    font-weight: 600;
    text-decoration: none;
}

.case-anchor-link:hover { text-decoration: underline; }

/* Variant: why this matters (purple, Phase 2/3 reporting tie-in) */
.lesson-accordion-item.section-why-matters {
    background: #f3f0ff;
    border: 0;
    border-left: 4px solid #5b3082;
    border-radius: 8px;
}
.lesson-accordion-item.section-why-matters .lesson-accordion-content p {
    font-size: 0.9rem;
    color: #2d3748;
    line-height: 1.7;
    margin: 0;
}

/* Variant: industry variant card (gradient) */
.lesson-accordion-item.section-variant {
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
    border: 1px solid #c3d0f8;
}
.lesson-accordion-item.section-variant .lesson-accordion-eyebrow { color: #4d59c5; }
.lesson-accordion-item.section-variant .lesson-accordion-content p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 12px;
}
.lesson-accordion-item.section-variant .lesson-accordion-content p:last-child { margin-bottom: 0; }

.variant-scenario-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5b3082;
    margin-top: 16px;
    margin-bottom: 8px;
}

/* Variant: takeaways (subtle green) */
.lesson-accordion-item.section-takeaways {
    background: #f4fbf6;
    border: 1px solid #d4eddb;
}

/* Variant: practice (yellow CTA — visually prominent action zone) */
.lesson-accordion-item.section-practice {
    background: #fffbeb;
    border: 2px solid #F5C542;
    margin: 28px 0 20px;
    box-shadow: 0 4px 18px rgba(245, 197, 66, 0.18);
}
.lesson-accordion-item.section-practice .lesson-accordion-header {
    background: #F5C542;
    padding: 22px 24px;
}
.lesson-accordion-item.section-practice .lesson-accordion-header:hover {
    background: #f0bb35;
}
.lesson-accordion-item.section-practice .lesson-accordion-eyebrow {
    color: #1a202c;
    font-size: 0.74rem;
    opacity: 0.75;
}
.lesson-accordion-item.section-practice .lesson-accordion-title {
    color: #1a202c;
    font-size: 1.15rem;
}
.lesson-accordion-item.section-practice .lesson-accordion-chevron {
    color: #1a202c;
}
.lesson-accordion-item.section-practice .lesson-accordion-content {
    padding: 20px 24px 24px;
}

.practice-inline-intro {
    font-size: 0.95rem;
    color: #2d3748;
    line-height: 1.65;
    margin: 0 0 10px;
}
.practice-inline-meta {
    font-size: 0.88rem;
    color: #6b5e1f;
    margin: 0 0 18px;
}
.practice-inline-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.practice-inline-option {
    background: white;
    border: 1px solid #e9ecf6;
    border-radius: 14px;
    padding: 20px 22px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.practice-inline-option:hover {
    border-color: #4d59c5;
    box-shadow: 0 4px 14px rgba(102,126,234,0.10);
}
.practice-inline-option-header {
    margin-bottom: 8px;
}
.practice-inline-option-topic {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
    line-height: 1.4;
}
.practice-inline-option-hook {
    font-size: 0.9rem;
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 10px;
    font-style: italic;
}
.practice-inline-option-tip {
    font-size: 0.8rem;
    color: #4d59c5;
    line-height: 1.5;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #f0f4ff;
    border-radius: 8px;
    border-left: 3px solid #4d59c5;
}
.practice-inline-launch-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.practice-inline-launch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 48, 130, 0.30);
}

/* ── Takeaways ── */
.takeaways-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.takeaways-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    border-bottom: 1px solid #f0f0f5;
}

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

.takeaway-check {
    color: #48bb78;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── MCQ ── */
.mcq-section {
    margin-top: 36px;
}

.mcq-item {
    background: #f8f9ff;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
}

.mcq-question {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    line-height: 1.5;
}

.mcq-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mcq-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.92rem;
    color: #4a5568;
}

.mcq-option:hover { border-color: #4d59c5; background: #fafbff; }
.mcq-option.selected { border-color: #4d59c5; background: #eef2ff; }
.mcq-option.correct { border-color: #48bb78; background: #f0fff4; }
.mcq-option.incorrect { border-color: #fc8181; background: #fff5f5; }
.mcq-option.disabled { pointer-events: none; opacity: 0.7; }
.mcq-option.correct.disabled, .mcq-option.incorrect.disabled { opacity: 1; }

.mcq-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
}

.mcq-option.selected .mcq-radio {
    border-color: #4d59c5;
}

.mcq-option.selected .mcq-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #4d59c5;
    border-radius: 50%;
}

.mcq-option.correct .mcq-radio { border-color: #48bb78; }
.mcq-option.correct .mcq-radio::after { background: #48bb78; }
.mcq-option.incorrect .mcq-radio { border-color: #fc8181; }

.mcq-check-btn {
    margin-top: 12px;
    padding: 10px 24px;
    background: #4d59c5;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.mcq-check-btn:hover { background: #5a67d8; }
.mcq-check-btn:disabled { background: #cbd5e0; cursor: not-allowed; }

.mcq-retry-btn {
    margin-top: 12px;
    margin-left: 8px;
    padding: 10px 20px;
    background: white;
    color: #4d59c5;
    border: 1.5px solid #4d59c5;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.mcq-retry-btn:hover { background: #eef2ff; }

/* Dashboard one-line cert disclosure — surfaces the rule before the
   user starts working, not just inside the Resume slot eyebrow. */
.cert-rules-strip {
    background: #f7f8fc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.92rem;
    color: #2d3748;
    line-height: 1.5;
    margin-top: 14px;
}
.cert-rules-strip strong { color: #1a202c; }
.cert-rules-progress {
    display: inline-block;
    margin-left: 8px;
    background: #eef2ff;
    color: #4d59c5;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
}

/* Lesson-bottom certificate CTA — three states: locked (greyed),
   ready (green), issued (purple). Always rendered for paid tiers
   so the cert rule is visible from every lesson. */
.lesson-cert-cta {
    display: flex;
    gap: 16px;
    align-items: center;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 24px 0;
}
.lesson-cert-cta-locked {
    background: #f7f8fc;
    border: 1px solid #e2e8f0;
}
.lesson-cert-cta-ready {
    background: #f0fdf4;
    border: 1px solid #86efac;
}
.lesson-cert-cta-issued {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
}
.lesson-cert-cta-body { flex: 1; }
.lesson-cert-cta-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-bottom: 4px;
}
.lesson-cert-cta-ready .lesson-cert-cta-eyebrow { color: #15803d; }
.lesson-cert-cta-issued .lesson-cert-cta-eyebrow { color: #4338ca; }
.lesson-cert-cta-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 6px;
}
.lesson-cert-cta-rule {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.5;
}
.lesson-cert-cta-btn {
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    white-space: nowrap;
}
.lesson-cert-cta-btn:hover { box-shadow: 0 8px 20px rgba(102,126,234,0.3); }
.lesson-cert-cta-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
}
.lesson-cert-cta-ready .lesson-cert-cta-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.mcq-explanation {
    margin-top: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.6;
    display: none;
}

.mcq-explanation.correct {
    background: #f0fff4;
    border-left: 3px solid #48bb78;
    color: #276749;
    display: block;
}

.mcq-explanation.incorrect {
    background: #fff5f5;
    border-left: 3px solid #fc8181;
    color: #9b2c2c;
    display: block;
}

/* ── Module tags ── */
.module-cc { background: #eef2ff; color: #4c51bf; }
.module-aa { background: #fef3e0; color: #c05621; }
.module-dc { background: #e6ffed; color: #276749; }

/* ── Practice Page ── */
.practice-page-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(102,126,234,0.10);
    overflow: hidden;
    margin-top: 16px;
}

.practice-page-header {
    padding: 36px 40px 28px;
    border-bottom: 1px solid #f0f0f5;
}

.practice-page-header h1 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #1a202c;
}

.practice-page-badge {
    display: inline-block;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 16px;
    margin-bottom: 14px;
}

.practice-page-subtitle {
    font-size: 0.95rem;
    color: #596780;
    line-height: 1.6;
}

.practice-page-options {
    padding: 28px 40px 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.practice-page-option {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.practice-page-option:hover {
    border-color: #4d59c5;
    box-shadow: 0 4px 16px rgba(102,126,234,0.10);
}

.practice-page-option-header {
    margin-bottom: 10px;
}

.practice-page-module-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 10px;
    display: inline-block;
}

.practice-page-option-topic {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
}

.practice-page-option-hook {
    font-size: 0.92rem;
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 10px;
    font-style: italic;
}

.practice-page-option-tip {
    font-size: 0.82rem;
    color: #4d59c5;
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #f0f4ff;
    border-radius: 8px;
    border-left: 3px solid #4d59c5;
}

.practice-page-launch-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.practice-page-launch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.35);
}

.practice-page-launch-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.practice-page-skip {
    padding: 0 40px 32px;
    text-align: center;
}

.practice-page-skip a {
    color: #4d59c5;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.practice-page-finish p {
    color: #596780;
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.practice-page-finish a {
    font-size: 1rem;
}

.practice-page-skip a:hover {
    text-decoration: underline;
}

/* ── Source link ── */
.source-attribution {
    margin-top: 32px;
    padding: 16px 20px;
    background: #f7fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: #596780;
}

.source-attribution a {
    color: #4d59c5;
    text-decoration: none;
    font-weight: 600;
}

.source-attribution a:hover { text-decoration: underline; }

/* ── Lesson nav ── */
.lesson-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f5;
}

.lesson-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #4a5568;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s;
}

.lesson-nav-btn:hover { border-color: #4d59c5; color: #4d59c5; }
.lesson-nav-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ── Tier loading shim — hide course content until /auth/me resolves ── */
body.tier-loading .course-container { visibility: hidden; }

/* Visible "Loading your course…" panel during the same window. The
   overlay is display:none by default and only paints while the body
   carries .tier-loading; bootResolveTier() strips that class once the
   /auth/me + course/progress fetches resolve, hiding this automatically. */
.course-loading-overlay { display: none; }
body.tier-loading .course-loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
}
.course-loading-card {
    text-align: center;
}
.course-loading-text {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
}

/* ── Single-bar course header (replaces nav + admin band + sub-nav) ── */
.course-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 12px rgba(15, 23, 42, 0.05);
}
.course-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.course-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1a202c;
    flex-shrink: 0;
}
.course-header-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.course-header-brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1a202c;
}
.course-header-tabs {
    display: flex;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.course-header-tabs::-webkit-scrollbar { display: none; }
.course-header-tab {
    background: transparent;
    border: none;
    padding: 0 14px;
    height: 64px;
    margin-bottom: -1px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #4a5568;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.course-header-tab:hover { color: #1a202c; }
.course-header-tab.active {
    color: #4d59c5;
    border-bottom-color: #4d59c5;
}
.course-header-tab-count {
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
}
.course-header-tab.active .course-header-tab-count { background: #4d59c5; color: white; }
.course-header-user {
    position: relative;
    flex-shrink: 0;
}
.user-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background 0.15s;
}
.user-trigger:hover { background: #f1f5f9; }
.user-trigger-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.user-trigger-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.user-trigger-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a202c;
}
.user-trigger-tier {
    font-size: 0.7rem;
    font-weight: 600;
    color: #596780;
}
.user-trigger-caret {
    width: 11px; height: 8px;
    color: #94a3b8;
    margin-left: 2px;
}
.user-signin-link {
    color: #4d59c5;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #4d59c5;
    border-radius: 9px;
    font-size: 0.9rem;
}
/* Anon AFC: the inner <nav class="course-header-marketing-nav"> uses the
   shared .nav-container/.nav-links styles from styles.css. The outer
   .course-header still provides sticky + bottom-border. The trust banner
   is a sub-row below the nav. */
.course-header-marketing-nav {
    display: block;
}
.course-header-trust-banner {
    background: #fef3c7;
    color: #92400e;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    border-bottom: 1px solid #fde68a;
}
.course-header-trust-banner strong {
    color: #1a202c;
}
.course-header-trust-banner a {
    color: #92400e;
    text-decoration: underline;
    font-weight: 700;
}
.course-header-trust-banner a:hover {
    color: #78350f;
}

/* Signed-in AFC: user dropdown positioned at the right edge of the nav,
   sitting alongside .nav-links inside .nav-container. */
.course-header-marketing-nav .nav-container {
    position: relative;
}
.course-header-user-pos {
    position: relative;
    margin-left: 12px;
}
/* Active state for the in-app nav links (Course / Reports / Certificate). */
.course-header-marketing-nav .nav-links a.active {
    color: #4d59c5;
}
.course-header-marketing-nav .nav-links a.active::after {
    content: '';
    display: block;
    height: 2px;
    background: #4d59c5;
    margin-top: 2px;
    border-radius: 2px;
}
/* Disabled-looking nav link (e.g. Certificate before issuance).
   Color was #cbd5e0 (1.49:1 on white — illegible per WCAG); bumped to
   #4a5568 (7.54:1) so the label is readable while still visually muted
   relative to active links via cursor + opacity. */
.course-header-marketing-nav .nav-links .nav-link-disabled {
    color: #4a5568;
    opacity: 0.55;
    cursor: not-allowed;
    user-select: none;
    /* Match the spacing/typography of real nav links */
    text-decoration: none;
}
.course-header-marketing-nav .nav-links .nav-link-disabled:hover {
    color: #4a5568;
    opacity: 0.55;
}

/* Reports count chip inside the Reports nav link. */
.nav-count {
    display: inline-block;
    margin-left: 4px;
    background: #4d59c5;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    vertical-align: 1px;
}
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    min-width: 280px;
    overflow: hidden;
    z-index: 110;
    animation: user-menu-pop 0.16s ease-out;
}
@keyframes user-menu-pop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.user-menu[hidden] { display: none; }
.user-menu-section {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.user-menu-section:last-child { border-bottom: none; }
.user-menu-name {
    font-weight: 800;
    color: #1a202c;
    font-size: 0.95rem;
}
.user-menu-email {
    font-size: 0.82rem;
    color: #596780;
    margin-top: 2px;
}
.user-menu-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 6px;
}
.user-menu-stat {
    font-size: 0.82rem;
    color: #4a5568;
    margin-bottom: 6px;
    font-weight: 600;
}
.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 8px;
    margin: 1px -8px;
    font-size: 0.9rem;
    color: #1a202c;
    font-weight: 600;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.12s;
    font-family: inherit;
}
.user-menu-item:hover { background: #f1f5f9; }
.user-menu-item-cta {
    color: #4d59c5;
}
.user-menu-item-danger { color: #b91c1c; }
.user-menu-footer {
    background: #f8fafc;
    font-size: 0.78rem;
    text-align: center;
}
.user-menu-footer a {
    color: #4a5568;
    text-decoration: none;
    margin: 0 4px;
}
.user-menu-footer a:hover { color: #1a202c; text-decoration: underline; }
.user-menu-footer-sep { color: #cbd5e0; }

/* Refund notice — stays above the header for admin tiers */
.refund-notice { width: 100%; }
.refund-notice-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex; align-items: center; gap: 16px;
    font-size: 0.92rem;
}
.refund-notice-inner > span { flex: 1; }
.refund-notice-inner a { color: inherit; text-decoration: underline; }
.refund-notice-dismiss {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    color: inherit;
    cursor: pointer;
}

/* Referral inside dropdown modal */
.referral-modal-code {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e0;
    border-radius: 10px;
    padding: 10px 14px;
    margin: 14px 0;
}
.referral-modal-code code {
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1a202c;
    letter-spacing: 0.04em;
    flex: 1;
    background: transparent;
    padding: 0;
}
.referral-modal-copy {
    background: #4d59c5;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}
.referral-modal-share {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.referral-modal-share .referral-share-btn {
    background: #f1f5f9; color: #1a202c;
    padding: 9px 14px; border-radius: 9px;
    font-size: 0.85rem; font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}
.referral-modal-share .referral-share-btn:hover { background: #e2e8f0; }
.referral-modal-share .referral-share-btn.x { background: #000; color: white; }
.referral-modal-share .referral-share-btn.email { background: #eef2ff; color: #4338ca; }

@media (max-width: 768px) {
    .course-header-inner { padding: 0 14px; gap: 10px; height: 56px; }
    .course-header-brand-name { display: none; }
    .course-header-tab { padding: 0 10px; height: 56px; font-size: 0.88rem; }
    .user-trigger-text { display: none; }
    .user-menu { right: -8px; min-width: 260px; }
}

/* ── (legacy) admin band — no longer rendered, kept hidden ── */
.admin-band {
    display: none !important;
    position: sticky;
    top: 64px;
    z-index: 50;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    height: 48px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(45, 55, 130, 0.18);
}
.admin-band-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    font-size: 0.92rem;
}
.admin-band-tag {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(255,255,255,0.18);
    padding: 4px 10px;
    border-radius: 6px;
}
.admin-band-counter { font-weight: 600; opacity: 0.95; }
.admin-band-btn {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.12);
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
.admin-band-btn:hover { background: rgba(255,255,255,0.22); }
.admin-band-btn-secondary { background: transparent; }
.admin-band-btn-secondary:hover { background: rgba(255,255,255,0.12); }

/* ── Course sub-nav (legacy — replaced by .course-header tabs) ── */
.course-subnav { display: none !important; }

@media (max-width: 768px) {
    .admin-band { height: auto; padding: 8px 0; }
    .admin-band-inner { flex-wrap: wrap; gap: 8px; padding: 0 14px; }
    .admin-band-counter { width: 100%; order: 1; font-size: 0.82rem; }
    .admin-band-tag { order: 0; }
    .admin-band-btn { font-size: 0.82rem; padding: 6px 10px; }
}

/* Refund / dispute notice band — appears above admin strip when seats revoked or re-granted */
.refund-notice {
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: 600;
}
.refund-notice-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.refund-notice-inner a { color: inherit; text-decoration: underline; }
.refund-notice-dismiss {
    background: rgba(255,255,255,0.6);
    border: 1px solid currentColor;
    color: inherit;
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    flex-shrink: 0;
}
.refund-notice-dismiss:hover { background: white; }

/* ── Paywall card (replaces lesson body for L5–L15 when not paid) ── */
.paywall-card {
    background: linear-gradient(135deg, #fff8e1 0%, #fef3c7 100%);
    border-left: 4px solid #d97706;
    border-radius: 14px;
    padding: 36px 36px 30px;
    margin: 12px 0 20px;
}
.paywall-card-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #92400e;
    margin-bottom: 10px;
}
.paywall-card-headline {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 14px;
    line-height: 1.25;
}
.paywall-card-body {
    color: #2d3748;
    line-height: 1.65;
    margin: 0 0 22px;
    font-size: 1rem;
    max-width: 620px;
}
.paywall-card-cta-row {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.paywall-card-cta {
    display: inline-block;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    padding: 13px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    transition: transform 0.15s, box-shadow 0.15s;
}
.paywall-card-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(102,126,234,0.32);
}
.paywall-card-secondary {
    color: #4d59c5;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(77,89,197,0.4);
    padding-bottom: 2px;
}
.paywall-card-secondary:hover { border-bottom-color: #4d59c5; }
.paywall-card-footnote {
    font-size: 0.88rem;
    color: #92400e;
    margin-top: 8px;
}
.paywall-card-footnote a { color: #92400e; font-weight: 700; }

/* Lock badge on dashboard lesson rows */
.lesson-lock-badge {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: 999px;
    vertical-align: middle;
}
.lesson-row-locked .lesson-info { opacity: 0.85; }

/* ── Members drawer (chunk 1 skeleton) ── */
.members-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 100;
}
.members-drawer {
    position: fixed;
    top: 0;
    right: -480px;
    width: 480px;
    max-width: 100vw;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 40px rgba(0,0,0,0.18);
    z-index: 101;
    transition: right 0.25s ease-out;
    display: flex;
    flex-direction: column;
}
.members-drawer.open { right: 0; }
.members-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}
.members-drawer-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a202c;
}
.members-drawer-close {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}
.members-drawer-close:hover { color: #1a202c; }
.members-drawer-body { padding: 28px 24px; overflow-y: auto; flex: 1; }
.members-drawer-empty p {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
}
.members-drawer-soon {
    color: #92400e !important;
    background: #fffbeb;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid #d97706;
    font-size: 0.88rem !important;
}
.members-drawer-cta {
    display: inline-block;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    padding: 11px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    margin-top: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.92rem;
}
.members-drawer-cta-small { padding: 8px 14px; margin-top: 0; font-size: 0.85rem; }
.members-team-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Competency profile + risk register modal (V2-#1 + V2-#2) */
.profile-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.profile-modal {
    background: white;
    border-radius: 14px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}
.profile-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}
.profile-modal-header h2 {
    margin: 0; font-size: 1.15rem; font-weight: 800; color: #1a202c;
}
.profile-modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.profile-summary {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 0.92rem; line-height: 1.65;
    color: #2d3748;
}
.profile-summary div { margin: 2px 0; }
.profile-summary strong { color: #1a202c; }
.profile-summary a { color: #4d59c5; font-weight: 700; }
.profile-comp-row {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #4d59c5;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.profile-comp-row.weak {
    background: #fffbeb;
    border-left-color: #d97706;
}
.profile-comp-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 6px;
    color: #1a202c; font-size: 0.95rem;
}
.profile-bar {
    height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden;
    margin: 6px 0;
}
.profile-bar-fill {
    height: 100%; background: linear-gradient(90deg, #4d59c5, #5b3082);
}
.profile-comp-row.weak .profile-bar-fill {
    background: linear-gradient(90deg, #d97706, #b45309);
}
.profile-comp-note { font-size: 0.85rem; color: #4a5568; line-height: 1.55; margin-top: 6px; }
.profile-comp-anchor { font-size: 0.78rem; color: #92400e; margin-top: 6px; font-style: italic; }
.profile-comp-flag { font-size: 0.85rem; color: #92400e; font-weight: 700; margin: 6px 0; }
.profile-comp-sessions { font-size: 0.78rem; color: #64748b; margin-top: 6px; }
.members-drawer-loading { color: #64748b; font-size: 0.95rem; padding: 10px 0; }
.members-drawer-summary {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    color: #2d3748;
}
.members-drawer-summary strong { color: #1a202c; }
.members-drawer-self-seat {
    background: linear-gradient(135deg, #fff8e1 0%, #fef3c7 100%);
    border-left: 4px solid #d97706;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
}
.members-drawer-self-seat strong { color: #92400e; display: block; margin-bottom: 4px; }
.members-drawer-self-seat p { margin: 4px 0 10px; font-size: 0.88rem !important; color: #4a5568; }
.members-add-form { margin-bottom: 22px; }
.members-add-form label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 6px;
    display: block;
}
.members-add-row { display: flex; gap: 8px; }
.members-add-row input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.92rem;
}
.members-add-row input:focus { outline: 2px solid #4d59c5; outline-offset: -1px; border-color: #4d59c5; }
.members-add-hint { color: #64748b; font-size: 0.8rem; margin-top: 6px; }
.members-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin: 18px 0 8px;
}
.member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 8px;
}
.member-row-pending { background: #fffbeb; border-color: #fde68a; }
.member-row-info { flex: 1; min-width: 0; }
.member-row-email { font-weight: 600; color: #1a202c; font-size: 0.92rem; word-break: break-all; }
.member-status {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 999px;
}
.member-status-active { color: #166534; background: #dcfce7; }
.member-status-invited { color: #4d59c5; background: #e0e7ff; }
.member-status-certified { color: #92400e; background: #fef3c7; }
.member-row-progress {
    display: block;
    margin-top: 3px;
    font-size: 0.78rem;
    color: #64748b;
}
.member-status-pending { color: #92400e; background: #fef3c7; }
.member-row-actions { display: flex; gap: 6px; }
.member-row-action {
    background: white;
    border: 1px solid #cbd5e1;
    color: #4a5568;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.member-row-action:hover { border-color: #4d59c5; color: #4d59c5; }
.member-row-action-danger:hover { border-color: #dc2626; color: #dc2626; }
.member-row-self { font-size: 0.78rem; color: #64748b; font-style: italic; }
.members-empty { color: #64748b; font-size: 0.9rem; padding: 12px 0; text-align: center; }

/* Stripe-success welcome card (chunk 2) */
.welcome-card {
    background: linear-gradient(135deg, #ecfeff 0%, #f0fdfa 100%);
    border-left: 4px solid #06b6d4;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 16px 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.welcome-card-text h3 { margin: 0 0 6px; color: #0e7490; font-size: 1.1rem; font-weight: 800; }
.welcome-card-text p { margin: 0; color: #155e75; font-size: 0.95rem; line-height: 1.55; }
.welcome-card-dismiss {
    background: transparent;
    border: 1px solid #06b6d4;
    color: #0e7490;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.welcome-card-dismiss:hover { background: #06b6d4; color: white; }
.lesson-nav-btn-primary {
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    border-color: transparent;
    color: white !important;
}
.lesson-nav-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(102,126,234,0.32);
    border-color: transparent;
    color: white !important;
}

/* ── Certificate ── */
.certificate-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(102,126,234,0.12);
    padding: 60px 48px;
    text-align: center;
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.certificate-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 27px;
    background: linear-gradient(135deg, #4d59c5, #5b3082, #48bb78, #4d59c5);
    z-index: -1;
}

.certificate-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.certificate-card h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 6px;
}

.certificate-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4d59c5;
    margin-bottom: 28px;
}

.certificate-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.cert-detail {
    text-align: center;
}

.cert-detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a0aec0;
    margin-bottom: 4px;
}

.cert-detail-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a202c;
}

.certificate-note {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 20px 24px;
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.7;
    margin-top: 24px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.certificate-back {
    display: inline-block;
    margin-top: 28px;
    color: #4d59c5;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}

.certificate-back:hover { text-decoration: underline; }

/* ── Certificate Gating ── */
.certificate-row-note {
    font-size: 0.78rem;
    color: #a0aec0;
    margin-top: 8px;
}

.certificate-btn.disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.7;
}

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

/* ── Practice Interstitial Modal ── */
.practice-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.practice-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 520px;
    width: 100%;
    padding: 40px;
    text-align: center;
}

.practice-modal h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 16px;
}

.practice-modal-label {
    font-size: 1rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 6px;
}

.practice-modal-hook {
    font-size: 0.92rem;
    color: #596780;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 20px;
}

.practice-modal-info {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 28px;
    padding: 14px 18px;
    background: #f8f9ff;
    border-radius: 12px;
    border-left: 3px solid #4d59c5;
    text-align: left;
}

.practice-modal-launch {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.practice-modal-launch:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
}

.practice-modal-launch:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.practice-modal-cancel {
    display: block;
    margin-top: 14px;
    color: #a0aec0;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: none;
}

/* ── Loading ── */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
    font-size: 0.95rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #4d59c5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Reports awaiting review (dashboard banner) ── */
.report-nudge {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.report-nudge-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f59e0b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.report-nudge-icon svg { width: 22px; height: 22px; }
.report-nudge-body { flex: 1; min-width: 0; }
.report-nudge-title {
    font-size: 1rem;
    font-weight: 800;
    color: #78350f;
    line-height: 1.35;
    margin-bottom: 4px;
}
.report-nudge-subtitle {
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.5;
}
.report-nudge-btn {
    background: #92400e;
    color: white !important;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.2s;
    white-space: nowrap;
}
.report-nudge-btn:hover { background: #78350f; }

/* ── Pending report inline link on lesson row ── */
.lesson-link-pending {
    background: #fef3c7;
    color: #92400e !important;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid #fde68a;
}
.lesson-link-pending::before {
    content: '● ';
    color: #f59e0b;
    margin-right: 2px;
}
.lesson-link-pending::after {
    content: ' →';
    font-weight: 800;
}
.lesson-link-pending:hover {
    background: #fde68a;
    text-decoration: none;
}

/* ── Reviewed report inline link on lesson row ── */
.lesson-link-reviewed {
    background: #dcfce7;
    color: #166534 !important;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid #bbf7d0;
}
.lesson-link-reviewed::before {
    content: '✓ ';
    font-weight: 800;
}
.lesson-link-reviewed:hover {
    background: #bbf7d0;
    text-decoration: none;
}

/* ── Coaching Session Report block (lesson page primary action) ── */
.report-block {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 18px;
    padding: 28px;
    margin-top: 28px;
    position: relative;
    overflow: hidden;
}
.report-block.report-reviewed {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}
.report-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #f59e0b;
}
.report-block.report-reviewed::before { background: #22c55e; }
.report-block-eyebrow {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #92400e;
    margin-bottom: 8px;
}
.report-block.report-reviewed .report-block-eyebrow { color: #166534; }
.report-block-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 8px;
}
.report-block-subtitle {
    font-size: 0.92rem;
    color: #4a5568;
    line-height: 1.65;
    margin-bottom: 18px;
}
.report-block-subtitle strong { color: #1a202c; }
.report-block-meta {
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.report-block-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.55;
    padding: 4px 0;
}
.report-block-meta-row strong { color: #1a202c; }
.report-block-meta-icon {
    flex-shrink: 0;
    color: #92400e;
    margin-top: 1px;
}
.report-block.report-reviewed .report-block-meta-icon { color: #166534; }
.report-block-meta-icon svg { width: 18px; height: 18px; }
.report-block-btn {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white !important;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.98rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 18px rgba(217,119,6,0.28);
    display: inline-block;
}
.report-block.report-reviewed .report-block-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 6px 18px rgba(22,163,74,0.28);
}
.report-block-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(217,119,6,0.4);
}
.report-block.report-reviewed .report-block-btn:hover {
    box-shadow: 0 10px 26px rgba(22,163,74,0.4);
}
.report-block-state {
    margin-left: 14px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #166534;
}

/* ── Demoted "try another scenario" link below report block ── */
.now-practice-secondary {
    text-align: center;
    margin-top: 14px;
    padding: 10px 0;
}
.now-practice-secondary a {
    color: #4d59c5;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}
.now-practice-secondary a:hover { text-decoration: underline; }

/* ── Retake card (below report block on completed lessons) ── */
.retake-card {
    background: white;
    border: 1px solid #e0e7ff;
    border-radius: 16px;
    padding: 20px 24px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.retake-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.retake-card-icon svg { width: 22px; height: 22px; }
.retake-card-body { flex: 1; min-width: 0; }
.retake-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 4px;
}
.retake-card-subtitle {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.55;
    margin: 0;
}
.retake-card-subtitle strong { color: #b91c1c; font-weight: 800; }
.retake-card-btn {
    flex-shrink: 0;
    background: white;
    color: #4f46e5 !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border: 2px solid #c7d2fe;
    transition: border-color 0.2s, background 0.2s;
    white-space: nowrap;
}
.retake-card-btn:hover {
    border-color: #4f46e5;
    background: #f5f3ff;
}

/* ── Retake banner on practice page ── */
.retake-banner {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #78350f;
    font-size: 0.9rem;
    line-height: 1.55;
}
.retake-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f59e0b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.retake-banner-icon svg { width: 20px; height: 20px; }
.retake-banner-text { flex: 1; }
.retake-banner-text strong { color: #78350f; font-weight: 800; }

/* ── Continue Lesson primary action card ── */
.continue-card {
    background: white;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.10);
    border: 1px solid #e0e7ff;
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    overflow: hidden;
}
.continue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #4d59c5 0%, #5b3082 100%);
}
.continue-card-body { flex: 1; min-width: 0; }
.continue-card-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4f46e5;
    margin-bottom: 6px;
}
.continue-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 4px;
    line-height: 1.35;
}
.continue-card-meta {
    font-size: 0.85rem;
    color: #596780;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}
.continue-card-meta-tag {
    background: #eef2ff;
    color: #4c51bf;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}
.continue-card-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white !important;
    padding: 14px 26px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 18px rgba(102,126,234,0.28);
    white-space: nowrap;
}
.continue-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(102,126,234,0.4);
}

/* ── Knowledge Score 4-quadrant grid ── */
.know-grid {
    background: white;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(102,126,234,0.06);
}
.know-grid-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.know-grid-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1a202c;
}
.know-grid-overall {
    font-size: 0.82rem;
    color: #596780;
    font-weight: 600;
}
.know-grid-overall strong {
    color: #4f46e5;
    font-size: 1rem;
    font-weight: 800;
}
.know-grid-cells {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.know-cell {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.know-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cell-color, #4d59c5);
}
.know-cell-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--cell-color, #4d59c5);
    line-height: 1.1;
    margin-bottom: 2px;
}
.know-cell-value.empty {
    color: #cbd5e0;
    font-size: 1.2rem;
}
.know-cell-label {
    font-size: 0.7rem;
    color: #4a5568;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}
.know-cell-detail {
    font-size: 0.7rem;
    color: #a0aec0;
    margin-top: 2px;
}
.know-grid-footnote {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f5;
    line-height: 1.55;
}
.know-grid-footnote a { color: #4d59c5; font-weight: 700; text-decoration: none; }
.know-grid-footnote a:hover { text-decoration: underline; }

/* ── Dual-metric cell (paid tiers — Session % + Checks %) ── */
.know-grid-overall .overall-metric { display: inline; }
.know-grid-overall .overall-sep { color: #cbd5e0; margin: 0 8px; }
.know-grid-overall .muted { color: #cbd5e0; font-weight: 700; }
.know-grid-legend {
    font-size: 0.78rem;
    color: #4a5568;
    line-height: 1.55;
    margin: -8px 0 14px;
}
.know-grid-legend strong { color: #1a202c; font-weight: 700; }
.know-grid-profile-link { color: #4d59c5; font-weight: 700; text-decoration: none; margin-left: 6px; }
.know-grid-profile-link:hover { text-decoration: underline; }
.know-cell.dual {
    text-align: left;
    padding: 14px 14px 12px;
}
.know-cell.dual .know-cell-label {
    text-align: center;
    margin: 0 0 10px;
}
.know-cell.dual .know-cell-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 0;
}
.know-cell.dual .know-cell-row-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #596780;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.know-cell.dual .know-cell-row-value {
    font-size: 1rem;
    font-weight: 800;
    color: #4d59c5;
}
.know-cell.dual .know-cell-row-value.empty { color: #cbd5e0; }
.know-cell.dual .know-cell-row-value.pass { color: #16a34a; }
.know-cell.dual .know-cell-row-value.fail { color: #dc2626; }

/* ── Lesson TL;DR card ── */
.lesson-tldr {
    background: #f8f9ff;
    border-radius: 14px;
    padding: 18px 22px;
    margin: 0 0 24px;
    border-left: 4px solid #4d59c5;
}
.lesson-tldr-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4f46e5;
    margin-bottom: 8px;
}
.lesson-tldr-body {
    font-size: 0.95rem;
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 12px;
}
.lesson-tldr-by-end {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.6;
}
.lesson-tldr-by-end strong { color: #1a202c; }
.lesson-tldr-bullets {
    margin: 6px 0 0;
    padding: 0 0 0 18px;
    list-style: disc;
}
.lesson-tldr-bullets li {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.6;
    padding: 1px 0;
}

/* ── Now Practice card (bottom of lesson) ── */
.now-practice {
    background: linear-gradient(135deg, #f8f9ff 0%, #eef2ff 100%);
    border-radius: 18px;
    padding: 28px;
    margin-top: 28px;
    border: 1px solid #e0e7ff;
}
.now-practice-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4f46e5;
    margin-bottom: 6px;
}
.now-practice-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 6px;
}
.now-practice-subtitle {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 18px;
}
.now-practice-options {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}
.now-practice-option {
    background: white;
    border-radius: 12px;
    padding: 14px 18px;
    border: 1px solid #e0e7ff;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.now-practice-option.clickable {
    cursor: pointer;
    user-select: none;
}
.now-practice-option.clickable:hover {
    border-color: #4d59c5;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(102,126,234,0.18);
}
.now-practice-option.clickable:hover .now-practice-option-arrow {
    transform: translateX(3px);
}
.now-practice-option.clickable:focus-visible {
    outline: 2px solid #4d59c5;
    outline-offset: 2px;
}
.now-practice-option-arrow {
    transition: transform 0.2s;
}
.now-practice-pickone {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4f46e5;
    margin: 0 0 10px;
}
.now-practice-meta {
    font-size: 0.85rem;
    color: #596780;
    margin: 0 0 18px;
}
.now-practice-more-link {
    display: inline-block;
    margin-top: 8px;
    color: #4d59c5;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}
.now-practice-more-link:hover { text-decoration: underline; }
.now-practice-option-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.now-practice-option-tag {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}
.now-practice-option-tag.module-cc { background: #e0e7ff; color: #4338ca; }
.now-practice-option-tag.module-aa { background: #fce7f3; color: #be185d; }
.now-practice-option-tag.module-dc { background: #d1fae5; color: #065f46; }
.now-practice-option-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1a202c;
    flex: 1;
    min-width: 0;
}
.now-practice-option-arrow {
    color: #4f46e5;
    font-weight: 800;
    flex-shrink: 0;
}
.now-practice-cta {
    display: inline-block;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white !important;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 18px rgba(102,126,234,0.25);
}
.now-practice-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(102,126,234,0.4);
}
.now-practice-more {
    margin-left: 16px;
    color: #4d59c5;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}
.now-practice-more:hover { text-decoration: underline; }

/* ── MCQ one-at-a-time stepping ── */
.mcq-stepper-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    align-items: center;
}
.mcq-step-pip {
    width: 22px;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    transition: background 0.2s;
}
.mcq-step-pip.active { background: #4d59c5; }
.mcq-step-pip.done { background: #48bb78; }
.mcq-step-counter {
    margin-left: 10px;
    font-size: 0.78rem;
    color: #596780;
    font-weight: 600;
}
.mcq-item.mcq-hidden { display: none; }
.mcq-next-btn {
    margin-top: 14px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mcq-next-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(102,126,234,0.32);
}
/* Signpost shown after the last MCQ — points to the practice card. Not clickable. */
.mcq-finish-note {
    margin-top: 14px;
    padding: 10px 22px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: default;
    user-select: none;
}

/* ── Back link ── */
.course-back-link {
    display: inline-block;
    color: #4d59c5;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 16px;
}
.course-back-link:hover { text-decoration: underline; }

/* ── Demo Banner ──
   Visible only for anonymous visitors. Anyone who has paid (member,
   admin_member) or owns seats but hasn't claimed one (admin_no_seat) is
   past the marketing demo and shouldn't see "Buy team seats" upsell. */
body.tier-loading .demo-banner,
body.tier-member .demo-banner,
body.tier-admin_member .demo-banner,
body.tier-admin_no_seat .demo-banner { display: none; }
.demo-banner {
    background: #fef3c7;
    border-top: 4px solid #F5C542;
    border-bottom: 1px solid #fcd34d;
    padding: 14px 24px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    line-height: 1.5;
}
.demo-banner-text { flex: 1; }
.demo-banner-headline {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1a1530;
}
.demo-banner-sub {
    font-size: 0.85rem;
    color: #78350f;
    margin-top: 3px;
    font-weight: 500;
}
.demo-banner-tag {
    display: inline-block;
    background: #92400e;
    color: #fef3c7;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 12px;
    vertical-align: middle;
}
.demo-banner-cta {
    background: #F5C542;
    color: #1a1530;
    padding: 9px 18px;
    border: 0;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245,197,66,0.30);
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.demo-banner-cta:hover {
    background: #f7cf5e;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245,197,66,0.42);
}

/* ── In-Production Callout ── */
.demo-note {
    background: #f0f4ff;
    border-left: 3px solid #4d59c5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #4a5568;
    line-height: 1.55;
    margin: 12px 0;
}
.demo-note strong { color: #4c51bf; font-weight: 700; }
.demo-note a { color: #4c51bf; font-weight: 700; text-decoration: none; }
.demo-note a:hover { text-decoration: underline; }
.demo-note-inline {
    font-size: 0.78rem;
    color: #596780;
    margin-top: 6px;
    line-height: 1.5;
}
.demo-note-inline a { color: #4d59c5; font-weight: 700; text-decoration: none; }
.demo-note-inline a:hover { text-decoration: underline; }

/* ── Enterprise CTA Card ── */
.enterprise-cta-card {
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    border-radius: 16px;
    padding: 36px 32px;
    margin-top: 32px;
    text-align: center;
}
.enterprise-cta-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: #ffffff !important;
}
.enterprise-cta-card p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.95) !important;
    margin: 0 auto 22px;
    max-width: 580px;
}
.enterprise-cta-btn {
    display: inline-block;
    background: white;
    color: #4d59c5;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.enterprise-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.enterprise-cta-btn-secondary {
    display: inline-block;
    color: white;
    margin-left: 18px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    padding-bottom: 2px;
}
.enterprise-cta-btn-secondary:hover { border-bottom-color: white; }

/* ── App dialogs (replace native confirm/alert/prompt) ── */
.app-dialog-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 300;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: app-dialog-fade-in 0.18s ease-out;
}
@keyframes app-dialog-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.app-dialog {
    background: white;
    border-radius: 14px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: app-dialog-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes app-dialog-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.app-dialog-header {
    padding: 22px 24px 0;
}
.app-dialog-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a202c;
}
.app-dialog-body {
    padding: 14px 24px 6px;
}
.app-dialog-text {
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.55;
}
.app-dialog-text p {
    margin: 0 0 10px;
}
.app-dialog-text p:last-child { margin-bottom: 0; }
.app-dialog-text .app-dialog-emph {
    font-weight: 600;
    color: #1a202c;
    margin-top: 14px;
    margin-bottom: 8px;
}
.app-dialog-text .app-dialog-list {
    margin: 0 0 4px;
    padding-left: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4a5568;
}
.app-dialog-text .app-dialog-list li {
    margin-bottom: 4px;
}
.app-dialog-text .app-dialog-list li:last-child { margin-bottom: 0; }
.app-dialog-form {
    margin-top: 16px;
}
.app-dialog-field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.app-dialog-field-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: #1a202c;
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.app-dialog-field-input:focus {
    outline: none;
    border-color: #4d59c5;
    box-shadow: 0 0 0 3px rgba(77, 89, 197, 0.12);
}
.app-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px 22px;
}
.app-dialog-btn {
    background: #f1f5f9;
    color: #1a202c;
    border: none;
    padding: 10px 18px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.app-dialog-btn:hover { background: #e2e8f0; }
.app-dialog-btn:active { transform: translateY(1px); }
.app-dialog-btn.primary { background: #4d59c5; color: white; }
.app-dialog-btn.primary:hover { background: #4047a8; }
.app-dialog-btn.danger { background: #dc2626; color: white; }
.app-dialog-btn.danger:hover { background: #b91c1c; }

/* ── Reports panel ── */
.reports-page { max-width: 980px; margin: 0 auto; padding: 28px 0; }
.reports-header h1 {
    font-size: 1.7rem; font-weight: 800; color: #1a202c;
    margin: 0 0 6px;
}
.reports-subtitle { color: #4a5568; margin: 0 0 20px; font-size: 0.95rem; line-height: 1.55; }
.reports-scope-tabs {
    display: flex; gap: 4px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 18px;
}
.reports-scope-tab {
    background: transparent; border: none; padding: 10px 18px;
    font-weight: 700; font-size: 0.95rem; color: #4a5568;
    border-bottom: 3px solid transparent; margin-bottom: -1px;
    cursor: pointer;
}
.reports-scope-tab:hover { color: #1a202c; }
.reports-scope-tab.active { color: #4d59c5; border-bottom-color: #4d59c5; }
.reports-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 18px;
}
.reports-chip {
    background: white; border: 1px solid #e2e8f0;
    padding: 7px 14px; border-radius: 999px;
    font-size: 0.85rem; font-weight: 600; color: #4a5568;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.reports-chip:hover { border-color: #cbd5e0; color: #1a202c; }
.reports-chip.active { background: #1a202c; color: white; border-color: #1a202c; }
.reports-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.reports-list {
    background: white; border-radius: 14px;
    box-shadow: 0 4px 20px rgba(102,126,234,0.06);
    overflow: hidden;
}
.reports-row {
    display: grid;
    grid-template-columns: 160px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f5;
}
.reports-row:last-child { border-bottom: none; }
.reports-row-comp { display: inline-flex; align-items: center; gap: 8px; }
.reports-row-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.reports-row-comp-label {
    font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.05em; color: #4a5568;
}
.reports-row-title { font-weight: 700; color: #1a202c; font-size: 0.95rem; }
.reports-row-meta { font-size: 0.82rem; color: #596780; margin-top: 3px; }
.reports-row-reviewed { color: #047857; font-weight: 600; }
.reports-row-score {
    font-size: 1.2rem; font-weight: 800; color: #16a34a;
    line-height: 1;
    text-align: right;
    min-width: 80px;
}
.reports-row-score.fail { color: #dc2626; }
.reports-row-score span { font-size: 0.7rem; font-weight: 700; color: #a0aec0; margin-left: 2px; }
.reports-row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.reports-row-btn {
    background: white; border: 1px solid #e2e8f0;
    padding: 7px 12px; border-radius: 8px;
    font-size: 0.82rem; font-weight: 700; color: #1a202c;
    text-decoration: none; cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.reports-row-btn:hover { border-color: #cbd5e0; background: #f8fafc; }
.reports-row-btn.primary { background: #4d59c5; color: white; border-color: #4d59c5; }
.reports-row-btn.primary:hover { background: #4047a8; border-color: #4047a8; }
.reports-empty {
    background: white; border-radius: 14px;
    padding: 40px 24px;
    text-align: center;
    color: #596780; font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(102,126,234,0.06);
}
@media (max-width: 768px) {
    .reports-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }
    .reports-row-comp { grid-column: 1 / -1; }
    .reports-row-actions { grid-column: 1 / -1; flex-wrap: wrap; }
    .reports-row-score { grid-row: 2; grid-column: 2; }
}

/* ── Settings panel ── */
.settings-page { max-width: 720px; margin: 0 auto; padding: 28px 0; }
.settings-header h1 {
    font-size: 1.7rem; font-weight: 800; color: #1a202c;
    margin: 0 0 24px;
}
.settings-section {
    background: white; border-radius: 14px;
    padding: 22px 26px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(102,126,234,0.06);
}
.settings-section h2 {
    font-size: 0.78rem; font-weight: 800; color: #4a5568;
    text-transform: uppercase; letter-spacing: 0.06em;
    margin: 0 0 14px;
}
.settings-section-help { color: #596780; font-size: 0.9rem; margin: 0 0 14px; line-height: 1.55; }
.settings-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 8px 0;
    font-size: 0.95rem;
}
.settings-row-label { color: #596780; font-weight: 600; }
.settings-row-value { color: #1a202c; font-weight: 700; }
.settings-btn-secondary {
    display: inline-block; margin-top: 12px; margin-right: 10px;
    background: #f1f5f9; color: #1a202c; border: none;
    padding: 9px 16px; border-radius: 9px;
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
    transition: background 0.15s;
}
.settings-btn-secondary:hover { background: #e2e8f0; }
.settings-btn-danger {
    background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca;
    padding: 9px 16px; border-radius: 9px;
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
}
.settings-btn-danger:hover { background: #fecaca; }

/* ── Toast (transient success/info messages) ── */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(20px);
    background: #1a202c;
    color: white;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 400;
    opacity: 0;
    transition: opacity 0.22s, transform 0.22s;
    pointer-events: none;
    max-width: 92vw;
    text-align: center;
}
.app-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.app-toast-success { background: #047857; }
.app-toast-error   { background: #b91c1c; }
.app-toast-info    { background: #1f2937; }

/* ── Referral variant: paid users share a 10%-off code with a colleague ── */
.enterprise-cta-card.referral {
    background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
}
.referral-code-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.12);
    border: 1px dashed rgba(255,255,255,0.4);
    border-radius: 10px;
    padding: 10px 18px;
    margin-bottom: 18px;
}
.referral-code {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #ffffff;
    background: transparent;
    padding: 0;
}
.referral-share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.referral-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #115e59;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.referral-share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.referral-share-btn.x { background: #000000; color: #ffffff; }
.referral-share-btn.email { background: rgba(255,255,255,0.15); color: #ffffff; border: 1px solid rgba(255,255,255,0.4); }
.referral-share-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Single-line referral strip — replaces the prior 4-row card.
   Wraps to two lines on narrow viewports but stays one row on desktop. */
.referral-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 20px;
    text-align: left;
}
.referral-inline-text {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.45;
}
.referral-inline-text .referral-code {
    background: rgba(255,255,255,0.15);
    border: 1px dashed rgba(255,255,255,0.4);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.95rem;
    margin: 0 2px;
}
.referral-inline-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}
.referral-inline-actions .referral-share-btn {
    padding: 7px 12px;
    font-size: 0.85rem;
    gap: 6px;
}
/* Inside a modal (no purple gradient background) — flip text to dark. */
.referral-inline-modal { padding: 0; }
.referral-inline-modal .referral-inline-text { color: #1a202c; }
.referral-inline-modal .referral-inline-text .referral-code {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e0;
}
.referral-inline-modal .referral-share-btn {
    background: #f1f5f9;
    color: #1a202c;
}
.referral-inline-modal .referral-share-btn.x { background: #000; color: #fff; }
.referral-inline-modal .referral-share-btn.email { background: #eef2ff; color: #4338ca; border: none; }
.certificate-btn.disabled { cursor: not-allowed; opacity: 0.6; }

/* ── Mobile ── */
@media (max-width: 768px) {
    .course-container { padding: 90px 16px 40px; }

    .picker-card { padding: 36px 24px; }
    .picker-card h1 { font-size: 1.5rem; }

    .course-hero h1 { font-size: 1.5rem; }
    .course-hero-subtitle { font-size: 0.9rem; }

    .lesson-row { padding: 16px 18px; flex-direction: column; gap: 8px; }
    .lesson-status-label { align-self: flex-start; }

    .lesson-detail-header,
    .lesson-detail-body { padding: 24px 20px; }
    .lesson-detail-header h1 { font-size: 1.3rem; }

    .lesson-accordion-header { padding: 16px 18px; }
    .lesson-accordion-content { padding: 4px 18px 18px; }
    .lesson-accordion-item.section-practice .lesson-accordion-header { padding: 18px 20px; }
    .lesson-accordion-item.section-practice .lesson-accordion-content { padding: 18px 20px 20px; }
    .lesson-accordion-item.section-practice .lesson-accordion-title { font-size: 1.05rem; }
    .practice-inline-option { padding: 18px 20px; }
    .practice-inline-launch-btn { display: block; width: 100%; text-align: center; }

    .practice-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .practice-page-header { padding: 24px 20px 20px; }
    .practice-page-header h1 { font-size: 1.3rem; }
    .practice-page-options { padding: 20px; }
    .practice-page-option { padding: 20px; }
    .practice-page-skip { padding: 0 20px 24px; }

    .competency-group-header { padding: 12px 18px; font-size: 0.78rem; }

    .practice-modal { padding: 28px 22px; }
    .practice-modal h2 { font-size: 1.1rem; }

    .certificate-card { padding: 40px 24px; }
    .certificate-details { gap: 20px; }
    .certificate-card h1 { font-size: 1.3rem; }

    .demo-banner { flex-direction: column; align-items: flex-start; padding: 12px 14px; }
    .demo-banner-cta { align-self: stretch; text-align: center; }

    .enterprise-cta-card { padding: 28px 22px; }
    .enterprise-cta-card h3 { font-size: 1.15rem; }
    .enterprise-cta-btn-secondary { display: block; margin: 14px 0 0; }

    .continue-card { flex-direction: column; align-items: stretch; padding: 20px; gap: 16px; }
    .continue-card-btn { text-align: center; padding: 14px 22px; }

    .know-grid { padding: 18px 18px; }
    .know-grid-cells { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .know-cell { padding: 12px 8px; }
    .know-cell-value { font-size: 1.2rem; }

    .lesson-tldr { padding: 16px 18px; }

    .now-practice { padding: 22px 20px; }
    .now-practice-title { font-size: 1.05rem; }
    .now-practice-cta { display: block; text-align: center; }
    .now-practice-more { display: block; margin: 14px 0 0; text-align: center; }

    .report-nudge { flex-direction: column; align-items: flex-start; padding: 16px 18px; }
    .report-nudge-btn { align-self: stretch; text-align: center; }

    .report-block { padding: 22px 20px; }
    .report-block-title { font-size: 1.1rem; }
    .report-block-btn { display: block; text-align: center; padding: 14px 22px; }
    .report-block-state { display: block; margin: 10px 0 0; text-align: center; }

    .retake-card { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 20px; }
    .retake-card-btn { text-align: center; }
    .retake-banner { flex-direction: column; align-items: flex-start; }
}

/* ========================================================================
   Consolidated dashboard card (replaces course-hero + progress-overview +
   continue-card + report-nudge + standalone know-grid). One card holds all
   four — progress, resume CTA, reports nudge, knowledge score — directly
   under the Preview banner, above the lesson list.
   ======================================================================== */

.dash-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(102,126,234,0.08);
    padding: 22px 24px;
    margin-bottom: 24px;
}

.dash-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.dash-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.dash-card-context {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.dash-progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.dash-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4d59c5 0%, #5b3082 100%);
    border-radius: 8px;
    transition: width 0.3s ease;
}
.dash-progress-text {
    color: #4a5568;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.dash-resume {
    background: linear-gradient(135deg, #4d59c5 0%, #5b3082 100%);
    color: white;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.dash-resume-body { flex: 1; min-width: 0; }
.dash-resume-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 4px;
}
.dash-resume-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.dash-resume-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.82rem;
    opacity: 0.92;
}
.dash-resume-tag {
    background: rgba(255,255,255,0.18);
    padding: 2px 9px;
    border-radius: 999px;
    font-weight: 600;
}
.dash-resume-btn {
    background: white;
    color: #4d59c5;
    padding: 10px 18px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}
.dash-resume-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.dash-resume.dash-resume-done {
    background: linear-gradient(135deg, #14532d 0%, #166534 100%);
}
.dash-resume.dash-resume-done .dash-resume-btn { color: #14532d; }
.dash-resume.dash-resume-pending-reports {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
}
.dash-resume.dash-resume-pending-reports .dash-resume-btn { color: #b45309; }

.dash-reports-strip {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fef3c7;
    color: #78350f;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 0.9rem;
    line-height: 1.4;
}
.dash-reports-strip strong { color: #78350f; }
.dash-reports-strip em { font-style: normal; font-weight: 700; }
.dash-reports-strip-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #b45309;
}

.dash-know {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}
.dash-know-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.dash-know-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
}
.dash-know-overall {
    font-size: 0.88rem;
    color: #4a5568;
}
.dash-know-overall strong { color: #1a202c; }
.dash-know .know-grid-cells {
    /* Compact the grid inside the dashboard card. The outer .know-grid styles
       still apply to .know-grid-cells; the surrounding header was where the
       old block had its bulk. */
    margin-bottom: 10px;
}
.dash-know-footnote {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
}
.dash-know-footnote a { color: #4d59c5; font-weight: 600; }

@media (max-width: 768px) {
    .dash-card { padding: 18px 16px; }
    .dash-card-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .dash-resume { flex-direction: column; align-items: stretch; }
    .dash-resume-btn { text-align: center; }
}

/* Post-session generation banner — sticky bottom-center with a spinner
   while the report is processing, swaps to a green "ready" CTA when done. */
.session-complete-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    z-index: 200;
    max-width: 92vw;
}
.session-complete-banner.session-complete-processing {
    border: 1px solid #c7d2fe;
    color: #4338ca;
}
.session-complete-banner.session-complete-ready {
    border: 1px solid #bbf7d0;
    color: #14532d;
    background: #f0fdf4;
}
.session-complete-banner.session-complete-stale {
    border: 1px solid #fde68a;
    color: #92400e;
    background: #fef3c7;
}
.session-complete-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #c7d2fe;
    border-top-color: #4338ca;
    border-radius: 50%;
    animation: scs-spin 0.8s linear infinite;
}
@keyframes scs-spin {
    to { transform: rotate(360deg); }
}
.session-complete-cta {
    margin-left: 8px;
    background: #14532d;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}
.session-complete-cta:hover { background: #166534; }
.session-complete-dismiss {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0 4px;
}
.session-complete-dismiss:hover { opacity: 1; }
