/* =========================================================
   LIVE DEMO FRAMEWORK

   Reusable styles for all interactive portfolio demos.

   Structure:
   1. Demo hero
   2. Demo status
   3. Workspace
   4. Form
   5. Timeline
   6. Result
   7. Business explanation
   8. Responsive behavior
   ========================================================= */


/* =========================================================
   1. DEMO HERO
   ========================================================= */

.live-demo-hero {
    padding-block:
        clamp(
            54px,
            5vw,
            78px
        )
        clamp(
            42px,
            4vw,
            60px
        );
}

.live-demo-hero-grid {
    display: grid;

    grid-template-columns:
        minmax(
            0,
            1.25fr
        )
        minmax(
            280px,
            0.6fr
        );

    align-items: end;

    gap:
        clamp(
            28px,
            4vw,
            54px
        );
}

.live-demo-hero h1 {
    max-width: 820px;

    margin-bottom: 20px;

    font-size:
        clamp(
            2.45rem,
            3.8vw,
            4rem
        );
}

.live-demo-hero-copy {
    max-width: 720px;

    margin-bottom: 0;

    color:
        var(--color-text-muted);

    font-size:
        clamp(
            1rem,
            0.25vw + 0.95rem,
            1.1rem
        );

    line-height: 1.75;
}

.demo-live-card {
    padding: 22px;

    background:
        linear-gradient(
            180deg,
            rgba(
                17,
                32,
                53,
                0.9
            ),
            rgba(
                11,
                24,
                42,
                0.82
            )
        );

    border:
        1px solid
        var(--color-border);

    border-radius:
        var(--radius-medium);
}

.demo-live-status {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 12px;

    color:
        #c9f7e8;

    font-size: 0.88rem;
    font-weight: 800;
}

.demo-live-status-dot {
    width: 9px;
    height: 9px;

    flex-shrink: 0;

    background:
        var(--color-success);

    border-radius: 50%;

    box-shadow:
        0 0 0 6px
        rgba(
            71,
            227,
            176,
            0.08
        );
}

.demo-live-card p {
    margin-bottom: 0;

    color:
        var(--color-text-muted);

    font-size: 0.9rem;
}


/* =========================================================
   2. DEMO STATUS MESSAGE
   ========================================================= */

.demo-status-message {
    min-height: 44px;

    margin-top: 18px;

    padding:
        11px 13px;

    color:
        var(--color-text-muted);

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );

    border:
        1px solid
        var(--color-border);

    border-radius: 10px;

    font-size: 0.88rem;
}

.demo-status-success {
    color:
        #bff4e2;

    border-color:
        rgba(
            71,
            227,
            176,
            0.22
        );

    background:
        rgba(
            71,
            227,
            176,
            0.055
        );
}

.demo-status-error {
    color:
        #ffc2c2;

    border-color:
        rgba(
            255,
            139,
            139,
            0.25
        );

    background:
        rgba(
            255,
            139,
            139,
            0.055
        );
}

.demo-status-running {
    color:
        #c7dcff;

    border-color:
        rgba(
            117,
            168,
            255,
            0.24
        );

    background:
        rgba(
            117,
            168,
            255,
            0.055
        );
}


/* =========================================================
   3. DEMO WORKSPACE
   ========================================================= */

.live-demo-section {
    padding-block:
        clamp(
            50px,
            5vw,
            76px
        );
}

.live-demo-workspace {
    display: grid;

    grid-template-columns:
        minmax(
            0,
            1fr
        )
        minmax(
            0,
            0.9fr
        );

    gap: 22px;

    align-items: start;
}

.live-demo-panel {
    padding:
        clamp(
            22px,
            2vw,
            30px
        );

    background:
        linear-gradient(
            180deg,
            rgba(
                17,
                32,
                53,
                0.9
            ),
            rgba(
                11,
                24,
                42,
                0.84
            )
        );

    border:
        1px solid
        var(--color-border);

    border-radius:
        var(--radius-large);

    box-shadow:
        0 20px 55px
        rgba(
            0,
            0,
            0,
            0.15
        );
}

.live-demo-panel-heading {
    margin-bottom: 24px;
}

.live-demo-panel-heading p {
    margin-bottom: 0;

    color:
        var(--color-text-muted);
}


/* =========================================================
   4. DEMO FORM
   ========================================================= */

.demo-form-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 18px;
}

.demo-form-field {
    margin-bottom: 18px;
}

.demo-form-field-full {
    grid-column:
        1 / -1;
}

.demo-form-field label {
    display: block;

    margin-bottom: 8px;

    color:
        #dbe7f5;

    font-size: 0.88rem;
    font-weight: 750;
}

.demo-form-field input,
.demo-form-field select,
.demo-form-field textarea {
    width: 100%;

    min-height: 46px;

    padding:
        12px 13px;

    color:
        var(--color-text);

    background:
        #091525;

    border:
        1px solid
        var(--color-border);

    border-radius:
        var(--radius-small);

    outline: none;

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.demo-form-field textarea {
    min-height: 128px;

    resize: vertical;
}

.demo-form-field input:focus,
.demo-form-field select:focus,
.demo-form-field textarea:focus {
    border-color:
        var(--color-primary);

    box-shadow:
        0 0 0 4px
        var(--color-focus);
}

.demo-form-field input[aria-invalid="true"],
.demo-form-field select[aria-invalid="true"],
.demo-form-field textarea[aria-invalid="true"] {
    border-color:
        var(--color-danger);
}

.demo-field-help {
    margin:
        7px 0 0;

    color:
        var(--color-text-muted);

    font-size: 0.78rem;
}

.demo-field-error {
    min-height: 18px;

    margin:
        6px 0 0;

    color:
        #ffaaaa;

    font-size: 0.78rem;
}

.demo-form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 6px;
}

.demo-form-actions .button {
    min-width: 170px;
}

.button[disabled] {
    cursor: wait;

    opacity: 0.7;

    transform: none;
}


/* =========================================================
   5. TIMELINE
   ========================================================= */

.demo-timeline {
    display: grid;

    gap: 0;

    margin: 0;

    padding: 0;

    list-style: none;
}

.demo-timeline-item {
    position: relative;

    display: grid;

    grid-template-columns:
        26px
        minmax(
            0,
            1fr
        );

    gap: 12px;

    padding-bottom: 20px;
}

.demo-timeline-item:not(:last-child)::after {
    position: absolute;
    top: 18px;
    bottom: -2px;
    left: 7px;

    width: 1px;

    content: "";

    background:
        var(--color-border);
}

.demo-timeline-marker {
    position: relative;
    z-index: 2;

    display: block;

    width: 15px;
    height: 15px;

    margin-top: 3px;

    background:
        #13243b;

    border:
        2px solid
        #38506b;

    border-radius: 50%;
}

.demo-timeline-completed
.demo-timeline-marker {
    background:
        var(--color-success);

    border-color:
        var(--color-success);

    box-shadow:
        0 0 0 5px
        rgba(
            71,
            227,
            176,
            0.07
        );
}

.demo-timeline-active
.demo-timeline-marker {
    background:
        var(--color-primary);

    border-color:
        var(--color-primary);

    box-shadow:
        0 0 0 5px
        rgba(
            117,
            168,
            255,
            0.08
        );

    animation:
        demoPulse
        1.4s ease-in-out
        infinite;
}

.demo-timeline-failed
.demo-timeline-marker {
    background:
        var(--color-danger);

    border-color:
        var(--color-danger);
}

.demo-timeline-content {
    display: grid;

    gap: 3px;
}

.demo-timeline-title {
    color:
        #e7eff8;

    font-size: 0.9rem;
    font-weight: 750;
}

.demo-timeline-state {
    color:
        var(--color-text-muted);

    font-size: 0.76rem;
}

@keyframes demoPulse {
    0%,
    100% {
        transform:
            scale(1);

        box-shadow:
            0 0 0 5px
            rgba(
                117,
                168,
                255,
                0.08
            );
    }

    50% {
        transform:
            scale(1.08);

        box-shadow:
            0 0 0 9px
            rgba(
                117,
                168,
                255,
                0.025
            );
    }
}


/* =========================================================
   6. RESULT
   ========================================================= */

.demo-execution-meta {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 12px;

    margin-top: 22px;
}

.demo-meta-card {
    padding: 13px;

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );

    border:
        1px solid
        var(--color-border);

    border-radius: 11px;
}

.demo-meta-label {
    display: block;

    margin-bottom: 4px;

    color:
        var(--color-text-muted);

    font-size: 0.72rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.demo-meta-value {
    color:
        var(--color-text);

    font-size: 0.9rem;
}

.demo-result-panel {
    margin-top: 22px;

    padding-top: 22px;

    border-top:
        1px solid
        var(--color-border);
}

.demo-result-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 12px;
}

.demo-result-item {
    padding: 14px;

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );

    border:
        1px solid
        var(--color-border);

    border-radius: 11px;
}

.demo-result-label {
    display: block;

    margin-bottom: 5px;

    color:
        var(--color-text-muted);

    font-size: 0.76rem;
}

.demo-result-value {
    display: block;

    color:
        #eaf3fc;

    font-size: 0.98rem;
}

.demo-result-empty {
    margin-bottom: 0;

    color:
        var(--color-text-muted);
}


/* =========================================================
   7. EXPLANATION
   ========================================================= */

.demo-explanation-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(
                0,
                1fr
            )
        );

    gap: 18px;
}

.demo-explanation-card {
    padding: 24px;

    background:
        rgba(
            255,
            255,
            255,
            0.022
        );

    border:
        1px solid
        var(--color-border);

    border-radius:
        var(--radius-medium);
}

.demo-explanation-card h3 {
    margin-bottom: 10px;
}

.demo-explanation-card p {
    margin-bottom: 0;

    color:
        var(--color-text-muted);
}


/* =========================================================
   8. RESPONSIVE
   ========================================================= */

@media (max-width: 920px) {
    .live-demo-hero-grid,
    .live-demo-workspace {
        grid-template-columns:
            1fr;
    }

    .demo-live-card {
        max-width: 560px;
    }

    .demo-explanation-grid {
        grid-template-columns:
            1fr;
    }
}

@media (max-width: 620px) {
    .demo-form-grid,
    .demo-result-grid,
    .demo-execution-meta {
        grid-template-columns:
            1fr;
    }

    .demo-form-field-full {
        grid-column:
            auto;
    }

    .demo-form-actions {
        display: grid;
    }

    .demo-form-actions .button {
        width: 100%;
    }

    .live-demo-panel {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .demo-timeline-active
    .demo-timeline-marker {
        animation: none;
    }
}

/* =========================================================
   COMPLETE DEMO PAGE EXTENSIONS
   ========================================================= */

.demo-pending-dot {
    width: 9px;
    height: 9px;

    flex-shrink: 0;

    background: #f4c86a;

    border-radius: 50%;

    box-shadow:
        0 0 0 6px
        rgba(
            244,
            200,
            106,
            0.07
        );
}

.demo-live-dot {
    width: 9px;
    height: 9px;

    flex-shrink: 0;

    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(200, 255, 47, 0.08);
}

.demo-hero-tags {
    margin-top: 20px;
}

.demo-result-preview {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 10px;

    margin-top: 20px;

    padding-top: 20px;

    border-top:
        1px solid
        var(--color-border);
}

.demo-result-preview-title {
    grid-column:
        1 / -1;

    margin-bottom: 0;

    color:
        var(--color-text-muted);

    font-size: 0.8rem;
    font-weight: 750;
}

.demo-result-preview-item {
    padding: 12px;

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );

    border:
        1px solid
        var(--color-border);

    border-radius: 10px;
}

.demo-result-preview-item span {
    display: block;

    margin-bottom: 4px;

    color:
        var(--color-text-muted);

    font-size: 0.72rem;
}

.demo-result-preview-item strong {
    color:
        var(--color-text);

    font-size: 0.82rem;
}

@media (max-width: 620px) {
    .demo-result-preview {
        grid-template-columns:
            1fr;
    }

    .demo-result-preview-title {
        grid-column:
            auto;
    }
}


/* =========================================================
   LIVE EXPERIENCE UPGRADE — AUG 2026
   Makes the live automations visibly behave like server-side
   business workflows rather than static form/result demos.
   ========================================================= */

[data-demo-state="running"] .live-demo-panel:last-child {
    border-color: rgba(117, 168, 255, 0.32);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(117, 168, 255, 0.05);
}

[data-demo-state="completed"] .live-demo-panel:last-child {
    border-color: rgba(71, 227, 176, 0.26);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(71, 227, 176, 0.04);
}

.demo-timeline-state {
    max-width: 520px;
    line-height: 1.55;
    font-size: 0.8rem;
}

.demo-timeline-active .demo-timeline-title {
    color: #ffffff;
}

.demo-timeline-active .demo-timeline-state {
    color: #bdd5fb;
}

.demo-timeline-completed .demo-timeline-state {
    color: #9ebbd9;
}

.demo-timeline-completed:not(:last-child)::after {
    background: linear-gradient(180deg, rgba(71, 227, 176, 0.65), rgba(71, 227, 176, 0.14));
}

.demo-timeline-active:not(:last-child)::after {
    background: linear-gradient(180deg, rgba(117, 168, 255, 0.65), var(--color-border));
}

.demo-execution-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.demo-meta-card {
    position: relative;
    overflow: hidden;
}

.demo-meta-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    content: "";
    background: rgba(117, 168, 255, 0.4);
}

.demo-meta-card-verified::before {
    background: var(--color-success);
}

.demo-meta-verified {
    color: #bff4e2;
}

.demo-proof-details {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.demo-proof-details summary {
    cursor: pointer;
    color: #dcecff;
    font-size: 0.86rem;
    font-weight: 800;
}

.demo-proof-body {
    padding-top: 12px;
    color: var(--color-text-muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

.demo-proof-body p {
    margin-bottom: 10px;
}

.demo-proof-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.demo-proof-path span {
    padding: 6px 9px;
    background: rgba(117, 168, 255, 0.055);
    border: 1px solid rgba(117, 168, 255, 0.17);
    border-radius: 999px;
    color: #d8e8fb;
    font-size: 0.76rem;
    font-weight: 700;
}

.demo-proof-path b {
    color: #6684a5;
    font-weight: 500;
}

.demo-proof-note {
    margin-bottom: 0 !important;
    color: #8faac7;
}

.demo-completed-summary {
    padding: clamp(22px, 3vw, 34px);
    background: linear-gradient(180deg, rgba(71, 227, 176, 0.07), rgba(117, 168, 255, 0.035));
    border: 1px solid rgba(71, 227, 176, 0.2);
    border-radius: 16px;
}

.demo-completed-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin-bottom: 18px;
    color: #06271d;
    background: var(--color-success);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 900;
    box-shadow: 0 0 0 8px rgba(71, 227, 176, 0.07);
}

.demo-completed-summary h3 {
    margin: 5px 0 10px;
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

.demo-completed-copy {
    margin-bottom: 18px;
    color: var(--color-text-muted);
}

.demo-input-snapshot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.demo-input-chip {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    background: rgba(5, 17, 31, 0.48);
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.demo-input-chip small {
    color: #7795b5;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.demo-input-chip strong {
    overflow-wrap: anywhere;
    color: #eef7ff;
    font-size: 0.84rem;
}

.demo-business-impact {
    margin-top: 22px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(117, 168, 255, 0.06), rgba(71, 227, 176, 0.045));
    border: 1px solid rgba(117, 168, 255, 0.15);
    border-radius: 14px;
}

.demo-impact-kicker {
    display: block;
    margin-bottom: 7px;
    color: #77aef5;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.demo-impact-heading h3 {
    margin-bottom: 8px;
    font-size: 1.18rem;
}

.demo-impact-heading p {
    margin-bottom: 16px;
    color: #b6c9dc;
    line-height: 1.6;
}

.demo-impact-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.demo-impact-list li {
    position: relative;
    padding-left: 28px;
    color: #d6e3f0;
    font-size: 0.86rem;
    line-height: 1.55;
}

.demo-impact-list li::before {
    position: absolute;
    top: 1px;
    left: 0;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    content: "✓";
    color: #06271d;
    background: var(--color-success);
    border-radius: 50%;
    font-size: 0.68rem;
    font-weight: 900;
}

[data-demo-state="completed"] .demo-status-message {
    margin-top: 0;
}

[data-demo-state="completed"] .demo-result-panel {
    border-top: 0;
    padding-top: 0;
}

@media (max-width: 720px) {
    .demo-execution-meta,
    .demo-input-snapshot {
        grid-template-columns: 1fr;
    }

    .demo-proof-path b {
        display: none;
    }

    .demo-proof-path {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: no-preference) {
    [data-demo-state="running"] .demo-timeline-active .demo-timeline-marker::after {
        position: absolute;
        inset: -7px;
        content: "";
        border: 1px solid rgba(117, 168, 255, 0.42);
        border-radius: 50%;
        animation: liveFlowRing 1.1s ease-out infinite;
    }

    @keyframes liveFlowRing {
        0% { transform: scale(0.7); opacity: 0.9; }
        100% { transform: scale(1.45); opacity: 0; }
    }
}


/* Keep the idle panel focused on real request status, not prefilled-looking outputs. */
.demo-result-preview {
    display: none !important;
}


.demo-work-shift {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    margin: 16px 0 18px;
}

.demo-work-shift > div:not(.demo-work-shift-arrow) {
    display: grid;
    gap: 6px;
    padding: 13px;
    background: rgba(5, 17, 31, 0.48);
    border: 1px solid var(--color-border);
    border-radius: 11px;
}

.demo-work-shift span {
    color: #7896b6;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.06em;
}

.demo-work-shift strong {
    color: #dce9f6;
    font-size: 0.78rem;
    line-height: 1.5;
}

.demo-work-shift .demo-work-shift-auto {
    border-color: rgba(71, 227, 176, 0.18);
    background: rgba(71, 227, 176, 0.04);
}

.demo-work-shift .demo-work-shift-auto span {
    color: #71d8b5;
}

.demo-work-shift-arrow {
    display: grid;
    place-items: center;
    color: #6f8cac;
    font-size: 1.05rem;
}

[data-demo-state="completed"] .live-demo-workspace > .live-demo-panel:first-child .live-demo-panel-heading {
    display: none;
}

@media (max-width: 720px) {
    .demo-work-shift {
        grid-template-columns: 1fr;
    }

    .demo-work-shift-arrow {
        transform: rotate(90deg);
    }
}


/* =========================================================
   BUSINESS-VALUE HERO + LIVE STATUS UPGRADE — AUG 2026
   ========================================================= */

.demo-hero-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.demo-hero-benefit {
    position: relative;
    padding: 7px 11px 7px 28px;
    color: #dcecff;
    background: rgba(71, 227, 176, 0.045);
    border: 1px solid rgba(71, 227, 176, 0.15);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
}

.demo-hero-benefit::before {
    position: absolute;
    top: 50%;
    left: 10px;
    display: grid;
    width: 13px;
    height: 13px;
    place-items: center;
    content: "✓";
    color: #06271d;
    background: var(--color-success);
    border-radius: 50%;
    font-size: 0.55rem;
    font-weight: 950;
    transform: translateY(-50%);
}

.demo-live-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(71, 227, 176, 0.18);
}

.demo-live-card::after {
    position: absolute;
    top: -55px;
    right: -55px;
    width: 130px;
    height: 130px;
    content: "";
    pointer-events: none;
    background: radial-gradient(circle, rgba(71, 227, 176, 0.10), transparent 67%);
}

.demo-live-dot {
    position: relative;
    width: 10px;
    height: 10px;
    background: var(--color-success);
    box-shadow: 0 0 0 0 rgba(71, 227, 176, 0.55);
    animation: demo-live-status-pulse 1.8s ease-out infinite;
}

.demo-live-status {
    color: #c8f8e8;
}

.demo-live-audience {
    margin-bottom: 10px !important;
    color: #e4f2ff !important;
    font-size: 0.82rem !important;
    line-height: 1.5;
}

.demo-live-audience strong {
    color: #75a8ff;
}

@keyframes demo-live-status-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(71, 227, 176, 0.55);
        transform: scale(0.92);
    }
    55% {
        box-shadow: 0 0 0 8px rgba(71, 227, 176, 0);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(71, 227, 176, 0);
        transform: scale(0.92);
    }
}

@media (prefers-reduced-motion: reduce) {
    .demo-live-dot {
        animation: none;
        box-shadow: 0 0 0 5px rgba(71, 227, 176, 0.09);
    }
}

/* =========================================================
   16-WORKFLOW UX ENHANCEMENTS
   ========================================================= */
.demo-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 44px;
    padding-inline: 13px;
    margin-right: 10px;
    vertical-align: 0.08em;
    color: #9af8ee;
    background: linear-gradient(135deg, rgba(73, 225, 208, 0.14), rgba(117, 168, 255, 0.09));
    border: 1px solid rgba(73, 225, 208, 0.36);
    box-shadow: 0 8px 24px rgba(7, 17, 31, 0.18), inset 0 0 0 1px rgba(255,255,255,0.025);
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0.045em;
}

.demo-suggestion-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.demo-suggestion-chip {
    appearance: none;
    padding: 7px 10px;
    color: #bcd4ec;
    background: rgba(117, 168, 255, 0.06);
    border: 1px solid rgba(117, 168, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.demo-suggestion-chip:hover,
.demo-suggestion-chip:focus-visible {
    color: #ffffff;
    background: rgba(73, 225, 208, 0.08);
    border-color: rgba(73, 225, 208, 0.38);
    outline: none;
}

.demo-checkbox-label {
    display: flex !important;
    gap: 11px;
    align-items: flex-start;
    padding: 13px 14px;
    color: #c8d7e7 !important;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    line-height: 1.55;
    cursor: pointer;
}

.demo-checkbox-label input {
    width: 18px !important;
    min-height: 18px !important;
    height: 18px;
    margin-top: 2px;
    accent-color: #49e1d0;
}

.voice-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.voice-browser-status {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.voice-listening {
    border-color: rgba(255, 125, 125, 0.5) !important;
    box-shadow: 0 0 0 4px rgba(255, 125, 125, 0.08);
}

.voice-conversation {
    padding: 17px;
    background: rgba(73, 225, 208, 0.035);
    border: 1px solid rgba(73, 225, 208, 0.16);
    border-radius: 12px;
}

.voice-conversation p:last-child { margin-bottom: 0; }
.voice-ai-question {
    margin-top: 10px;
    padding: 14px 16px;
    color: #f7fbff;
    background: #0b1c2e;
    border-left: 4px solid #49e1d0;
    border-radius: 10px;
    font-weight: 750;
    line-height: 1.55;
}

.voice-state-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.voice-state-chip,
.demo-input-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--color-border);
    border-radius: 9px;
}

.voice-state-chip small,
.demo-input-chip small {
    color: var(--color-text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.voice-state-chip strong,
.demo-input-chip strong {
    color: #e9f5ff;
    font-size: 0.8rem;
}

.demo-result-item-full {
    grid-column: 1 / -1;
}

.demo-result-special {
    padding: 18px;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.demo-result-special h3 {
    margin-bottom: 14px;
    font-size: 1rem;
}

.nested-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.nested-metric-card {
    padding: 12px;
    background: #091525;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px;
    overflow-wrap: anywhere;
}

.nested-metric-card span {
    display: block;
    margin-bottom: 5px;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nested-metric-card strong {
    color: #edf7ff;
    font-size: 0.84rem;
    line-height: 1.45;
}

.object-card-grid,
.source-article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.nested-object-card,
.source-article-card,
.video-scene-card {
    padding: 14px;
    background: #091525;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
}

.nested-object-card > div {
    display: grid;
    gap: 3px;
    padding-block: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nested-object-card > div:last-child { border-bottom: 0; }
.nested-object-card small,
.source-article-card small,
.video-scene-card small {
    color: #85a6c2;
    font-size: 0.7rem;
}

.nested-object-card strong,
.source-article-card strong,
.video-scene-card strong {
    display: block;
    margin-top: 5px;
    color: #eef8ff;
    line-height: 1.45;
}

.source-article-card p,
.video-scene-card p {
    margin: 8px 0 0;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.source-article-card .text-link {
    display: inline-block;
    margin-top: 11px;
}

.lead-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.lead-result-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.lead-result-table th,
.lead-result-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.lead-result-table th {
    color: #90abc4;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lead-result-table td { color: #dceaf7; }
.lead-result-table a { color: #7cc7ff; }

.marketing-asset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.marketing-asset-card {
    display: grid;
    gap: 10px;
    padding: 10px;
    background: #091525;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
}

.marketing-asset-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    background: #07111f;
    border-radius: 8px;
}

.marketing-slide-text {
    min-height: 180px;
    padding: 18px;
    background: linear-gradient(145deg, #0f2439, #091525);
    border-radius: 8px;
}

.marketing-slide-text p { color: var(--color-text-muted); }
.button-small { min-width: 0 !important; padding: 9px 12px; font-size: 0.78rem; }

.video-storyboard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
}

.video-render-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.video-render-output {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.video-render-output video {
    width: min(360px, 100%);
    max-height: 640px;
    background: #000;
    border-radius: 12px;
}

.result-simple-list {
    display: grid;
    gap: 8px;
    padding-left: 20px;
    color: #dceaf7;
}

.inline-array {
    display: grid;
    gap: 7px;
    margin-top: 8px;
}

.inline-array-row {
    padding: 9px 10px;
    color: #dbe8f5;
    background: #091525;
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.review-rating-box {
    margin-top: 22px;
    padding: 20px;
    background: rgba(73,225,208,0.04);
    border: 1px solid rgba(73,225,208,0.18);
    border-radius: 14px;
}

.review-stars {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.review-star-button {
    padding: 10px 13px;
    color: #f7e7a3;
    background: #0a1828;
    border: 1px solid rgba(247,231,163,0.2);
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.review-star-button:hover,
.review-star-button:focus-visible {
    border-color: rgba(247,231,163,0.55);
    outline: none;
}

.review-rating-saved { border-color: rgba(73,225,208,0.4); }

.demo-completed-summary {
    margin-top: 18px;
    padding: 20px;
    background: rgba(73,225,208,0.035);
    border: 1px solid rgba(73,225,208,0.17);
    border-radius: 14px;
}

.demo-completed-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    color: #071426;
    background: #49e1d0;
    border-radius: 50%;
    font-weight: 900;
}

.demo-input-snapshot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

@media (max-width: 720px) {
    .nested-metric-grid,
    .object-card-grid,
    .source-article-grid,
    .marketing-asset-grid,
    .video-storyboard {
        grid-template-columns: 1fr;
    }

    .demo-number {
        min-width: 50px;
        height: 38px;
        padding-inline: 11px;
        margin-right: 8px;
        font-size: 0.9rem;
    }
}

/* =========================================================
   FINAL PORTFOLIO RESPONSIVE + VOICE UX HARDENING
   Audited across the 16 live automation interfaces.
   ========================================================= */

html,
body {
    max-width: 100%;
    overflow-x: clip;
}

.live-demo-hero-grid,
.live-demo-workspace,
.live-demo-panel,
.demo-form-grid,
.demo-result-grid,
.demo-execution-meta,
.demo-result-special,
.demo-business-impact {
    min-width: 0;
}

.live-demo-panel,
.demo-result-item,
.demo-meta-card,
.demo-result-special,
.demo-business-impact,
.voice-conversation,
.demo-checkbox-label,
.demo-suggestion-chip {
    overflow-wrap: anywhere;
}

.demo-form-field input,
.demo-form-field select,
.demo-form-field textarea,
.demo-form-actions .button,
.demo-suggestion-chip,
.review-star-button,
.voice-mic-button {
    box-sizing: border-box;
}

.demo-form-field input,
.demo-form-field select,
.demo-form-field textarea {
    min-height: 48px;
    line-height: 1.4;
}

.demo-form-field select {
    padding-right: 38px;
}

.demo-suggestion-row {
    align-items: stretch;
}

.demo-suggestion-chip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    color: #cfe4f8;
    background-color: rgba(117, 168, 255, 0.075);
    border: 1px solid rgba(117, 168, 255, 0.24);
    border-radius: 999px;
    -webkit-appearance: none;
    appearance: none;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
}

.demo-suggestion-chip:active {
    transform: translateY(1px);
}

.demo-checkbox-label {
    position: relative;
    align-items: flex-start;
}

.demo-checkbox-label input[type="checkbox"] {
    flex: 0 0 20px;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    margin: 1px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    accent-color: #49e1d0;
    -webkit-appearance: checkbox;
    appearance: checkbox;
}

.demo-checkbox-label span {
    min-width: 0;
    flex: 1 1 auto;
}

.voice-input-block textarea {
    min-height: 142px;
}

.voice-controls {
    align-items: flex-start;
}

.voice-mic-button {
    position: relative;
    flex: 0 0 auto;
    min-width: 170px;
    min-height: 48px;
    gap: 8px;
}

.voice-mic-button::before {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    content: "●";
    color: #49e1d0;
    font-size: 0.7rem;
    border: 1px solid rgba(73, 225, 208, 0.38);
    border-radius: 50%;
}

.voice-mic-button.voice-listening::before {
    content: "■";
    color: #ff9d9d;
    border-color: rgba(255, 157, 157, 0.52);
}

.voice-browser-status {
    display: block;
    flex: 1 1 240px;
    min-width: 0;
    padding: 10px 12px;
    color: #9fb7cf;
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.5;
}

.voice-browser-status[data-voice-tone="ready"],
.voice-browser-status[data-voice-tone="success"] {
    color: #bff4e2;
    border-color: rgba(71, 227, 176, 0.18);
    background: rgba(71, 227, 176, 0.045);
}

.voice-browser-status[data-voice-tone="listening"] {
    color: #e5efff;
    border-color: rgba(117, 168, 255, 0.28);
    background: rgba(117, 168, 255, 0.07);
}

.voice-browser-status[data-voice-tone="warning"] {
    color: #ffe3a3;
    border-color: rgba(244, 200, 106, 0.25);
    background: rgba(244, 200, 106, 0.055);
}

.voice-browser-status[data-voice-tone="error"] {
    color: #ffc2c2;
    border-color: rgba(255, 139, 139, 0.25);
    background: rgba(255, 139, 139, 0.055);
}

.voice-privacy-note {
    margin-top: 9px;
}

.voice-conversation h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.voice-state-chip,
.demo-input-chip {
    max-width: 100%;
}

.voice-state-chip strong,
.demo-input-chip strong {
    overflow-wrap: anywhere;
}

.lead-table-wrap {
    max-width: 100%;
    border-radius: 10px;
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
}

.lead-result-table td,
.lead-result-table th {
    overflow-wrap: anywhere;
}

.source-article-card a,
.demo-result-value a,
.nested-object-card a {
    overflow-wrap: anywhere;
}

.demo-form-actions .button,
.review-star-button {
    min-height: 48px;
}

@media (max-width: 1080px) {
    .live-demo-hero-grid,
    .live-demo-workspace {
        grid-template-columns: 1fr;
    }

    .demo-live-card {
        width: 100%;
        max-width: none;
    }

    .live-demo-workspace {
        gap: 18px;
    }

    .live-demo-panel:last-child {
        order: 2;
    }
}

@media (max-width: 820px) {
    .live-demo-hero {
        padding-block: 42px 30px;
    }

    .live-demo-section {
        padding-block: 34px 48px;
    }

    .live-demo-hero h1 {
        font-size: clamp(2rem, 8vw, 2.85rem);
        line-height: 1.08;
    }

    .live-demo-hero-copy {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .demo-hero-benefits,
    .demo-tags {
        gap: 7px;
    }

    .demo-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .demo-form-field-full {
        grid-column: auto;
    }

    .demo-result-grid,
    .demo-execution-meta,
    .nested-metric-grid,
    .object-card-grid,
    .source-article-grid,
    .marketing-asset-grid,
    .video-storyboard,
    .demo-input-snapshot {
        grid-template-columns: 1fr;
    }

    .demo-form-field input,
    .demo-form-field select,
    .demo-form-field textarea {
        font-size: 16px; /* prevents iOS form zoom */
    }

    .demo-suggestion-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .demo-suggestion-chip {
        width: 100%;
        border-radius: 10px;
    }

    .demo-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .demo-form-actions .button {
        width: 100%;
        min-width: 0;
    }

    .voice-controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    .voice-mic-button,
    .voice-browser-status {
        width: 100%;
        min-width: 0;
    }

    .demo-proof-path {
        grid-template-columns: 1fr;
    }

    .demo-proof-path b {
        display: none;
    }
}

@media (max-width: 620px) {
    .live-demo-panel {
        padding: 17px;
        border-radius: 15px;
    }

    .live-demo-panel-heading {
        margin-bottom: 20px;
    }

    .live-demo-panel-heading h2 {
        font-size: clamp(1.45rem, 7vw, 1.85rem);
    }

    .demo-form-field {
        margin-bottom: 14px;
    }

    .demo-suggestion-row {
        grid-template-columns: 1fr;
    }

    .demo-suggestion-chip {
        min-height: 44px;
        padding: 10px 12px;
    }

    .demo-checkbox-label {
        padding: 12px;
        font-size: 0.88rem;
    }

    .demo-timeline-item {
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 10px;
    }

    .demo-timeline-title {
        font-size: 0.86rem;
    }

    .demo-timeline-state {
        font-size: 0.76rem;
    }

    .demo-meta-card,
    .demo-result-item,
    .demo-result-special,
    .demo-business-impact {
        padding: 12px;
    }

    .demo-hero-benefit,
    .demo-tag {
        font-size: 0.72rem;
    }

    .demo-number {
        min-width: 48px;
        height: 36px;
        margin-right: 7px;
        padding-inline: 10px;
        font-size: 0.86rem;
    }

    /* Convert the lead table to readable stacked cards on phones. */
    .lead-result-table,
    .lead-result-table tbody,
    .lead-result-table tr,
    .lead-result-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .lead-result-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .lead-result-table tr {
        margin-bottom: 12px;
        padding: 12px;
        background: #091525;
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 12px;
    }

    .lead-result-table td {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    }

    .lead-result-table td:last-child {
        border-bottom: 0;
    }

    .lead-result-table td::before {
        content: attr(data-label);
        color: #7896b6;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
}

@media (max-width: 430px) {
    .live-demo-hero {
        padding-block: 34px 24px;
    }

    .live-demo-hero h1 {
        font-size: clamp(1.8rem, 9vw, 2.25rem);
    }

    .live-demo-panel {
        padding: 15px;
    }

    .demo-live-card {
        padding: 16px;
    }

    .demo-hero-benefits,
    .demo-tags {
        display: grid;
        grid-template-columns: 1fr;
    }

    .demo-hero-benefit,
    .demo-tag {
        width: 100%;
    }

    .review-stars {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .review-star-button {
        min-width: 0;
        padding: 10px 6px;
    }

    .lead-result-table td {
        grid-template-columns: 78px minmax(0, 1fr);
    }
}

@media (hover: none) and (pointer: coarse) {
    .demo-suggestion-chip,
    .button,
    .review-star-button,
    .menu-button {
        min-height: 44px;
    }

    .button:hover,
    .demo-suggestion-chip:hover {
        transform: none;
    }
}

/* =========================================================
   WORKFLOW 03 — VOICE BOOKING ASSISTANT
   Voice-first UI: one assistant, one microphone, optional typing.
   ========================================================= */
.voice-booking-form {
    display: grid;
    gap: 22px;
}

.voice-panel-heading {
    margin-bottom: 22px;
}

.voice-step {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(135, 170, 210, 0.16);
    border-radius: 16px;
    background: rgba(255,255,255,0.018);
}

.voice-step-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
}

.voice-step-head h3 {
    margin: 0;
    color: #f7fbff;
    font-size: 1rem;
}

.voice-step-head p {
    margin: 5px 0 0;
    color: #9fb7cf;
    font-size: 0.83rem;
    line-height: 1.5;
}

.voice-step-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #071521;
    background: linear-gradient(135deg, #71b7ff, #49e1d0);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 900;
}

.voice-business-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.voice-business-card {
    appearance: none;
    min-width: 0;
    min-height: 48px;
    padding: 11px 13px;
    color: #d8e9f8;
    background: #0b1b2e;
    border: 1px solid rgba(117, 168, 255, 0.18);
    border-radius: 11px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.voice-business-card:hover,
.voice-business-card:focus-visible {
    color: #fff;
    border-color: rgba(73,225,208,0.45);
    background: rgba(73,225,208,0.06);
    outline: none;
}

.voice-business-card.is-selected {
    color: #fff;
    border-color: #49e1d0;
    background: rgba(73,225,208,0.09);
    box-shadow: inset 3px 0 0 #49e1d0;
}

.voice-assistant-stage {
    padding-bottom: 20px;
}

.voice-assistant-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-width: 0;
    padding: 18px;
    margin-bottom: 14px;
    border: 1px solid rgba(73,225,208,0.18);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(73,225,208,0.055), rgba(117,168,255,0.035));
}

.voice-orb {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #86f8ec 0 7%, #49e1d0 8% 34%, #248a91 65%, #10263a 100%);
    box-shadow: 0 0 0 8px rgba(73,225,208,0.04), 0 12px 35px rgba(0,0,0,0.28);
}

.voice-orb span {
    position: absolute;
    bottom: 17px;
    width: 3px;
    height: 14px;
    background: #06232b;
    border-radius: 999px;
    transform-origin: 50% 100%;
}

.voice-orb span:nth-child(1) { transform: translateX(-8px) scaleY(.55); }
.voice-orb span:nth-child(2) { transform: scaleY(1); }
.voice-orb span:nth-child(3) { transform: translateX(8px) scaleY(.72); }

.voice-orb-thinking span {
    animation: voice-bars 800ms ease-in-out infinite alternate;
}
.voice-orb-thinking span:nth-child(2) { animation-delay: 120ms; }
.voice-orb-thinking span:nth-child(3) { animation-delay: 240ms; }

@keyframes voice-bars {
    from { transform: translateX(var(--x, 0)) scaleY(.45); }
    to { transform: translateX(var(--x, 0)) scaleY(1); }
}

.voice-assistant-copy {
    min-width: 0;
}

.voice-assistant-copy .card-label {
    margin-bottom: 4px;
}

.voice-assistant-copy h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.05rem;
}

.voice-assistant-copy p {
    margin: 0;
    color: #b4cbe0;
    font-size: 0.86rem;
    line-height: 1.55;
}

.voice-assistant-copy .voice-ai-question {
    margin-top: 8px;
}

.voice-main-button {
    width: 100%;
    min-height: 56px;
    justify-content: center;
    gap: 10px;
    font-size: 0.98rem;
}

.voice-main-button[disabled] {
    opacity: .48;
    cursor: not-allowed;
}

.voice-main-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: #052b34;
    background: #fff;
    border-radius: 50%;
    font-size: .62rem;
}

.voice-main-button.voice-listening {
    border-color: #ff8585 !important;
    background: linear-gradient(135deg, #ff8a8a, #ffb15e) !important;
    box-shadow: 0 0 0 5px rgba(255, 127, 127, 0.10);
}

.voice-main-button.voice-listening .voice-main-icon {
    color: #6f0d0d;
}

.voice-browser-status {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    text-align: center;
}

.voice-live-transcript {
    margin: 10px 0 0;
    padding: 12px 14px;
    color: #e9f5ff;
    background: rgba(117,168,255,.06);
    border: 1px solid rgba(117,168,255,.20);
    border-radius: 10px;
    font-size: .86rem;
    line-height: 1.55;
}

.voice-type-toggle {
    appearance: none;
    display: block;
    margin: 12px auto 0;
    padding: 6px 4px;
    color: #9fc8f3;
    background: transparent;
    border: 0;
    font: inherit;
    font-size: .8rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.voice-type-toggle:hover,
.voice-type-toggle:focus-visible {
    color: #fff;
    outline: none;
}

.voice-type-panel {
    margin-top: 12px;
    padding: 14px;
    background: rgba(255,255,255,.018);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
}

.voice-type-panel label {
    display: block;
    margin-bottom: 8px;
    color: #eef6ff;
    font-size: .82rem;
    font-weight: 750;
}

.voice-type-panel textarea {
    width: 100%;
    min-height: 100px;
    margin-bottom: 10px;
}

.voice-hidden-submit {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.voice-reset-button {
    width: 100%;
}

.voice-demo-status {
    margin-top: 0;
}

@media (max-width: 760px) {
    .voice-business-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .voice-step {
        padding: 15px;
    }

    .voice-assistant-card {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 13px;
        padding: 15px;
    }

    .voice-orb {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 520px) {
    .voice-booking-form {
        gap: 16px;
    }

    .voice-step {
        padding: 13px;
        border-radius: 13px;
    }

    .voice-step-head {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 10px;
    }

    .voice-step-number {
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }

    .voice-business-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .voice-business-card {
        min-height: 46px;
        text-align: center;
    }

    .voice-assistant-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .voice-orb {
        margin: 0 auto;
    }

    .voice-main-button {
        min-height: 54px;
    }

    .voice-type-panel {
        padding: 12px;
    }
}

/* Consistent consent control across all live automations. */
.demo-checkbox-label input[type="checkbox"] {
    position: relative;
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(159, 199, 238, .48) !important;
    border-radius: 5px !important;
    background: #071729 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    cursor: pointer;
}
.demo-checkbox-label input[type="checkbox"]:checked {
    border-color: #49e1d0 !important;
    background: #49e1d0 !important;
}
.demo-checkbox-label input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #06232b;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}
.demo-checkbox-label input[type="checkbox"]:focus-visible {
    outline: 2px solid #8bc5ff;
    outline-offset: 3px;
}

/* Author styles must never override the native hidden state. */
[hidden] { display: none !important; }

/* 2026-08-20 r6: synchronized live-automation UI bundle. */

/* =========================================================
   VOICE ASSISTANT — HANDS-FREE TWO-WAY CONVERSATION STATES
   ========================================================= */
.voice-orb span:nth-child(1) {
    --voice-x: -8px;
    transform: translateX(var(--voice-x)) scaleY(.55);
}

.voice-orb span:nth-child(2) {
    --voice-x: 0px;
    transform: translateX(var(--voice-x)) scaleY(1);
}

.voice-orb span:nth-child(3) {
    --voice-x: 8px;
    transform: translateX(var(--voice-x)) scaleY(.72);
}

.voice-orb-thinking span,
.voice-orb-speaking span,
.voice-orb-listening span {
    animation: voice-two-way-bars 720ms ease-in-out infinite alternate;
}

.voice-orb-thinking span:nth-child(2),
.voice-orb-speaking span:nth-child(2),
.voice-orb-listening span:nth-child(2) {
    animation-delay: 110ms;
}

.voice-orb-thinking span:nth-child(3),
.voice-orb-speaking span:nth-child(3),
.voice-orb-listening span:nth-child(3) {
    animation-delay: 220ms;
}

.voice-orb-speaking {
    box-shadow: 0 0 0 8px rgba(73,225,208,.07), 0 0 30px rgba(73,225,208,.22), 0 12px 35px rgba(0,0,0,.28);
}

.voice-orb-listening {
    box-shadow: 0 0 0 8px rgba(113,183,255,.08), 0 0 34px rgba(113,183,255,.24), 0 12px 35px rgba(0,0,0,.28);
}

@keyframes voice-two-way-bars {
    from { transform: translateX(var(--voice-x)) scaleY(.42); }
    to { transform: translateX(var(--voice-x)) scaleY(1); }
}

.voice-main-button.voice-ai-speaking {
    cursor: default;
    border-color: rgba(73,225,208,.42) !important;
    background: linear-gradient(135deg, rgba(28,126,136,.92), rgba(31,93,145,.92)) !important;
    box-shadow: 0 0 0 5px rgba(73,225,208,.08);
}

.voice-main-button.voice-ai-speaking .voice-main-icon {
    animation: voice-speaking-pulse 900ms ease-in-out infinite alternate;
}

@keyframes voice-speaking-pulse {
    from { transform: scale(.82); opacity: .65; }
    to { transform: scale(1.08); opacity: 1; }
}

.voice-browser-status[data-voice-tone="speaking"] {
    color: #d7fff9;
    border-color: rgba(73,225,208,.24);
    background: rgba(73,225,208,.07);
}

@media (prefers-reduced-motion: reduce) {
    .voice-orb-thinking span,
    .voice-orb-speaking span,
    .voice-orb-listening span,
    .voice-main-button.voice-ai-speaking .voice-main-icon {
        animation: none !important;
    }
}

/* 2026-08-20 r8: final voice-control icon and duplicate-status cleanup. */
.voice-main-icon img {
    display: block;
    width: 17px;
    height: 17px;
}


/* Hands-free voice quick choices — 2026-08-20 r9 */
.voice-suggestion-panel {
    margin-top: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(113, 183, 255, .18);
    border-radius: 13px;
    background: rgba(113, 183, 255, .045);
}

.voice-suggestion-title {
    margin: 0 0 9px;
    color: #ddecff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.voice-suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.voice-suggestion-chip {
    appearance: none;
    min-height: 38px;
    padding: 8px 12px;
    color: #eaf7ff;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(113, 183, 255, .24);
    border-radius: 999px;
    font: inherit;
    font-size: .78rem;
    font-weight: 720;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.voice-suggestion-chip:hover,
.voice-suggestion-chip:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(73, 225, 208, .7);
    background: rgba(73, 225, 208, .10);
    outline: none;
}

.voice-suggestion-help {
    margin: 9px 0 0;
    color: #91abc1;
    font-size: .73rem;
    line-height: 1.45;
}

.voice-main-button.voice-listening[disabled],
.voice-main-button.voice-ai-speaking[disabled] {
    opacity: 1;
    cursor: default;
}

.voice-main-button.voice-listening {
    background: linear-gradient(135deg, rgba(30, 126, 154, .96), rgba(39, 168, 145, .96)) !important;
    border-color: rgba(73, 225, 208, .55) !important;
    box-shadow: 0 0 0 5px rgba(73, 225, 208, .08);
}

@media (max-width: 560px) {
    .voice-suggestion-panel {
        padding: 12px;
    }

    .voice-suggestion-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .voice-suggestion-chip {
        width: 100%;
        min-height: 42px;
        padding: 8px 9px;
        border-radius: 10px;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .voice-suggestion-list {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PREMIUM AUTOMATION INDEX — 01 TO 16
   Replaces the inline pill + dash with an integrated title block.
   ========================================================= */
.live-demo-hero .demo-title-heading {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: start;
    gap: clamp(16px, 2vw, 24px);
    max-width: 900px;
    margin-bottom: 22px;
}

.live-demo-hero .demo-title-heading .demo-number {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    min-width: 86px;
    height: 86px;
    margin: 3px 0 0;
    padding: 0;
    overflow: hidden;
    color: #d8fffb;
    background:
        radial-gradient(circle at 24% 20%, rgba(94, 243, 225, 0.19), transparent 42%),
        linear-gradient(145deg, rgba(20, 57, 77, 0.96), rgba(10, 28, 49, 0.98));
    border: 1px solid rgba(89, 235, 219, 0.48);
    border-radius: 18px;
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.22),
        inset 0 0 0 1px rgba(255, 255, 255, 0.035),
        inset 0 -16px 30px rgba(0, 0, 0, 0.08);
    font-size: clamp(1.65rem, 2vw, 2rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.035em;
    text-shadow: 0 0 22px rgba(74, 228, 211, 0.18);
}

.live-demo-hero .demo-title-heading .demo-number::before {
    content: "";
    position: absolute;
    top: 0;
    left: 14px;
    right: 14px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #55e5d5, #7aa7ff);
    box-shadow: 0 0 16px rgba(85, 229, 213, 0.32);
}

.live-demo-hero .demo-title-text {
    display: block;
    min-width: 0;
    padding-top: 0;
}

/* Keep the numbers on the Live Automations listing compact and deliberate. */
.demo-card .demo-number {
    width: 44px;
    min-width: 44px;
    height: 38px;
    margin: 0;
    padding: 0;
    color: #b8fff7;
    background: linear-gradient(145deg, rgba(25, 63, 82, 0.86), rgba(11, 30, 50, 0.92));
    border: 1px solid rgba(73, 225, 208, 0.34);
    border-radius: 11px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025);
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}

@media (max-width: 760px) {
    .live-demo-hero .demo-title-heading {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 13px;
        margin-bottom: 18px;
    }

    .live-demo-hero .demo-title-heading .demo-number {
        width: 62px;
        min-width: 62px;
        height: 62px;
        margin-top: 2px;
        border-radius: 14px;
        font-size: 1.28rem;
    }

    .live-demo-hero .demo-title-heading .demo-number::before {
        left: 10px;
        right: 10px;
        height: 2px;
    }
}

@media (max-width: 460px) {
    .live-demo-hero .demo-title-heading {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 11px;
    }

    .live-demo-hero .demo-title-heading .demo-number {
        width: 54px;
        min-width: 54px;
        height: 54px;
        border-radius: 12px;
        font-size: 1.08rem;
    }
}


/* =========================================================
   FINAL LIVE DEMO CORRECTIONS — 02 / 03 / 07 + RESULT LAYOUT
   ========================================================= */

/* Keep the completed request visible while long proof/results scroll on the right. */
@media (min-width: 901px) {
    [data-demo-state="completed"] .live-demo-workspace > .live-demo-panel:first-child {
        position: sticky;
        top: 86px;
        align-self: start;
        max-height: calc(100vh - 104px);
        overflow: auto;
        scrollbar-width: thin;
    }
}

[data-demo-state="completed"] .live-demo-workspace > .live-demo-panel:first-child {
    border-color: rgba(73,225,208,.20);
}

.voice-stop-button {
    width: 100%;
    margin-top: 10px;
    border-color: rgba(255,135,135,.25);
    color: #ffd2d2;
}

.voice-stop-button:hover,
.voice-stop-button:focus-visible {
    border-color: rgba(255,135,135,.55);
    background: rgba(255,100,100,.07);
}

.voice-email-confirm-panel {
    margin-top: 14px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(117,168,255,.07), rgba(73,225,208,.035));
    border: 1px solid rgba(117,168,255,.25);
    border-radius: 13px;
}

.voice-email-confirm-panel label {
    display: block;
    margin-bottom: 8px;
    color: #f4f9ff;
    font-size: .86rem;
    font-weight: 850;
}

.voice-email-confirm-panel input {
    width: 100%;
    min-height: 48px;
    margin-bottom: 8px;
    padding: 11px 12px;
    color: #f5fbff;
    background: #071525;
    border: 1px solid rgba(117,168,255,.36);
    border-radius: 10px;
    font: inherit;
}

.voice-email-confirm-panel input:focus {
    outline: 2px solid rgba(73,225,208,.32);
    outline-offset: 2px;
    border-color: #49e1d0;
}

.voice-email-confirm-panel .button {
    width: 100%;
    margin-top: 5px;
}

/* Marketing Agent: show actual generated assets, never raw SVG/JSON walls. */
.marketing-asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketing-asset-card {
    overflow: hidden;
    padding: 12px;
    background: linear-gradient(180deg, #091728, #07111f);
}

.marketing-asset-card img {
    display: block;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.06);
}

.video-scene-card {
    min-height: 150px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(117,168,255,.055), rgba(7,17,31,.52));
    border: 1px solid rgba(117,168,255,.15);
    border-radius: 11px;
}

.video-scene-card small { display:block; margin-bottom:6px; color:#79a8d7; font-weight:750; }
.video-scene-card strong { display:block; margin-bottom:6px; color:#f6fbff; }
.video-scene-card p { margin:0; color:#9db6cf; font-size:.82rem; line-height:1.55; }

@media (max-width: 720px) {
    .marketing-asset-grid, .video-storyboard { grid-template-columns: 1fr; }
}

/* =========================================================
   FINAL AUTOMATION NUMBER REFINEMENT — 01 TO 16
   Number stays prominent, but slightly smaller than the H1.
   No oversized card, no pill, no dash.
   ========================================================= */
.live-demo-hero .demo-title-heading {
    display: flex;
    align-items: baseline;
    gap: clamp(12px, 1.45vw, 20px);
    max-width: 940px;
    margin-bottom: 22px;
}

.live-demo-hero .demo-title-heading .demo-number {
    position: static;
    display: inline-block;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    color: #62eadb;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.78em;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.045em;
    text-shadow: 0 0 20px rgba(98, 234, 219, 0.16);
}

.live-demo-hero .demo-title-heading .demo-number::before {
    content: none;
    display: none;
}

.live-demo-hero .demo-title-text {
    display: inline;
    min-width: 0;
    padding-top: 0;
}

@media (max-width: 760px) {
    .live-demo-hero .demo-title-heading {
        display: flex;
        align-items: baseline;
        gap: 11px;
        margin-bottom: 18px;
    }

    .live-demo-hero .demo-title-heading .demo-number {
        width: auto;
        min-width: 0;
        height: auto;
        margin: 0;
        border-radius: 0;
        font-size: 0.78em;
    }
}

@media (max-width: 460px) {
    .live-demo-hero .demo-title-heading {
        gap: 9px;
    }

    .live-demo-hero .demo-title-heading .demo-number {
        width: auto;
        min-width: 0;
        height: auto;
        font-size: 0.76em;
    }
}
