/* ─── AUTH SCREEN ──────────────────────────────────────────── */
.auth-screen {
    display: none;
    position: fixed; inset: 0;
    background: var(--warm-white);
    z-index: var(--z-modal, 9999);
    justify-content: center; align-items: center;
}
.auth-screen.active { display: flex; }
.auth-container {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px var(--shadow-lg);
    max-width: 380px; width: 90%;
    text-align: center;
}
.auth-container h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    color: var(--charcoal);
    margin: 0 0 0.25rem;
}
.auth-subtitle { color: var(--slate); font-size: 0.9rem; margin: 0 0 1.5rem; }
.auth-input {
    display: block; width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
    background: var(--bg-surface);
    color: var(--charcoal);
}
.auth-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--shadow-primary); }
.auth-error { color: var(--color-danger, #dc2626); font-size: 0.85rem; margin-top: 0.5rem; min-height: 1.2em; }
.auth-password-hint { color: var(--slate); font-size: 0.78rem; margin: -0.4rem 0 0.6rem; text-align: left; }
.auth-footer-note { font-size: 0.75rem; color: var(--slate); line-height: 1.5; margin-top: 1.25rem; margin-bottom: 0; }

/* Screen-reader only utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ─── SESSION PICKER ──────────────────────────────────────── */
.session-item {
    display: flex; flex-wrap: wrap; align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
}
.session-item:hover { background: var(--primary-lightest); }
.session-item.active { border-color: var(--primary); background: var(--primary-light); }
.session-item-title { font-weight: 600; width: calc(100% - 2rem); font-size: 0.95rem; }
.session-item-meta { font-size: 0.8rem; color: var(--slate); width: 100%; margin-top: 0.15rem; }
.session-delete-btn {
    position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; font-size: 1.2rem; cursor: pointer;
    color: var(--slate); padding: 0.25rem 0.5rem; line-height: 1;
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
}
.session-delete-btn:hover { color: var(--color-danger, #dc2626); }
.session-item.local-session { border-style: dashed; }

/* ─── DARK MODE OVERRIDES FOR AUTH / SESSIONS ─────────────── */
body.dark-mode .auth-screen { background: var(--warm-white); }
body.dark-mode .auth-container { background: var(--bg-surface); }
body.dark-mode .auth-input { background: var(--bg-surface); border-color: var(--border-light); color: var(--charcoal); }
body.dark-mode .session-item { border-color: var(--border-light); }
body.dark-mode .session-item:hover { background: var(--primary-lightest); }

/* ─── TEMPLATE BROWSER ─────────────────────────────── */
.template-tabs {
    display: flex; gap: 0.25rem; margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-light); padding-bottom: 0;
}
.template-tab {
    padding: 0.5rem 1rem; border: none; background: none;
    font-family: 'Montserrat', sans-serif; font-size: 0.78rem; font-weight: 700;
    color: var(--slate); cursor: pointer;
    border-bottom: 2.5px solid transparent; margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.template-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.template-tab:hover:not(.active) { color: var(--charcoal); }

.template-grid {
    display: grid; grid-template-columns: 1fr; gap: 0.5rem;
    max-height: 400px; overflow-y: auto; padding-right: 0.25rem;
}
.template-card {
    display: flex; flex-direction: column; gap: 0.25rem;
    padding: 0.85rem 1rem; border: 1px solid var(--border-light);
    border-radius: 0.5rem; cursor: pointer; transition: all 0.15s;
}
.template-card:hover { border-color: var(--primary); background: var(--primary-lightest); }
.template-card-title {
    font-weight: 600; font-size: 0.92rem; color: var(--charcoal);
}
.template-card-desc {
    font-size: 0.78rem; color: var(--slate); line-height: 1.4;
}
.template-card-badge {
    display: inline-block; font-size: 0.62rem; font-family: 'Montserrat', sans-serif;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem; border-radius: 10px; margin-top: 0.25rem;
    width: fit-content;
}
.template-badge-member { background: var(--badge-member-bg); color: var(--badge-member-text); }
.template-badge-pro { background: var(--badge-pro-bg); color: var(--badge-pro-text); }
body.dark-mode .template-badge-member { background: var(--badge-member-bg); color: var(--badge-member-text); }
body.dark-mode .template-card { border-color: var(--border-light); }
body.dark-mode .template-card:hover { border-color: var(--primary); background: var(--primary-lightest); }

.template-empty {
    text-align: center; padding: 2rem 1rem; color: var(--slate); font-size: 0.85rem;
}
.template-loading { text-align: center; padding: 2rem; color: var(--slate); }

/* Inline SVG icon base */
.i { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; flex-shrink: 0; }
.i-lg { width: 1.25em; height: 1.25em; }
.i-xl { width: 2em; height: 2em; }

/* ─── INTAKE VIEW ───────────────────────────────── */
.intake-view {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    padding: 3rem 1.5rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.intake-view-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}
.intake-view-subtitle {
    font-size: 0.82rem;
    color: var(--slate);
    margin-bottom: 2rem;
    line-height: 1.5;
}
.intake-progress {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 2rem;
}
.intake-progress-dot {
    width: 12px; height: 12px;
    min-width: 44px; min-height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: default;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.intake-progress-dot::after {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--border-light);
    transition: all 0.3s ease;
}
.intake-progress-dot.completed { cursor: pointer; }
.intake-progress-dot.completed::after { background: var(--primary); }
.intake-progress-dot.completed:hover::after { transform: scale(1.4); }
.intake-progress-dot.current { cursor: pointer; }
.intake-progress-dot.current::after { background: var(--primary); transform: scale(1.3); box-shadow: 0 0 0 3px var(--shadow-primary); }
.intake-progress-dot.current:hover::after { transform: scale(1.5); }
.intake-progress-dot:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 50%; }
.intake-progress-dot:disabled { cursor: default; opacity: 0.5; }
.intake-field {
    margin-bottom: 1.25rem;
    animation: intakeSlideUp 0.35s ease-out;
}
@keyframes intakeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.intake-field-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.3rem;
}
.intake-field-note {
    font-size: 0.72rem;
    color: var(--slate);
    margin-bottom: 0.6rem;
    line-height: 1.5;
}
.intake-field select,
.intake-field textarea {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.88rem;
    color: var(--charcoal);
    background: var(--bg-surface);
    transition: border-color 0.15s;
}
.intake-field select:focus,
.intake-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow-primary);
}
.intake-field textarea {
    resize: vertical;
    min-height: 2.5rem;
    line-height: 1.5;
}
.intake-back-btn {
    margin-top: 0.75rem;
    margin-right: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: var(--slate);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
.intake-back-btn:hover { background: var(--bg-surface); color: var(--charcoal); }
.intake-back-btn:active { transform: scale(0.97); }
.intake-submit-btn {
    margin-top: 0.75rem;
    padding: 0.6rem 1.75rem;
    background: var(--primary);
    color: var(--on-brand);
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.intake-submit-btn:hover { background: var(--primary-mid); }
.intake-submit-btn:active { transform: scale(0.97); }
.intake-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.intake-continue-btn {
    margin-top: 1.5rem;
    padding: 0.7rem 2rem;
    background: var(--primary);
    color: var(--on-brand);
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.intake-continue-btn:hover { background: var(--primary-mid); }
.intake-continue-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.intake-skip-link {
    display: inline-block;
    margin-left: 1rem;
    font-size: 0.75rem;
    color: var(--slate);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}
.intake-skip-link:hover { color: var(--primary); text-decoration: underline; }
.intake-exit-link {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 0.85rem;
    color: var(--slate);
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-surface);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.intake-exit-link:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-tint-xs); }
.intake-done-message {
    text-align: center;
    animation: intakeSlideUp 0.35s ease-out;
}
.intake-done-message h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}
.intake-done-message p {
    font-size: 0.82rem;
    color: var(--slate);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
/* Intake chip-select (for diagnostic questions) */
.intake-chips {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.intake-chip {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-surface);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    color: var(--charcoal);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    line-height: 1.4;
}
.intake-chip:hover { border-color: var(--primary); background: var(--bg-white); }
.intake-chip.selected {
    border-color: var(--primary);
    background: var(--shadow-primary);
    box-shadow: 0 0 0 2px var(--shadow-primary);
}

/* Recommendation panel (left rail, below sidebar info) */
.rec-panel {
    border-top: 1px solid var(--border-light);
    padding: 0.75rem 0 0.5rem;
    margin-top: 0.25rem;
}
.rec-panel-header {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 0.35rem;
}
.rec-panel-diagnosis {
    font-size: 0.75rem;
    color: var(--charcoal);
    line-height: 1.5;
    margin-bottom: 0.6rem;
    padding: 0.5rem 0.6rem;
    background: var(--shadow-primary);
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}
.rec-panel-diagnosis strong { font-weight: 700; }
.rec-panel-item {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.35rem 0.15rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s;
    position: relative;
}
.rec-panel-item:hover { background: var(--bg-surface); }
.rec-panel-item.rec-completed { opacity: 0.55; }
.rec-panel-item.rec-current { background: var(--shadow-primary); }
.rec-panel-check {
    width: 14px; height: 14px;
    border: 1.5px solid var(--border-light);
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.rec-panel-item.rec-completed .rec-panel-check {
    background: var(--primary);
    border-color: var(--primary);
}
.rec-panel-item.rec-completed .rec-panel-check::after {
    content: '\2713';
    color: var(--on-brand);
    font-size: 0.55rem;
    font-weight: 700;
}
.rec-panel-info {
    flex: 1;
    min-width: 0;
}
.rec-panel-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.3;
}
.rec-panel-why {
    font-size: 0.62rem;
    color: var(--slate);
    line-height: 1.4;
    margin-top: 1px;
}
.rec-walkthrough-btn {
    margin-top: 0.3rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    background: transparent;
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.rec-walkthrough-btn:hover {
    background: var(--primary);
    color: var(--on-brand);
}
.rec-panel-dismiss {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 44px; min-height: 44px;
    border: none;
    background: transparent;
    color: var(--slate);
    font-size: 0.65rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}
.rec-panel-item:hover .rec-panel-dismiss { opacity: 0.6; }
.rec-panel-dismiss:hover { opacity: 1 !important; background: var(--border-light); }

/* Sidebar intake panel (progressive build) */
.sidebar-intake-panel {
    padding: 1rem 0;
}
.sidebar-intake-item {
    margin-bottom: 0.75rem;
    animation: intakeSidebarFadeIn 0.4s ease-out;
}
@keyframes intakeSidebarFadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}
.sidebar-intake-item .sidebar-info-label {
    font-size: 0.62rem;
}
.sidebar-intake-item textarea,
.sidebar-intake-item select {
    font-size: 0.78rem;
    padding: 0.4rem 0.6rem;
}

/* ─── WALKTHROUGH GUIDE ──────────────────────────────── */
.walkthrough-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-walkthrough, 9000);
    background: linear-gradient(135deg, var(--primary-lightest) 0%, var(--violet-light) 35%, var(--rose-light) 65%, var(--gamboge-light) 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
body.dark-mode .walkthrough-overlay {
    background: var(--bg-surface);
}
.walkthrough-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
body.dark-mode .walkthrough-header {
    background: rgba(26, 26, 31, 0.6);
}
.walkthrough-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.walkthrough-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.walkthrough-brand-logo svg {
    width: 28px;
    height: 28px;
}
.walkthrough-brand-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.walkthrough-progress-wrap {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}
.walkthrough-progress-bar {
    height: 5px;
    background: var(--border-light);
    border-radius: 5px;
    overflow: hidden;
}
.walkthrough-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--violet) 50%, var(--rose) 100%);
    border-radius: 5px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.walkthrough-progress-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--slate);
    margin-top: 0.35rem;
    text-align: center;
}
.walkthrough-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.walkthrough-dark-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid var(--border-light);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s;
    color: var(--slate);
}
.walkthrough-dark-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}
body.dark-mode .walkthrough-dark-toggle {
    color: var(--slate);
    border-color: var(--border-medium);
}
body.dark-mode .walkthrough-dark-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.walkthrough-dark-toggle .i {
    width: 16px;
    height: 16px;
}
.walkthrough-exit-btn {
    padding: 0.4rem 0.9rem;
    border: 1.5px solid var(--border-medium);
    border-radius: 6px;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.15s;
}
body.dark-mode .walkthrough-exit-btn {
    color: var(--slate);
    border-color: var(--border-medium);
}
.walkthrough-exit-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.voice-guide-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1.5px solid var(--border-medium);
    border-radius: 6px;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.15s;
}
.voice-guide-toggle .i { width: 14px; height: 14px; }
.voice-guide-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.voice-guide-toggle.active {
    border-color: var(--primary);
    background: var(--primary-tint-xs);
    color: var(--primary);
}
body.dark-mode .voice-guide-toggle {
    color: var(--slate);
    border-color: var(--border-medium);
}
body.dark-mode .voice-guide-toggle.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-tint-md);
}
.voice-mic-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border: 1.5px solid var(--border-medium);
    border-radius: 8px;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.2s;
}
.voice-mic-btn .i { width: 14px; height: 14px; }
.voice-mic-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.voice-mic-btn.listening {
    border-color: var(--rose);
    color: var(--rose);
    background: color-mix(in srgb, var(--rose) 8%, transparent);
    animation: voice-pulse 1.5s ease-in-out infinite;
}
@keyframes voice-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rose) 30%, transparent); }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--rose) 0%, transparent); }
}
body.dark-mode .voice-mic-btn {
    color: var(--slate);
    border-color: var(--border-medium);
}
body.dark-mode .voice-mic-btn.listening {
    border-color: var(--rose);
    color: var(--rose);
    background: color-mix(in srgb, var(--rose) 12%, transparent);
}
.walkthrough-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem;
    padding-top: 8vh;
}
.walkthrough-card {
    width: 100%;
    max-width: 640px;
    animation: walkthroughSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
}
body.dark-mode .walkthrough-card {
    background: rgba(30, 30, 38, 0.7);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-color: var(--border-light);
}
@keyframes walkthroughSlideIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* ─── Welcome Screen ─── */
.walkthrough-welcome-card {
    width: 100%;
    max-width: 580px;
    text-align: center;
    animation: walkthroughSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
}
body.dark-mode .walkthrough-welcome-card {
    background: rgba(30, 30, 38, 0.7);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-color: var(--border-light);
}
.walkthrough-welcome-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-brand);
    font-size: 2rem;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 30%, transparent);
}
.walkthrough-welcome-icon .i { stroke: var(--on-brand); width: 32px; height: 32px; }
.walkthrough-welcome-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
body.dark-mode .walkthrough-welcome-title { color: var(--charcoal); }
.walkthrough-welcome-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--slate);
    margin-bottom: 2rem;
}
.walkthrough-welcome-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    margin-bottom: 2rem;
}
.walkthrough-welcome-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.92rem;
    color: var(--charcoal);
    line-height: 1.5;
}
body.dark-mode .walkthrough-welcome-feature { color: var(--border-medium); }
.walkthrough-welcome-feature-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.walkthrough-welcome-feature-icon .i { width: 16px; height: 16px; }
.walkthrough-welcome-feature-icon.f1 { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.walkthrough-welcome-feature-icon.f1 .i { stroke: var(--primary); }
.walkthrough-welcome-feature-icon.f2 { background: color-mix(in srgb, var(--violet) 12%, transparent); }
.walkthrough-welcome-feature-icon.f2 .i { stroke: var(--violet); }
.walkthrough-welcome-feature-icon.f3 { background: color-mix(in srgb, var(--green) 12%, transparent); }
.walkthrough-welcome-feature-icon.f3 .i { stroke: var(--green); }
.walkthrough-welcome-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    color: var(--on-brand);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 30%, transparent);
}
.walkthrough-welcome-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 40%, transparent);
}
.walkthrough-welcome-cta:active { transform: translateY(0); }
.walkthrough-welcome-skip {
    display: block;
    margin: 1rem auto 0;
    background: none;
    border: none;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    color: var(--slate);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.walkthrough-welcome-skip:hover { color: var(--charcoal); }
body.dark-mode .walkthrough-welcome-skip:hover { color: var(--charcoal); }
.walkthrough-step-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.walkthrough-question {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.3;
    margin-bottom: 0.6rem;
}
body.dark-mode .walkthrough-question { color: var(--charcoal); }
.walkthrough-hint {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--slate);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}
body.dark-mode .walkthrough-hint { color: var(--slate); }
.walkthrough-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid var(--border-light);
    padding: 0.75rem 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.15rem;
    color: var(--charcoal);
    background: transparent;
    transition: border-color 0.2s;
    resize: none;
    line-height: 1.5;
    box-sizing: border-box;
}
body.dark-mode .walkthrough-input {
    color: var(--charcoal);
    border-bottom-color: var(--border-medium);
}
.walkthrough-input:focus {
    outline: none;
    border-image: linear-gradient(90deg, var(--primary), var(--violet)) 1;
}
.walkthrough-input::placeholder {
    color: var(--border-medium);
}
body.dark-mode .walkthrough-input::placeholder { color: var(--neutral); }
.walkthrough-select-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
@media (max-width: 480px) {
    .walkthrough-select-grid { grid-template-columns: 1fr; }
}
.walkthrough-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.92rem;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
body.dark-mode .walkthrough-option {
    border-color: var(--border-medium);
    color: var(--charcoal);
    background: rgba(255, 255, 255, 0.04);
}
.walkthrough-option:hover {
    border-color: var(--primary);
    background: var(--primary-lightest);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-primary);
}
body.dark-mode .walkthrough-option:hover {
    background: var(--primary-tint-md);
}
.walkthrough-option.selected {
    border-color: var(--primary);
    background: var(--primary-lightest);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 4px 12px var(--shadow-primary);
}
body.dark-mode .walkthrough-option.selected {
    background: var(--primary-tint-lg);
    color: var(--primary);
}
.walkthrough-option-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 4px;
    border: 1.5px solid var(--border-medium);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--slate);
    flex-shrink: 0;
    transition: all 0.15s;
}
.walkthrough-option.selected .walkthrough-option-key {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-brand);
}
.walkthrough-other-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid var(--border-light);
    padding: 0.5rem 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--charcoal);
    background: transparent;
    margin-top: 0.25rem;
}
body.dark-mode .walkthrough-other-input {
    color: var(--charcoal);
    border-bottom-color: var(--border-medium);
}
.walkthrough-other-input:focus {
    outline: none;
    border-bottom-color: var(--primary);
}
.walkthrough-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
}
.walkthrough-nav-btn {
    padding: 0.65rem 1.5rem;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.15s;
}
.walkthrough-nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.walkthrough-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.walkthrough-next-btn {
    padding: 0.65rem 2rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--on-brand);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px var(--shadow-primary);
}
.walkthrough-next-btn:hover { background: linear-gradient(135deg, var(--primary-mid) 0%, var(--violet) 100%); box-shadow: 0 6px 16px var(--shadow-primary); transform: translateY(-1px); }
.walkthrough-next-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.walkthrough-skip {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.4rem 0.8rem;
    transition: color 0.15s;
}
.walkthrough-skip:hover { color: var(--primary); text-decoration: underline; }
.walkthrough-section-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pillar-color);
    margin-bottom: 0.5rem;
}
body.dark-mode .walkthrough-section-label { color: var(--green); }
/* Completion screen */
.walkthrough-complete {
    text-align: center;
    animation: walkthroughSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.walkthrough-complete-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-lightest), var(--violet-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--shadow-primary);
}
.walkthrough-complete-icon .i {
    width: 28px;
    height: 28px;
    stroke: var(--primary);
}
.walkthrough-complete h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}
body.dark-mode .walkthrough-complete h2 { color: var(--charcoal); }
.walkthrough-complete p {
    font-size: 0.92rem;
    color: var(--slate);
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto 2rem;
}
.walkthrough-complete-btn {
    padding: 0.8rem 2.5rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--on-brand);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px var(--shadow-primary);
}
.walkthrough-complete-btn:hover { background: linear-gradient(135deg, var(--primary-mid) 0%, var(--violet) 100%); box-shadow: 0 6px 16px var(--shadow-primary); transform: translateY(-1px); }
.walkthrough-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}
@media (max-width: 480px) {
    .walkthrough-type-grid { grid-template-columns: 1fr; }
}
.walkthrough-type-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
body.dark-mode .walkthrough-type-option {
    border-color: var(--border-medium);
    color: var(--charcoal);
    background: rgba(255, 255, 255, 0.04);
}
.walkthrough-type-option:hover {
    border-color: var(--primary);
    background: var(--primary-lightest);
}
.walkthrough-type-option.selected {
    border-color: var(--primary);
    background: var(--primary-lightest);
    color: var(--primary);
    font-weight: 600;
}
body.dark-mode .walkthrough-type-option.selected {
    background: var(--primary-tint-lg);
    color: var(--primary);
}
/* Answer review strip */
.walkthrough-review {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.walkthrough-review-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    background: var(--primary-lightest);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.15s;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: none;
}
.walkthrough-review-chip:nth-child(2n) {
    background: var(--violet-light);
    color: var(--violet);
}
.walkthrough-review-chip:nth-child(3n) {
    background: var(--green-light);
    color: var(--green);
}
body.dark-mode .walkthrough-review-chip {
    background: var(--primary-tint-md);
    color: var(--primary);
}
body.dark-mode .walkthrough-review-chip:nth-child(2n) {
    background: color-mix(in srgb, var(--violet) 12%, transparent);
    color: var(--violet);
}
body.dark-mode .walkthrough-review-chip:nth-child(3n) {
    background: color-mix(in srgb, var(--green) 12%, transparent);
    color: var(--green);
}
.walkthrough-review-chip:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}
/* ─── ACTIVATION CARDS (Intake Phase 2) ────────────── */
.activation-card {
    max-width: 680px;
}
.activation-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}
.activation-tag-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--primary-tint-xs);
    border: 1.5px solid var(--primary-tint-sm);
}
.activation-tag-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 1rem;
    line-height: 1.3;
}
.activation-tag-hint {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    color: var(--slate);
    margin-bottom: 1rem;
    line-height: 1.5;
}
.activation-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.activation-chip {
    padding: 0.6rem 1.15rem;
    border-radius: 20px;
    border: 1.5px solid var(--border-medium);
    background: var(--bg-surface);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.3;
}
.activation-chip:hover {
    border-color: var(--primary);
    background: var(--primary-lightest);
    transform: translateY(-1px);
}
.activation-chip.selected {
    border-color: var(--primary);
    background: var(--primary-tint-sm);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--shadow-primary);
}
body.dark-mode .activation-chip {
    border-color: var(--border-medium);
    color: var(--charcoal);
}
body.dark-mode .activation-chip:hover {
    border-color: var(--primary);
    background: var(--primary-tint-md);
}
body.dark-mode .activation-chip.selected {
    border-color: var(--primary);
    background: var(--primary-tint-lg);
    color: var(--primary);
}

/* Intake summary view */
.intake-summary-field {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}
.intake-summary-field:last-child { border-bottom: none; }
.intake-summary-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 0.3rem;
}
.intake-summary-value {
    font-size: 0.85rem;
    color: var(--charcoal);
    line-height: 1.5;
}

@media (max-width: 600px) {
    .walkthrough-question { font-size: 1.25rem; }
    .walkthrough-hint { font-size: 0.82rem; }
    .walkthrough-input { font-size: 1rem; }
    /* Walkthrough header: compact single row on phone */
    .walkthrough-header {
        gap: 0.5rem;
        padding: 0.6rem 1rem;
    }
    .walkthrough-brand-title {
        display: none;
    }
    .walkthrough-progress-wrap {
        flex: 1;
        max-width: none;
        margin: 0 0.5rem;
    }
    .walkthrough-header-actions {
        margin-left: auto;
        flex-shrink: 0;
    }
    .walkthrough-exit-btn {
        font-size: 0.65rem;
        padding: 0.35rem 0.6rem;
    }
    .walkthrough-body { padding: 1.5rem 1rem; }
    .activation-tag-chips { gap: 0.4rem; }
    .activation-chip { font-size: 0.78rem; padding: 0.45rem 0.85rem; }

    /* A10: Mobile responsive intake form */
    .intake-view { padding: 1rem 0.75rem; }
    .intake-field { max-width: 100%; padding: 0 0.25rem; }
    .intake-field-label { font-size: 0.95rem; }
    .intake-field-note { font-size: 0.82rem; }
    .intake-field textarea { font-size: 1rem; min-height: 80px; }
    .intake-field select { font-size: 1rem; padding: 0.6rem; }
    .intake-chips { gap: 0.4rem; }
    .intake-chip { font-size: 0.88rem; padding: 0.5rem 0.8rem; }
    .intake-nav { flex-direction: column; gap: 0.5rem; }
    .intake-nav button { width: 100%; }
    .intake-exit-link { top: 0.75rem; right: 0.75rem; font-size: 0.8rem; }
    .intake-progress-dots { gap: 0.3rem; }
    .intake-progress-dot { width: 10px; height: 10px; }
    .intake-done-message h2 { font-size: 1rem; }
    .intake-continue-btn, .intake-back-btn { font-size: 0.95rem; padding: 0.7rem 1.2rem; }
}

