/* ==========================================================================
   Follow-Along Interactive Tutorial (Spotlight & Floating Guide Card)
   ========================================================================== */
.tutorial-backdrop-dim {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 44, 0.56);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 2400;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.tutorial-backdrop-dim.active {
    opacity: 1;
}

.tutorial-spotlight {
    position: fixed;
    z-index: 2401;
    pointer-events: none;
    border-radius: 14px;
    border: 2px solid #44d8f1;
    box-shadow: 0 0 0 9999px rgba(10, 15, 44, 0.58), 0 0 28px rgba(68, 216, 241, 0.5);
    transition: top 0.26s cubic-bezier(0.22, 1, 0.36, 1),
                left 0.26s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.26s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.26s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease;
    opacity: 0;
}

.tutorial-spotlight.active {
    opacity: 1;
}

.tutorial-card {
    position: fixed;
    z-index: 2420;
    width: min(460px, calc(100vw - 24px));
    max-height: calc(100vh - 28px);
    display: none;
    flex-direction: column;
    background: #ffffff;
    color: #191c1d;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 6, 102, 0.34);
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tutorial-card.open {
    display: flex;
}

.tutorial-card-header {
    background: linear-gradient(135deg, #000666 0%, #1a237e 100%);
    color: #ffffff;
    padding: 16px 18px 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tutorial-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tutorial-step-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #e0e7ff;
}

.tutorial-skip-top {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tutorial-skip-top:hover {
    background: rgba(255, 255, 255, 0.24);
}

.tutorial-title {
    margin: 0;
    font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
}

.tutorial-progress-track {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    flex-shrink: 0;
}

.tutorial-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb 0%, #44d8f1 100%);
    transition: width 0.25s ease;
}

.tutorial-card-body {
    padding: 16px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #334155;
}

.tutorial-card-body p {
    margin: 0;
}

.tutorial-card-body strong {
    color: #0f172a;
}

.tutorial-ext-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.48;
    color: #1e3a8a;
}

.tutorial-ext-box-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    color: #1d4ed8;
}

.tutorial-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tutorial-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tutorial-inline-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.tutorial-card-footer {
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.tutorial-footer-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.tutorial-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 9px;
    border: none;
    background: #1a237e;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tutorial-btn-primary:hover {
    background: #000666;
}

.tutorial-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 9px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tutorial-btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
}

.tutorial-btn-secondary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tutorial-step-select {
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    max-width: 170px;
    cursor: pointer;
}

@media (max-width: 640px) {
    .tutorial-card {
        top: auto !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        transform: none !important;
        width: auto;
        max-height: 72vh;
    }
}