/* The homepage's animated audit demo (was inline in renderHomepage). */
/* Phase containers - opacity timeline keyed to 12s loop */
            .kha-card { position: relative; }
            .kha-phase { position: absolute; inset: 0; padding: 1.25rem; opacity: 0; }
            .kha-phase-input   { animation: kha-phase-1 12s infinite ease-in-out; }
            .kha-phase-scan    { animation: kha-phase-2 12s infinite ease-in-out; }
            .kha-phase-results { animation: kha-phase-3 12s infinite ease-in-out; }
            @keyframes kha-phase-1 {
              0%, 14% { opacity: 1; }
              17%, 100% { opacity: 0; }
            }
            @keyframes kha-phase-2 {
              0%, 16% { opacity: 0; }
              19%, 38% { opacity: 1; }
              41%, 100% { opacity: 0; }
            }
            @keyframes kha-phase-3 {
              0%, 40% { opacity: 0; }
              43%, 92% { opacity: 1; }
              95%, 100% { opacity: 0; }
            }

            /* Status dot + label switching */
            .kha-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: #cbd5e1; animation: kha-dot 12s infinite; }
            @keyframes kha-dot {
              0%, 16% { background: #cbd5e1; }
              19%, 38% { background: #f59e0b; }
              43%, 92% { background: #10b981; }
              95%, 100% { background: #cbd5e1; }
            }
            .kha-status-1, .kha-status-2, .kha-status-3 { position: absolute; left: 0; top: 0; }
            .kha-status-1 { animation: kha-phase-1 12s infinite; }
            .kha-status-2 { animation: kha-phase-2 12s infinite; }
            .kha-status-3 { animation: kha-phase-3 12s infinite; }

            /* Typing animation - example.com is 11 chars */
            .kha-typed {
              display: inline-block;
              overflow: hidden;
              white-space: nowrap;
              vertical-align: bottom;
              width: 0;
              animation: kha-type 12s infinite steps(11, end);
            }
            @keyframes kha-type {
              0% { width: 0; }
              13% { width: 11ch; }
              17% { width: 11ch; }
              18%, 100% { width: 0; }
            }
            .kha-cursor {
              display: inline-block; width: 1px; height: 1em; background: #4f46e5;
              vertical-align: text-bottom; margin-left: 1px;
              animation: kha-blink 0.9s infinite step-end;
            }
            @keyframes kha-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

            /* Audit button colour change once URL is typed */
            .kha-btn { background: #f1f5f9; color: #475569; animation: kha-btn 12s infinite; }
            @keyframes kha-btn {
              0%, 13% { background: #f1f5f9; color: #475569; }
              14%, 17% { background: #4f46e5; color: #fff; }
              18%, 100% { background: #f1f5f9; color: #475569; }
            }

            /* Progress bar fill during scan phase */
            .kha-progress { width: 0; background: #4f46e5; height: 0.375rem; border-radius: 9999px; animation: kha-progress 12s infinite ease-out; }
            @keyframes kha-progress {
              0%, 18% { width: 0; }
              36% { width: 100%; }
              41% { width: 100%; }
              42%, 100% { width: 0; }
            }

            /* Scan-sweep line */
            .kha-sweep { animation: kha-sweep 12s infinite linear; }
            @keyframes kha-sweep {
              0%, 18% { transform: translateY(-4px); opacity: 0; }
              20% { opacity: 1; }
              40% { transform: translateY(60px); opacity: 1; }
              42%, 100% { transform: translateY(60px); opacity: 0; }
            }

            /* Results: overall + cat boxes + findings, staggered fade-in within results phase */
            .kha-pop { opacity: 0; transform: translateY(6px); }
            .kha-pop-overall { animation: kha-pop 12s infinite; }
            .kha-pop-cat-1  { animation: kha-pop 12s infinite 0.05s; }
            .kha-pop-cat-2  { animation: kha-pop 12s infinite 0.15s; }
            .kha-pop-cat-3  { animation: kha-pop 12s infinite 0.25s; }
            .kha-pop-cat-4  { animation: kha-pop 12s infinite 0.35s; }
            .kha-pop-cat-5  { animation: kha-pop 12s infinite 0.45s; }
            .kha-pop-find-1 { animation: kha-pop 12s infinite 0.65s; }
            .kha-pop-find-2 { animation: kha-pop 12s infinite 0.80s; }
            .kha-pop-find-3 { animation: kha-pop 12s infinite 0.95s; }
            @keyframes kha-pop {
              0%, 42% { opacity: 0; transform: translateY(6px); }
              46%, 90% { opacity: 1; transform: translateY(0); }
              92%, 100% { opacity: 0; transform: translateY(0); }
            }

            /* Respect reduced-motion */
            @media (prefers-reduced-motion: reduce) {
              .kha-typed, .kha-cursor, .kha-btn, .kha-progress, .kha-sweep, .kha-pop,
              .kha-pop-overall, .kha-pop-cat-1, .kha-pop-cat-2, .kha-pop-cat-3, .kha-pop-cat-4, .kha-pop-cat-5,
              .kha-pop-find-1, .kha-pop-find-2, .kha-pop-find-3,
              .kha-phase-input, .kha-phase-scan, .kha-phase-results, .kha-dot, .kha-status-1, .kha-status-2, .kha-status-3 {
                animation: none !important;
              }
              .kha-phase-input, .kha-phase-scan { opacity: 0; }
              .kha-phase-results, .kha-pop, .kha-pop-overall,
              .kha-pop-cat-1, .kha-pop-cat-2, .kha-pop-cat-3, .kha-pop-cat-4, .kha-pop-cat-5,
              .kha-pop-find-1, .kha-pop-find-2, .kha-pop-find-3 { opacity: 1; transform: none; }
              .kha-status-3 { opacity: 1; }
              .kha-dot { background: #10b981 !important; }
              .kha-progress { width: 100%; }
            }
