/* ================================================================
   Tutorial Page Styles - NudgeFlow Theme
   ================================================================ */

/* Hide the site-wide layout footer on the tutorial page — it overlaps the chat input */
.nf-tutorial-page ~ footer,
.nf-tutorial-page + footer,
body:has(.nf-tutorial-page) footer.footer {
    display: none !important;
}

.nf-tutorial-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--nf-bg, #F5F3FA);
}

/* ================================================================
   Header
   ================================================================ */
.nf-tutorial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--nf-surface, #fff);
    border-bottom: 1px solid var(--nf-border, #E0E3E9);
    box-shadow: 0 2px 8px rgba(42, 14, 92, 0.04);
    flex-shrink: 0;
}

.nf-tutorial-header-left {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.nf-tutorial-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--nf-text, #1C1C28);
    margin: 0;
}

.nf-tutorial-subtitle {
    font-size: 0.85rem;
    color: var(--nf-text-muted, #515165);
}

/* Read Aloud Group */
.nf-read-aloud-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nf-voice-select {
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
    color: var(--nf-text-muted, #515165);
    background: transparent;
    border: 1px solid var(--nf-border, #E0E3E9);
    border-radius: 8px;
    cursor: pointer;
    max-width: 180px;
    transition: border-color 0.2s ease;
    appearance: auto;
}

.nf-voice-select:hover,
.nf-voice-select:focus {
    border-color: var(--nf-primary, #2A0E5C);
    outline: none;
}

/* Read Aloud Toggle */
.nf-btn-read-aloud {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--nf-text-muted, #515165);
    background: transparent;
    border: 1px solid var(--nf-border, #E0E3E9);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nf-btn-read-aloud:hover {
    color: var(--nf-primary, #2A0E5C);
    border-color: var(--nf-primary, #2A0E5C);
    background: rgba(42, 14, 92, 0.04);
}

.nf-btn-read-aloud.nf-read-aloud-active {
    color: #fff;
    background: linear-gradient(135deg, var(--nf-primary, #2A0E5C), var(--nf-primary-light, #5A3E9C));
    border-color: var(--nf-primary, #2A0E5C);
}

.nf-btn-read-aloud.nf-read-aloud-active:hover {
    opacity: 0.9;
    color: #fff;
}

.nf-read-aloud-label {
    white-space: nowrap;
}

.nf-tutorial-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nf-btn-skip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--nf-text-muted, #515165);
    background: transparent;
    border: 1px solid var(--nf-border, #E0E3E9);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nf-btn-skip:hover {
    color: var(--nf-primary, #2A0E5C);
    border-color: var(--nf-primary, #2A0E5C);
    background: rgba(42, 14, 92, 0.04);
}

/* ================================================================
   Body Layout
   ================================================================ */
.nf-tutorial-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ================================================================
   Phase Stepper Sidebar
   ================================================================ */
.nf-tutorial-sidebar {
    width: 220px;
    padding: 1.5rem;
    background: var(--nf-surface, #fff);
    border-right: 1px solid var(--nf-border, #E0E3E9);
    flex-shrink: 0;
}

.nf-sidebar-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--nf-text-muted, #515165);
    margin-bottom: 1.5rem;
}

.nf-phase-stepper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nf-phase-step {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 0;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.nf-phase-step.nf-phase-active {
    opacity: 1;
}

.nf-phase-step.nf-phase-completed {
    opacity: 0.7;
}

.nf-phase-step.nf-phase-clickable {
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.nf-phase-step.nf-phase-clickable:hover {
    background-color: rgba(42, 14, 92, 0.06);
}

.nf-phase-step.nf-phase-clickable:hover .nf-phase-name {
    color: var(--nf-primary, #2A0E5C);
    text-decoration: underline;
}

.nf-phase-step.nf-phase-clickable:hover .nf-phase-desc::after {
    content: ' — click to skip';
    font-style: italic;
    opacity: 0.6;
}

.nf-phase-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--nf-border, #E0E3E9);
    color: var(--nf-text-muted, #515165);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.nf-phase-active .nf-phase-indicator {
    background: linear-gradient(135deg, var(--nf-primary, #2A0E5C), var(--nf-primary-light, #5A3E9C));
    color: #fff;
    box-shadow: 0 2px 8px rgba(42, 14, 92, 0.3);
}

.nf-phase-completed .nf-phase-indicator {
    background: var(--nf-success, #22C55E);
    color: #fff;
}

.nf-phase-completed .nf-phase-indicator::after {
    content: '\2713';
    font-size: 0.9rem;
}

.nf-phase-completed .nf-phase-indicator {
    font-size: 0;
}

.nf-phase-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--nf-text, #1C1C28);
}

.nf-phase-desc {
    font-size: 0.75rem;
    color: var(--nf-text-muted, #515165);
}

.nf-phase-connector {
    width: 2px;
    height: 16px;
    margin-left: 15px;
    background: var(--nf-border, #E0E3E9);
    transition: background 0.3s ease;
}

.nf-connector-completed {
    background: var(--nf-success, #22C55E);
}

/* ================================================================
   Chat Area
   ================================================================ */
.nf-tutorial-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nf-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nf-chat-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--nf-text-muted, #515165);
    gap: 1rem;
}

/* Chat Bubbles */
.nf-chat-bubble {
    max-width: 80%;
    animation: fadeInUp 0.3s ease;
}

.nf-chat-teacher {
    align-self: flex-start;
}

.nf-chat-learner {
    align-self: flex-end;
}

.nf-chat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    padding-left: 0.25rem;
}

.nf-chat-teacher .nf-chat-label {
    color: var(--nf-primary, #2A0E5C);
}

.nf-chat-learner .nf-chat-label {
    color: var(--nf-text-muted, #515165);
    text-align: right;
    padding-right: 0.25rem;
}

.nf-chat-heading {
    margin: 0.5rem 0 0.25rem;
    line-height: 1.3;
    color: var(--nf-text, #1C1C28);
}

h3.nf-chat-heading { font-size: 1.1rem; font-weight: 700; }
h4.nf-chat-heading { font-size: 1rem; font-weight: 700; }
h5.nf-chat-heading { font-size: 0.95rem; font-weight: 600; }

.nf-chat-text {
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--nf-text, #1C1C28);
}

.nf-chat-teacher .nf-chat-text {
    background: var(--nf-surface, #fff);
    border: 1px solid var(--nf-border, #E0E3E9);
    border-radius: 4px 12px 12px 12px;
}

.nf-chat-learner .nf-chat-text {
    background: linear-gradient(135deg, var(--nf-primary, #2A0E5C), var(--nf-primary-light, #5A3E9C));
    color: #fff;
    border-radius: 12px 4px 12px 12px;
}

/* Typing Indicator */
.nf-typing-indicator {
    display: inline-flex;
    gap: 4px;
    padding: 4px 0;
}

.nf-typing-indicator::before,
.nf-typing-indicator::after,
.nf-typing-indicator {
    content: '';
}

.nf-typing-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--nf-text-muted, #515165);
    animation: typingDot 1.4s infinite;
    animation-delay: 0s;
}

.nf-typing-indicator::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--nf-text-muted, #515165);
    animation: typingDot 1.4s infinite;
    animation-delay: 0.4s;
}

/* ================================================================
   Input Area
   ================================================================ */
.nf-chat-input-area {
    padding: 1.25rem 1.5rem 1.5rem;
    background: var(--nf-surface, #fff);
    border-top: 1px solid var(--nf-border, #E0E3E9);
    box-shadow: 0 -4px 12px rgba(42, 14, 92, 0.04);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.nf-chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
}

.nf-chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--nf-border, #E0E3E9);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
    max-height: 120px;
    line-height: 1.5;
}

.nf-chat-input:focus {
    border-color: var(--nf-primary, #2A0E5C);
    box-shadow: 0 0 0 3px rgba(42, 14, 92, 0.1);
}

.nf-chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Microphone Button */
.nf-chat-mic-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--nf-border, #E0E3E9);
    background: var(--nf-surface, #fff);
    color: var(--nf-text-muted, #515165);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nf-chat-mic-btn:hover:not(:disabled) {
    border-color: var(--nf-primary, #2A0E5C);
    color: var(--nf-primary, #2A0E5C);
    background: rgba(42, 14, 92, 0.04);
}

.nf-chat-mic-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nf-chat-mic-btn.nf-mic-active {
    border-color: #EF4444;
    background: #FEF2F2;
    color: #EF4444;
    animation: micPulse 1.5s ease-in-out infinite;
}

@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.nf-chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--nf-primary, #2A0E5C), var(--nf-primary-light, #5A3E9C));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nf-chat-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(42, 14, 92, 0.3);
}

.nf-chat-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ================================================================
   Tutorial Complete - Inline Card
   ================================================================ */
.nf-chat-complete-card {
    background: var(--nf-surface, #fff);
    border: 2px solid var(--nf-success, #22C55E);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    text-align: center;
    max-width: 520px;
    margin: 1rem auto;
    animation: fadeInUp 0.4s ease;
}

.nf-complete-inline-icon {
    color: var(--nf-success, #22C55E);
    margin-bottom: 0.5rem;
}

.nf-chat-complete-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--nf-text, #1C1C28);
    margin: 0 0 0.25rem;
}

.nf-chat-complete-card p {
    font-size: 0.85rem;
    color: var(--nf-text-muted, #515165);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.nf-complete-inline-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nf-complete-inline-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    border-radius: 10px;
}

/* ================================================================
   Preparation button — recommended pre-practice CTA
   Same pill shape as the other launch buttons; visual weight comes
   from the brand pink-orange gradient, not from extra ornaments.
   ================================================================ */
.nf-btn-tutorial {
    background: var(--nf-gradient-energy);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--nf-shadow-pink);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nf-btn-tutorial:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 15, 111, 0.42);
    filter: brightness(1.04);
}

.nf-btn-tutorial:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(40%);
}

/* ================================================================
   Outline variant — white pill with indigo border. Used for the
   lowest-priority action (e.g. Back) so it doesn't compete for
   attention with the recommended path.
   ================================================================ */
.nf-btn-outline {
    background: #fff;
    color: var(--nf-primary);
    border: 2px solid var(--nf-primary);
    font-weight: 600;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nf-btn-outline:hover:not(:disabled) {
    background: var(--nf-primary);
    color: #fff;
}

.nf-btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================================================================
   Spinner (shared)
   ================================================================ */
.nf-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--nf-border, #E0E3E9);
    border-top-color: var(--nf-primary, #2A0E5C);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ================================================================
   Animations
   ================================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

/* ================================================================
   Concept Cards [CARD]
   ================================================================ */
.nf-concept-card {
    background: linear-gradient(135deg, rgba(42, 14, 92, 0.04), rgba(90, 62, 156, 0.06));
    border-left: 4px solid var(--nf-primary, #2A0E5C);
    border-radius: 4px 12px 12px 4px;
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
    animation: fadeInUp 0.3s ease;
}

.nf-card-icon {
    color: var(--nf-primary, #2A0E5C);
    margin-bottom: 0.35rem;
}

.nf-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--nf-primary, #2A0E5C);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.nf-card-body {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--nf-text, #1C1C28);
}

.nf-card-body ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.nf-card-body li {
    position: relative;
    padding-left: 0.25rem;
    margin-bottom: 0.3rem;
}

.nf-card-body li::before {
    content: '\2713';
    position: absolute;
    left: -1.1rem;
    color: var(--nf-success, #22C55E);
    font-weight: 700;
}

/* ================================================================
   Conversational Anchors [ANCHOR]
   ================================================================ */
.nf-anchor-block {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: linear-gradient(135deg, #FFF7ED, #FFFBF5);
    border: 1px dashed #F59E0B;
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    margin: 0.75rem 0;
    animation: fadeInUp 0.3s ease;
}

.nf-anchor-icon {
    color: #F59E0B;
    flex-shrink: 0;
    margin-top: 2px;
}

.nf-anchor-text {
    font-size: 0.9rem;
    font-style: italic;
    font-weight: 500;
    color: #92400E;
    line-height: 1.5;
    flex: 1;
}

.nf-anchor-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #D97706;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    align-self: center;
    opacity: 0.7;
}

/* ================================================================
   Multiple Choice Questions [MCQ]
   ================================================================ */
.nf-mcq-block {
    background: var(--nf-surface, #fff);
    border: 2px solid var(--nf-border, #E0E3E9);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 0.75rem 0;
    animation: fadeInUp 0.3s ease;
}

.nf-mcq-icon {
    color: var(--nf-primary, #2A0E5C);
    margin-bottom: 0.5rem;
}

.nf-mcq-question {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--nf-text, #1C1C28);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.nf-mcq-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nf-mcq-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--nf-text, #1C1C28);
    background: var(--nf-bg, #F5F3FA);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.nf-mcq-option:hover:not(:disabled) {
    border-color: var(--nf-primary, #2A0E5C);
    background: rgba(42, 14, 92, 0.06);
    transform: translateX(4px);
}

.nf-mcq-option:disabled {
    cursor: default;
    opacity: 0.85;
}

.nf-mcq-option.nf-mcq-selected {
    border-color: var(--nf-primary, #2A0E5C);
    background: rgba(42, 14, 92, 0.08);
    font-weight: 600;
}

.nf-mcq-option.nf-mcq-correct {
    border-color: var(--nf-success, #22C55E);
    background: rgba(34, 197, 94, 0.1);
}

.nf-mcq-option.nf-mcq-correct::after {
    content: ' \2713';
    color: var(--nf-success, #22C55E);
    font-weight: 700;
}

.nf-mcq-option.nf-mcq-wrong {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.08);
}

.nf-mcq-option.nf-mcq-wrong::after {
    content: ' \2717';
    color: #EF4444;
    font-weight: 700;
}

/* ================================================================
   Concept Sub-Step Headers [CONCEPT]
   ================================================================ */
.nf-concept-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--nf-border, #E0E3E9);
}

.nf-concept-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--nf-primary, #2A0E5C), var(--nf-primary-light, #5A3E9C));
    border-radius: 20px;
    white-space: nowrap;
}

.nf-concept-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--nf-text, #1C1C28);
}

/* ================================================================
   Sidebar Sub-Steps (under Teach phase)
   ================================================================ */
.nf-sub-steps {
    flex-basis: 100%;
    margin-top: 0.25rem;
    margin-left: 1rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--nf-border, #E0E3E9);
    box-sizing: border-box;
}

.nf-sub-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.nf-sub-step.nf-sub-active {
    opacity: 1;
}

.nf-sub-step.nf-sub-completed {
    opacity: 0.7;
}

.nf-sub-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nf-border, #E0E3E9);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.nf-sub-active .nf-sub-dot {
    background: var(--nf-primary, #2A0E5C);
    box-shadow: 0 0 0 3px rgba(42, 14, 92, 0.2);
}

.nf-sub-completed .nf-sub-dot {
    background: var(--nf-success, #22C55E);
}

.nf-sub-label {
    font-size: 0.7rem;
    color: var(--nf-text-muted, #515165);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.nf-sub-active .nf-sub-label {
    color: var(--nf-text, #1C1C28);
    font-weight: 600;
}

/* ================================================================
   Continue Button
   ================================================================ */
.nf-continue-wrapper {
    display: flex;
    justify-content: flex-start;
    padding: 0.25rem 0;
    animation: fadeInUp 0.3s ease;
}

.nf-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--nf-primary, #2A0E5C);
    background: rgba(42, 14, 92, 0.06);
    border: 1.5px solid rgba(42, 14, 92, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nf-continue-btn:hover {
    background: rgba(42, 14, 92, 0.12);
    border-color: var(--nf-primary, #2A0E5C);
    transform: translateX(2px);
}

/* ================================================================
   Streaming marker pending state (hidden during streaming)
   ================================================================ */
.nf-marker-pending {
    opacity: 0.3;
    font-size: 0.75rem;
    color: var(--nf-text-muted, #515165);
}

/* ================================================================
   Markdown Tables
   ================================================================ */
.nf-chat-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.nf-chat-table th,
.nf-chat-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border: 1px solid var(--nf-border, #E0E3E9);
}

.nf-chat-table th {
    background: var(--nf-bg, #F5F3FA);
    font-weight: 600;
    color: var(--nf-primary, #2A0E5C);
}

.nf-chat-table tr:nth-child(even) {
    background: rgba(42, 14, 92, 0.02);
}

/* Horizontal rule in chat */
.nf-chat-hr {
    border: none;
    border-top: 1px solid var(--nf-border, #E0E3E9);
    margin: 0.75rem 0;
}

/* ================================================================
   Conversation Script Speech Bubbles (Preview Phase)
   ================================================================ */
.nf-speech-bubble {
    border-radius: 12px;
    padding: 0.625rem 0.875rem;
    margin: 0.375rem 0;
    max-width: 88%;
    line-height: 1.5;
}

.nf-speech-role {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
}

.nf-speech-text {
    font-style: italic;
}

.nf-speech-bubble.nf-speech-advisor {
    background: var(--nf-primary, #2A0E5C);
    color: #fff;
    margin-left: 0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.nf-speech-bubble.nf-speech-advisor .nf-speech-role {
    color: rgba(255, 255, 255, 0.7);
}

.nf-speech-bubble.nf-speech-client {
    background: var(--nf-surface, #fff);
    color: var(--nf-text, #1C1C28);
    border: 1px solid var(--nf-border, #E0E3E9);
    margin-left: auto;
    margin-right: 0;
    border-bottom-right-radius: 4px;
}

.nf-speech-bubble.nf-speech-client .nf-speech-role {
    color: var(--nf-text-muted, #515165);
}

/* ================================================================
   Finish Button (tutorial complete)
   ================================================================ */
.nf-finish-btn {
    background: var(--nf-success, #10B981) !important;
    border-color: var(--nf-success, #10B981) !important;
}

.nf-finish-btn:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 768px) {
    .nf-tutorial-sidebar {
        display: none;
    }

    .nf-chat-bubble {
        max-width: 90%;
    }

    .nf-tutorial-header {
        padding: 0.5rem 1rem;
    }

    .nf-tutorial-header-left {
        flex-direction: column;
        gap: 0;
    }

    .nf-tutorial-title {
        font-size: 1rem;
    }

    .nf-complete-card {
        margin: 1rem;
        padding: 2rem;
    }
}
