/**
 * WinWin Shop - Tutorial Page Styles (Upgraded)
 * עיצוב דף ההדרכה - גרסה משודרגת עם נגישות מעולה
 */

:root {
    --purple: #4F46E5;
    --purple-dark: #4F46E5;
    --purple-light: #EDE9FE;
    --teal: #4F46E5;
    --teal-dark: #4338CA;
    --teal-light: #CCFBF1;
    --gradient: linear-gradient(#4F46E5, #4F46E5);
    --text-dark: #1F2937;
    --text-mid: #4B5563;
    --text-light: #6B7280;
    --text-muted: #9CA3AF;
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-soft: #F3F4F6;
    --border: #E5E7EB;
    --success: #4F46E5;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', 'Assistant', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    text-align: start;
    line-height: 1.55;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* ============ HEADER ============ */
.tutorial-header {
    background: var(--bg-white);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
}

.tutorial-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tutorial-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.15rem;
}

.tutorial-header .logo img {
    height: 36px;
    width: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-nav .nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.header-nav .nav-link:hover {
    color: var(--purple);
}

.btn {
    display: inline-block;
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}

.btn-light {
    background: var(--bg-white);
    color: var(--purple);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: #fff;
    color: var(--purple);
}

/* ============ HERO — compact ============ */
.tutorial-hero {
    background: linear-gradient(160deg, #F3EEFF 0%, #F8F5FF 50%, #F0FDFA 100%);
    padding: 40px 0 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tutorial-hero::before,
.tutorial-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    pointer-events: none;
}

.tutorial-hero::before {
    width: 300px;
    height: 300px;
    background: var(--purple);
    top: -100px;
    right: -50px;
    animation: heroDrift 10s ease-in-out infinite;
}

.tutorial-hero::after {
    width: 250px;
    height: 250px;
    background: var(--teal);
    bottom: -80px;
    left: -30px;
    animation: heroDrift 12s ease-in-out infinite reverse;
}

@keyframes heroDrift {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 20px);
    }
}

.tutorial-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-mid);
    margin-bottom: 24px;
    position: relative;
}

.hero-badge {
    display: none;
}

/* Tab Selector — inline pills */
.user-type-selector {
    display: flex;
    gap: 0;
    justify-content: center;
    position: relative;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 4px;
    display: inline-flex;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

.type-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: transparent;
    border: none;
    border-radius: 9px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.type-btn i {
    font-size: 1rem;
}

.type-btn:hover {
    color: var(--text-dark);
}

.type-btn.active {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.25);
}

/* ============ TOC NAV — horizontal pills ============ */
.toc-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0;
    transition: box-shadow 0.3s ease;
    position: relative;
}

/* Fade hints on edges for mobile scroll */
.toc-nav::before,
.toc-nav::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.toc-nav::before {
    right: 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95));
}

.toc-nav::after {
    left: 0;
    background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.95));
}

@media (max-width: 768px) {

    .toc-nav::before,
    .toc-nav::after {
        opacity: 1;
    }
}

.toc-nav.sticky {
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    z-index: 90;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.toc-content {
    display: flex;
    gap: 6px;
    padding: 10px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: -20px;
    margin-right: -20px;
}

.toc-content::-webkit-scrollbar {
    display: none;
}

.toc-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.toc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-soft);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.82rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.toc-link:hover {
    background: var(--border);
    color: var(--text-dark);
}

.toc-link.active {
    background: var(--purple);
    color: #fff;
}

/* ============ MAIN CONTENT ============ */
.tutorial-content {
    padding: 30px 0 50px;
}

/* ============ ACCORDION STEPS ============ */
.step-section {
    background: var(--bg-white);
    border-radius: 14px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    scroll-margin-top: 140px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.step-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Clickable header — acts as accordion trigger */
.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
    border-bottom: 1px solid transparent;
}

.step-header:hover {
    background: var(--bg-light);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 11px;
    flex-shrink: 0;
}

.step-info {
    flex: 1;
}

.step-info h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.step-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Chevron indicator */
.step-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s;
    font-size: 0.8rem;
}

.step-section.open .step-toggle {
    transform: rotate(180deg);
    background: var(--purple-light);
    color: var(--purple);
}

/* Collapsible content */
.step-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-section.open .step-body {
    max-height: 2000px;
}

.step-section.open .step-header {
    border-bottom-color: var(--border);
}

.step-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: start;
    padding: 18px 20px;
}

/* Tutorial Image */
.tutorial-image-container {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 6px;
    text-align: center;
    border: 1px solid var(--border);
    position: sticky;
    top: 120px;
}

.tutorial-image {
    max-width: 100%;
    max-height: 420px;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Step Text Content */
.step-text h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.step-list {
    list-style: none;
    counter-reset: step-counter;
}

.step-list li {
    position: relative;
    padding-right: 38px;
    padding-bottom: 10px;
    margin-bottom: 0;
}

.step-list li:last-child {
    padding-bottom: 0;
}

.step-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--bg-soft);
    color: var(--purple);
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-list li strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-dark);
    margin-bottom: 1px;
}

.step-list li p {
    color: var(--text-light);
    font-size: 0.84rem;
    margin: 0;
    line-height: 1.4;
}

.step-list li code {
    background: var(--bg-soft);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--purple-dark);
}

/* Feature List */
.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.88rem;
    color: var(--text-mid);
}

.feature-list li i {
    color: var(--success);
    font-size: 0.85rem;
}

.feature-list li i.fa-bell {
    color: var(--warning);
}

.feature-list li i.fa-robot {
    color: var(--purple);
}

/* Info Boxes */
.tip-box,
.warning-box,
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 9px;
    margin-top: 12px;
    font-size: 0.84rem;
    line-height: 1.5;
}

.tip-box {
    background: #FEF9C3;
    border: 1px solid #FCD34D;
}

.tip-box i {
    color: var(--warning);
    font-size: 1rem;
    flex-shrink: 0;
}

.warning-box {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
}

.warning-box i {
    color: var(--danger);
    font-size: 1rem;
    flex-shrink: 0;
}

.info-box {
    background: #F0F9FF;
    border: 1px solid #7DD3FC;
}

.info-box i {
    color: var(--info);
    font-size: 1rem;
    flex-shrink: 0;
}

.tip-box strong,
.warning-box strong,
.info-box strong {
    font-weight: 700;
}

/* ============ FAQ SECTION ============ */
.faq-section {
    background: var(--bg-white);
    border-radius: 14px;
    padding: 30px 24px;
    margin-top: 30px;
    border: 1px solid var(--border);
}

.faq-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-section h2 i {
    color: var(--purple);
}

.faq-grid {
    display: grid;
    gap: 8px;
}

/* Audience filter — hide FAQs that don't match the currently active user type */
.faq-section[data-active-type="business"] .faq-item[data-audience="creator"],
.faq-section[data-active-type="creator"] .faq-item[data-audience="business"] {
    display: none;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.faq-item:hover {
    border-color: var(--purple);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-light);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: var(--bg-soft);
}

.faq-question i {
    color: var(--text-muted);
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.faq-item.open .faq-question {
    background: var(--purple);
    color: #fff;
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
    color: #fff;
}

.faq-answer {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-mid);
    line-height: 1.7;
    font-size: 0.9rem;
}

.faq-item.open .faq-answer {
    padding: 16px 18px;
    max-height: 300px;
}

.faq-answer a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* ============ CTA SECTION ============ */
.tutorial-cta {
    background: linear-gradient(160deg, #F3EEFF 0%, #F0FDFA 100%);
    padding: 50px 0;
    text-align: center;
    position: relative;
}

.tutorial-cta h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.tutorial-cta p {
    font-size: 1rem;
    color: var(--text-mid);
    margin-bottom: 24px;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 180px;
    padding: 12px 24px;
    font-size: 0.95rem;
}

.cta-buttons .btn-light {
    border: 1px solid var(--border);
}

.cta-buttons .btn-outline {
    color: var(--text-mid);
    border-color: var(--border);
}

.cta-buttons .btn-outline:hover {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
}

/* ============ FOOTER ============ */
.tutorial-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 30px 0;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand img {
    height: 32px;
}

.footer-brand span {
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--purple);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .tutorial-header .container {
        flex-direction: row;
    }

    .tutorial-header .logo {
        font-size: 0.95rem;
        gap: 7px;
    }

    .tutorial-header .logo img {
        height: 28px;
    }

    .header-nav {
        gap: 14px;
    }

    .header-nav .nav-link {
        font-size: 0.75rem;
    }

    .btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .tutorial-hero {
        padding: 28px 0 22px;
    }

    .tutorial-hero h1 {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 18px;
    }

    .type-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .toc-nav.sticky {
        top: 53px;
    }

    .toc-content {
        padding: 8px 0;
        gap: 4px;
    }

    .toc-link {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .tutorial-content {
        padding: 20px 0 40px;
    }

    .step-section {
        border-radius: 12px;
        margin-bottom: 6px;
        scroll-margin-top: 120px;
    }

    .step-header {
        padding: 12px 14px;
        gap: 10px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .step-info h2 {
        font-size: 0.95rem;
    }

    .step-info p {
        font-size: 0.75rem;
    }

    .step-toggle {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }

    .step-content {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 14px 16px;
    }

    .tutorial-image-container {
        max-width: 220px;
        margin: 0 auto;
        position: static;
    }

    .tutorial-image {
        max-height: 320px;
    }

    .step-list li {
        padding-right: 32px;
        padding-bottom: 8px;
    }

    .step-list li::before {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .step-list li strong {
        font-size: 0.85rem;
    }

    .step-list li p {
        font-size: 0.8rem;
    }

    .feature-list li {
        font-size: 0.82rem;
        padding: 3px 0;
    }

    .tip-box,
    .warning-box,
    .info-box {
        padding: 10px;
        font-size: 0.8rem;
        gap: 8px;
        margin-top: 10px;
    }

    .faq-section {
        padding: 24px 16px;
        margin-top: 20px;
    }

    .faq-section h2 {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .faq-question {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .tutorial-cta {
        padding: 36px 0;
    }

    .tutorial-cta h2 {
        font-size: 1.4rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 260px;
    }

    .footer-links {
        gap: 16px;
    }
}

@media (max-width: 380px) {
    .tutorial-hero h1 {
        font-size: 1.35rem;
    }

    .hero-subtitle {
        font-size: 0.82rem;
    }

    .type-btn {
        padding: 7px 12px;
        font-size: 0.8rem;
        gap: 6px;
    }

    .toc-link {
        padding: 5px 8px;
        font-size: 0.72rem;
    }

    .step-header {
        padding: 12px 14px;
    }

    .step-info h2 {
        font-size: 0.9rem;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}

/* ============ ANIMATIONS ============ */
.step-section {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s;
}

.step-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ NEW: ENHANCED ACTIVE STEP + NEXT BUTTON ============ */

/* Active step gets a subtle glow + accent border */
.step-section.open {
    border-color: var(--purple-light);
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.10);
}

.step-section.open .step-number {
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    animation: stepNumberPulse 2.4s ease-in-out infinite;
}

@keyframes stepNumberPulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35); }
    50%      { box-shadow: 0 4px 20px rgba(79, 70, 229, 0.55); }
}

/* Intro paragraph at the top of step content */
.step-intro {
    font-size: 0.92rem;
    color: var(--text-mid);
    line-height: 1.65;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #F5F3FF 0%, #ECFEFF 100%);
    border-radius: 10px;
    border-right: 3px solid var(--purple);
    border-left: none;
}

[dir="ltr"] .step-intro {
    border-right: none;
    border-left: 3px solid var(--purple);
}

/* Step content fade-in when accordion opens */
.step-section.open .step-content > * {
    animation: stepContentFadeIn 0.5s ease both;
}

.step-section.open .step-content > *:nth-child(2) {
    animation-delay: 0.08s;
}

@keyframes stepContentFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Footer area at the end of each step */
.step-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}

[dir="rtl"] .step-footer {
    justify-content: flex-start;
}

/* The "Next Step" button — the centerpiece of the interactive accordion */
.next-step-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 11px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
    position: relative;
    overflow: hidden;
}

.next-step-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.42);
}

.next-step-btn:active {
    transform: translateY(0);
}

.next-step-btn i {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}

.next-step-btn:hover i {
    transform: translateX(-4px);
}

[dir="ltr"] .next-step-btn:hover i {
    transform: translateX(4px);
}

/* Finish button (last step) gets a teal/success tint */
.next-step-btn.finish-btn {
    background: linear-gradient(#4F46E5, #4F46E5);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.32);
}

.next-step-btn.finish-btn:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.next-step-btn.finish-btn i {
    transition: transform 0.25s ease;
}

.next-step-btn.finish-btn:hover i {
    transform: scale(1.15);
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .step-intro {
        font-size: 0.85rem;
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    .step-footer {
        margin-top: 14px;
        padding-top: 12px;
        justify-content: stretch;
    }

    .next-step-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 18px;
        font-size: 0.92rem;
    }
}

@media (max-width: 380px) {
    .next-step-btn {
        font-size: 0.88rem;
        padding: 11px 16px;
    }
}

/* ============ FLOATING NEXT-STEP BUTTON (mobile only) ============ */
/* Hidden on desktop entirely */
.floating-next-btn {
    display: none;
}

@media (max-width: 768px) {
    .floating-next-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: 18px;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
        z-index: 95;
        padding: 12px 22px;
        background: var(--gradient);
        color: #fff;
        border: none;
        border-radius: 999px;
        font-family: inherit;
        font-size: 0.92rem;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45),
                    0 2px 8px rgba(0, 0, 0, 0.10);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        white-space: nowrap;
    }

    .floating-next-btn[hidden] {
        display: none !important;
    }

    .floating-next-btn.visible {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .floating-next-btn:active {
        transform: translateX(-50%) translateY(2px);
    }

    .floating-next-btn i {
        font-size: 0.82rem;
    }

    /* Two-state content: only one is shown at a time */
    .floating-next-btn .fb-content {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .floating-next-btn .fb-finish {
        display: none;
    }

    /* Finish state — green gradient + checkmark */
    .floating-next-btn.finish {
        background: linear-gradient(#4F46E5, #4F46E5);
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45),
                    0 2px 8px rgba(0, 0, 0, 0.10);
    }

    .floating-next-btn.finish .fb-next {
        display: none;
    }

    .floating-next-btn.finish .fb-finish {
        display: inline-flex;
    }

    /* Subtle pulse on the finish state to celebrate completion */
    .floating-next-btn.finish.visible {
        animation: floatingFinishPulse 2.4s ease-in-out infinite;
    }

    @keyframes floatingFinishPulse {
        0%, 100% { box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45), 0 2px 8px rgba(0, 0, 0, 0.10); }
        50%      { box-shadow: 0 10px 30px rgba(16, 185, 129, 0.65), 0 2px 12px rgba(0, 0, 0, 0.15); }
    }

    .floating-next-btn.finish .fb-finish i {
        font-size: 1rem;
        transition: transform 0.3s ease;
    }

    .floating-next-btn.finish:hover .fb-finish i,
    .floating-next-btn.finish:active .fb-finish i {
        transform: scale(1.15);
    }
}

@media (max-width: 380px) {
    .floating-next-btn {
        font-size: 0.86rem;
        padding: 11px 18px;
        bottom: 14px;
    }
}

/* ============================================================
   Tutorial v3 — SIMPLE linear-journey design (2026-07)
   Role cards → flow toggle → one clean timeline. No accordions.
   One indigo accent (#4F46E5), quiet type, no jumping.
   ============================================================ */

/* ---------- hero role cards ---------- */
.tutorial-hero .hero-sell { max-width: 600px; margin: .7rem auto 0; color: #6B7280; font-size: 1.05rem; line-height: 1.55; font-weight: 500; }
.role-cards { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 1.6rem auto 0; max-width: 640px; }
.role-card {
    flex: 1 1 260px; max-width: 300px; background: #fff; border: 1.5px solid #E8E9ED; border-radius: 16px;
    padding: 1.4rem 1.2rem; cursor: pointer; font-family: inherit; display: flex; flex-direction: column;
    align-items: center; gap: .35rem; text-align: center; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.role-card i { font-size: 1.6rem; color: #9CA3AF; margin-bottom: .3rem; transition: color .15s; }
.role-card .rc-title { font-size: 1.12rem; font-weight: 800; color: #111827; }
.role-card .rc-sub { font-size: .86rem; color: #9CA3AF; font-weight: 500; }
.role-card:hover { border-color: #C7D2FE; transform: translateY(-2px); box-shadow: 0 12px 28px -14px rgba(79, 70, 229,.4); }
.role-card.active { border-color: #4F46E5; box-shadow: 0 12px 30px -14px rgba(79, 70, 229,.5); }
.role-card.active i, .role-card.active .rc-sub { color: #4F46E5; }

/* ---------- flow chooser ---------- */
.flow-head { text-align: center; color: #6B7280; font-size: 1rem; font-weight: 600; margin: 2.6rem 0 1.1rem; }
.flow-toggle { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin: 0 0 1.6rem; }
.flow-tab {
    background: #fff; border: 1.5px solid #E8E9ED; border-radius: 12px; padding: .7rem 1.7rem; cursor: pointer;
    font-family: inherit; text-align: center; display: flex; flex-direction: column; gap: .12rem; min-width: 170px;
    font-weight: 800; color: #6B7280; font-size: 1.02rem; transition: border-color .15s, background .15s, color .15s;
}
.flow-tab span { font-weight: 500; color: #9CA3AF; font-size: .74rem; }
.flow-tab:hover { border-color: #C7D2FE; }
.flow-tab.active { border-color: #4F46E5; background: #F5F6FF; color: #4F46E5; }
.flow-tab.active span { color: #4F46E5; }
.flow-panel.hidden { display: none; }
.flow-intro {
    max-width: 640px; margin: 0 auto 2rem; text-align: center; font-size: 1.05rem; line-height: 1.6;
    color: #374151; background: #F5F6FF; border: 1px solid #E0E4FF; border-radius: 14px; padding: 1rem 1.3rem;
}

/* ---------- the journey (vertical timeline) ---------- */
.journey { max-width: 680px; margin: 0 auto; }
.jstep { display: grid; grid-template-columns: 40px 1fr; gap: 1.1rem; position: relative; padding-bottom: 1.8rem; }
.jstep:not(.last)::before {
    content: ""; position: absolute; top: 40px; bottom: 0; inset-inline-start: 19px; width: 2px; background: #E8E9ED;
}
.jnum {
    width: 40px; height: 40px; border-radius: 50%; background: #4F46E5; color: #fff; font-weight: 800; font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center; z-index: 1; box-shadow: 0 4px 10px -3px rgba(79, 70, 229,.5);
}
.jbody { padding-top: 3px; min-width: 0; }
.jbody h3 { font-size: 1.12rem; font-weight: 800; color: #111827; margin: 0 0 .3rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.jbody p { font-size: .98rem; color: #4B5563; line-height: 1.6; margin: 0; }
.opt-chip { font-size: .68rem; font-weight: 700; color: #6B7280; background: #F1F2F5; border-radius: 999px; padding: 2px 9px; }

/* ---------- demo frames inside a step ---------- */
.demo-frame {
    position: relative; width: 100%; max-width: 560px; margin: 1rem 0 .2rem; overflow: hidden;
    border: 1px solid #E8E9ED; border-radius: 14px; background: #fff; box-shadow: 0 20px 44px -24px rgba(17,24,39,.4);
}
.demo-frame--phone { max-width: 300px; }
.journey--phone .demo-frame--phone { margin-inline: 0; }
.demo-frame iframe { position: absolute; top: 0; inset-inline-start: 0; border: 0; background: #fff; pointer-events: none; }
.demo-badge {
    position: absolute; bottom: 8px; inset-inline-end: 8px; z-index: 3; pointer-events: none;
    background: rgba(15,23,42,.82); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 7px;
}

/* ---------- help note + join CTA ---------- */
.help-note {
    max-width: 680px; margin: 1.5rem auto 0; background: #FAFAFB; border-inline-start: 3px solid #4F46E5;
    border-radius: 10px; padding: .9rem 1.1rem; font-size: .94rem; color: #4B5563; line-height: 1.6;
}
.help-note b { color: #111827; }
.join-cta { max-width: 620px; margin: 3rem auto 0; text-align: center; background: #F5F6FF; border: 1px solid #E0E4FF; border-radius: 18px; padding: 2.2rem 1.7rem; }
.join-cta h3 { font-size: 1.3rem; font-weight: 800; color: #111827; margin: 0 0 .55rem; }
.join-cta p { font-size: 1rem; color: #4B5563; margin: 0 auto 1.4rem; max-width: 470px; line-height: 1.6; }
.join-btn { display: inline-block; background: #4F46E5; color: #fff; font-weight: 700; font-size: 1.02rem; padding: .85rem 2.2rem; border-radius: 12px; text-decoration: none; box-shadow: 0 8px 22px -8px rgba(79, 70, 229,.5); transition: background .15s, transform .15s; }
.join-btn:hover { background: #4F46E5; transform: translateY(-1px); }
.join-have { margin-top: 1.1rem; font-size: .86rem; color: #9CA3AF; }
.join-have a { color: #4F46E5; font-weight: 600; text-decoration: none; }

@media (max-width: 560px) {
    .jstep { grid-template-columns: 32px 1fr; gap: .8rem; }
    .jnum { width: 32px; height: 32px; font-size: .92rem; }
    .jstep:not(.last)::before { inset-inline-start: 15px; top: 32px; }
    .demo-frame--phone { max-width: 260px; }
}
