        /* System fonts keep the downloaded project usable without network access. */
        .modal-overlay {
            background-color: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(4px);
        }

      body {
    font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    font-size: 16px;
}

        p.text-indigo-600.font-extrabold.uppercase,
        p.text-slate-500.font-bold.mt-2,
        p.text-indigo-600.font-black.text-2xl.uppercase.tracking-widest,
        p.text-lg.text-slate-700.font-black.uppercase.tracking-widest {
            text-align: center;
        }


       p {
        text-align: left;
        }



        .sales-card {
            background: white;
            border: 1px solid #e2e8f0;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
        }

        .html-block-container {
            position: relative;
            min-height: 50px;
            width: 100%;
        }



        h2[contenteditable] {
            margin-bottom: 1rem;
        }


        .gradient-text {
            background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        [contenteditable]:hover {
            cursor: text;
            background: rgba(99, 102, 241, 0.02);
        }

        [contenteditable]:focus {
            outline: 2px solid #6366f1;
            outline-offset: 4px;
            background: rgba(99, 102, 241, 0.05);
        }

        /* Text Toolbar Styles */
        #text-toolbar {
            position: absolute;
            z-index: 1000;
            display: none;
            background: #1e293b;
            padding: 4px;
            border-radius: 8px;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            flex-direction: row;
            gap: 4px;
            align-items: center;
        }

        .scroll-container {
            max-height: 40vh;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: #cbd5e1 transparent;
        }

        .scroll-container::-webkit-scrollbar {
            width: 6px;
        }

        .scroll-container::-webkit-scrollbar-thumb {
            background-color: #cbd5e1;
            border-radius: 10px;
        }

        .toolbar-btn {
            color: white;
            padding: 6px 10px;
            border-radius: 4px;
            font-size: 13px;
            cursor: pointer;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            outline: none;
        }

        .toolbar-btn:hover {
            background: #334155;
        }

        .toolbar-btn:focus,
        .toolbar-btn:focus-visible,
        #project-dropdown button:focus,
        #project-dropdown button:focus-visible,
        #btn-project-main:focus,
        #btn-project-main:focus-visible {
            outline: none !important;
            box-shadow: none !important;
        }

        .toolbar-btn.active {
            background: #6366f1;
        }

        .color-dot {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .img-container, .html-block-container, .btn-editor-container {
            position: relative;
            display: block !important;
            width: 100% !important;
            flex-basis: 100% !important;
            flex-grow: 0;
            flex-shrink: 0;
            clear: both;
            transition: all 0.3s ease;
            margin: 0 !important;
        
        }

        /* Uploaded images keep their natural proportions but never overflow
           the editable content column on narrow screens. */
            .img-container > img,
            .img-container > picture > img {
                display: block;
                width: auto;
                max-width: 100% !important;
                height: auto !important;
                margin: 12px auto;
            }

        .section-controls {
            position: absolute;
            top: -10px;
            right: -40px;
            display: flex;
            flex-direction: row-reverse;
            gap: 0.5rem;
            opacity: 0;
            transition: opacity 0.1s ease-in-out;
            z-index: 40;
            pointer-events: none;
        }

        /* Improved hover stability: show controls when parent is hovered or active via JS */
        [data-has-controls]:hover > .section-controls,
        [data-has-controls].controls-active > .section-controls {
            opacity: 1 !important;
            pointer-events: auto !important;
        }

        /* Prevent parent controls from appearing when a nested child element is being hovered */
        /* But ONLY if we aren't currently hovering the parent's controls themselves */
        [data-has-controls]:hover:has([data-has-controls]:hover):not(:has(> .section-controls:hover)) > .section-controls,
        [data-has-controls].controls-active:has(.controls-active):not(:has(> .section-controls:hover)) > .section-controls {
            opacity: 0 !important;
            pointer-events: none !important;
        }

        /* Paragraph alignment controls (left / center / right) */
        .align-controls {
            position: absolute;
            top: -46px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.25rem;
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 9999px;
            padding: 0.3rem;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.12s ease-in-out;
            z-index: 45;
        }

        .align-controls.align-visible {
            opacity: 1 !important;
            pointer-events: auto !important;
        }

        .align-btn {
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            background: transparent;
            color: #64748b;
            border-radius: 9999px;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            font-size: 0.8rem;
        }

        .align-btn:hover {
            background: #eef2ff;
            color: #4f46e5;
        }

        .align-btn.active {
            background: #6366f1;
            color: #ffffff;
        }

        /* Hover highlights to clarify what's being deleted */
        [data-has-controls]:hover {
            outline: 2px solid rgba(99, 102, 241, 0.3);
            outline-offset: 4px;
        }
        
        [data-has-controls]:hover:has([data-has-controls]:hover) {
            outline: none;
        }

        /* Red highlight when hovering specific delete buttons */
        .delete-preview {
            outline: 3px solid #ef4444 !important;
            outline-offset: 4px !important;
            background-color: rgba(239, 68, 68, 0.05) !important;
        }

        /* Removed steps and conclusion container styles */

        .edit-html-link {
            background: #6366f1;
            color: white;
            border-radius: 0.75rem;
            padding: 0.5rem 1rem;
            font-size: 0.75rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            pointer-events: auto;
            transition: all 0.2s;
        }

        .edit-html-link:hover {
            background: #4f46e5;
            transform: translateY(-1px);
        }

        .control-btn {
            background: white;
            color: #1e293b;
            border-radius: 9999px;
            /* Fixed width/height to ensure a perfect circle */
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            cursor: pointer;
            border: 1px solid #e2e8f0;
            transition: background 0.2s, transform 0.2s, color 0.2s, border-color 0.2s;
        }

        .control-btn:hover {
            background: #f8fafc;
            transform: scale(1.1);
        }

        .control-btn.delete:hover {
            color: #ef4444;
            border-color: #fca5a5;
        }

        /* Popup (custom dialog) buttons — styled separately from the document
           editor buttons (control-btn / edit-html-link) so dialogs look modern. */
        .dialog-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            width: 100%;
            padding: 0.75rem 1rem;
            border-radius: 0.75rem;
            font-family: inherit;
            font-size: 0.8rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border: none;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
        }

        .dialog-btn:active {
            transform: scale(0.98);
        }

        .dialog-btn:focus-visible {
            outline: 2px solid #6366f1;
            outline-offset: 2px;
        }

        .dialog-btn--primary {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            color: #ffffff;
            box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
        }

        .dialog-btn--primary:hover {
            filter: brightness(1.06);
            box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
        }

        .dialog-btn--secondary {
            background: #f1f5f9;
            color: #334155;
        }

        .dialog-btn--secondary:hover {
            background: #e2e8f0;
        }

        .dialog-btn--danger {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: #ffffff;
            box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
        }

        .dialog-btn--danger:hover {
            filter: brightness(1.06);
            box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
        }

        .drop-indicator {
            height: 4px;
            background: #6366f1;
            border-radius: 9999px;
            margin: 4px 0;
            width: 100%;
            pointer-events: none;
            transition: all 0.2s;
            box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
        }

        .editable-img {
            cursor: pointer;
            transition: filter 0.2s;
        }

        .editable-img:hover {
            filter: brightness(0.9);
        }

        .text-lg {
           font-size: 1.25rem !important; /* 20px */
            line-height: 1.75rem;
        }

       .text-3xl {
          font-size: 2.75rem !important; /* 32px */
          line-height: 1.15;
        }

        @media (min-width: 768px) {
            .md\:text-4xl {
                font-size: 2.5rem !important; /* 40px */
                line-height: 1.1;
            }
        }