/* AI Code Express — interactive dark IDE product demo */
.bdl-home-landing__demo {
    width: 100%;
    max-width: 100%;
    margin-top: clamp(40px, 6vh, 64px);
    padding: clamp(32px, 5vh, 48px) clamp(20px, 4vw, 48px) 0;
    box-sizing: border-box;
    border-top: 1px solid #e5e5e5;
}

.bdl-home-landing__demo--lifecycle {
    padding-left: clamp(20px, 4vw, 48px);
    padding-right: clamp(20px, 4vw, 48px);
}

.bdl-home-landing__demo-intro {
    max-width: min(720px, 100%);
    margin: 0 auto clamp(20px, 3vh, 28px);
    padding: 0 4px;
    text-align: center;
}

.bdl-home-landing__demo-eyebrow {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6366f1;
}

.bdl-home-landing__demo-title {
    margin: 0 0 12px;
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #171717;
}

.bdl-home-landing__demo-lede {
    margin: 0 auto 10px;
    max-width: 36em;
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    line-height: 1.55;
    color: #525252;
}

.bdl-home-landing__demo-meta {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
    color: #737373;
}


.bdl-ace-demo {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #e4e4e7;
    --ace-bg: #0b0e14;
    --ace-surface: #11151c;
    --ace-glass: rgba(17, 21, 28, 0.78);
    --ace-border: #2a2d2e;
    --ace-muted: #71717a;
    --ace-text: #e4e4e7;
    --ace-accent: #6366f1;
    --ace-green: #4ade80;
    --ace-red: #f87171;
    --ace-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
    --ace-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.bdl-ace-demo__frame {
    border: 1px solid var(--ace-border);
    border-radius: 14px;
    background: var(--ace-bg);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 12px 40px rgba(0, 0, 0, 0.45),
        0 32px 64px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.bdl-ace-demo__chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    background: rgba(15, 18, 24, 0.95);
    border-bottom: 1px solid var(--ace-border);
    backdrop-filter: blur(8px);
}

.bdl-ace-demo__dots {
    display: flex;
    gap: 7px;
}

.bdl-ace-demo__dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.bdl-ace-demo__dots span:nth-child(1) { background: #ff5f57; }
.bdl-ace-demo__dots span:nth-child(2) { background: #febc2e; }
.bdl-ace-demo__dots span:nth-child(3) { background: #28c840; }

.bdl-ace-demo__chrome-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ace-text);
    letter-spacing: -0.02em;
}

.bdl-ace-demo__chrome-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.bdl-ace-demo__theme-toggle {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border-radius: 999px;
    background: var(--ace-glass);
    border: 1px solid var(--ace-border);
    backdrop-filter: blur(10px);
    gap: 2px;
}

.bdl-ace-demo__theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--ace-muted);
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.25s var(--ace-ease),
        color 0.25s var(--ace-ease),
        box-shadow 0.25s var(--ace-ease);
}

.bdl-ace-demo__theme-btn svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.bdl-ace-demo__theme-btn:hover {
    color: var(--ace-text);
}

.bdl-ace-demo__theme-btn.is-active {
    background: var(--ace-theme-btn-active-bg, rgba(99, 102, 241, 0.22));
    color: var(--ace-text);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.bdl-ace-demo__theme-btn:focus-visible {
    outline: 2px solid var(--ace-accent);
    outline-offset: 2px;
}

.bdl-ace-demo__chrome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--ace-muted);
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--ace-glass);
    border: 1px solid var(--ace-border);
    backdrop-filter: blur(10px);
}

.bdl-ace-demo__chrome-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ace-green);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
    animation: bdlAcePulse 2s ease infinite;
}

@keyframes bdlAcePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.bdl-ace-demo__workspace {
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1.05fr) minmax(0, 1.2fr);
    min-height: clamp(480px, 58vh, 680px);
    background: var(--ace-bg);
}

/* —— Task rail —— */
.bdl-ace-demo__rail {
    padding: 16px 12px 18px;
    border-right: 1px solid var(--ace-border);
    background: rgba(11, 14, 20, 0.6);
}

.bdl-ace-demo__rail-label {
    margin: 0 0 12px;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #52525b;
}

.bdl-ace-demo__rail-count {
    color: var(--ace-muted);
}

.bdl-ace-demo__tasks {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bdl-ace-demo__tasks > li {
    margin: 0;
    padding: 0;
}

.bdl-ace-demo__task {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--ace-muted);
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition:
        background 0.35s var(--ace-ease),
        border-color 0.35s var(--ace-ease),
        color 0.35s var(--ace-ease),
        box-shadow 0.35s var(--ace-ease);
    font: inherit;
}

.bdl-ace-demo__task:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #d4d4d8;
}

.bdl-ace-demo__task.is-active {
    background: rgba(17, 21, 28, 0.92);
    border-color: var(--ace-border);
    color: var(--ace-text);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.bdl-ace-demo__task.is-running {
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(99, 102, 241, 0.4);
}

.bdl-ace-demo__task-icon {
    flex-shrink: 0;
    font-size: 9px;
    margin-top: 4px;
    color: #52525b;
}

.bdl-ace-demo__task.is-active .bdl-ace-demo__task-icon {
    color: var(--ace-accent);
}

.bdl-ace-demo__task-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.bdl-ace-demo__task-name {
    font-weight: 500;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bdl-ace-demo__task-meta {
    font-size: 10px;
    color: #52525b;
    line-height: 1.3;
}

.bdl-ace-demo__task.is-active .bdl-ace-demo__task-meta {
    color: var(--ace-muted);
}

/* —— Agent column —— */
.bdl-ace-demo__agent {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--ace-border);
    background: var(--ace-surface);
}

.bdl-ace-demo__agent-head {
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--ace-border);
}

.bdl-ace-demo__agent-kicker {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #52525b;
}

.bdl-ace-demo__agent-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ace-text);
    letter-spacing: -0.02em;
}

.bdl-ace-demo__thread {
    flex: 1;
    padding: 16px 18px 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

.bdl-ace-demo__prompt {
    padding: 12px 14px;
    background: var(--ace-glass);
    border: 1px solid var(--ace-border);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    animation: bdlAceFadeUp 0.4s var(--ace-ease);
}

.bdl-ace-demo__prompt-label,
.bdl-ace-demo__reply-label {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #52525b;
}

.bdl-ace-demo__prompt-text,
.bdl-ace-demo__reply-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #d4d4d8;
}

/* Thought block (Cursor-style) */
.bdl-ace-demo__thought-wrap {
    animation: bdlAceFadeUp 0.45s var(--ace-ease);
}

.bdl-ace-demo__thought-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--ace-border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--ace-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: default;
    text-align: left;
}

.bdl-ace-demo__thought-chevron {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid #71717a;
    transition: transform 0.25s var(--ace-ease);
}

.bdl-ace-demo__thought-toggle.is-open .bdl-ace-demo__thought-chevron {
    transform: rotate(90deg);
}

.bdl-ace-demo__thought-duration {
    margin-left: auto;
    font-size: 11px;
    color: #52525b;
}

.bdl-ace-demo__thought-panel {
    margin-top: 8px;
    padding: 12px 14px;
    background: var(--ace-glass);
    border: 1px solid var(--ace-border);
    border-radius: 8px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.bdl-ace-demo__thought-text {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    color: #a1a1aa;
}

.bdl-ace-demo__status {
    font-size: 12px;
    color: var(--ace-muted);
    animation: bdlAceFadeUp 0.35s var(--ace-ease);
}

.bdl-ace-demo__status p {
    margin: 0;
}

.bdl-ace-demo__reply {
    animation: bdlAceFadeUp 0.4s var(--ace-ease);
}

/* File pills — Cursor-style */
.bdl-ace-demo__files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.bdl-ace-demo__file-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 10px;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #d4d4d8;
    background: rgba(24, 27, 34, 0.9);
    border: 1px solid var(--ace-border);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
}

.bdl-ace-demo__file-pill.is-visible {
    animation: bdlAcePillIn 0.55s var(--ace-spring) forwards;
}

.bdl-ace-demo__file-pill:nth-child(2).is-visible { animation-delay: 0.1s; }
.bdl-ace-demo__file-pill:nth-child(3).is-visible { animation-delay: 0.2s; }

@keyframes bdlAcePillIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bdl-ace-demo__file-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    font-family: Inter, system-ui, sans-serif;
    flex-shrink: 0;
}

.bdl-ace-demo__file-lang--py {
    background: linear-gradient(135deg, #3776ab 0%, #ffd343 100%);
    color: #0b0e14;
}

.bdl-ace-demo__file-lang--cpp {
    background: linear-gradient(135deg, #00599c 0%, #6295cb 100%);
    color: #fff;
}

.bdl-ace-demo__file-lang--ts {
    background: #3178c6;
    color: #fff;
}

.bdl-ace-demo__file-name {
    color: #e4e4e7;
}

.bdl-ace-demo__file-diff {
    font-weight: 600;
    font-size: 11px;
}

.bdl-ace-demo__file-diff-add {
    color: var(--ace-green);
}

.bdl-ace-demo__file-diff-del {
    color: var(--ace-red);
    margin-left: 2px;
}

.bdl-ace-demo__composer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 14px 14px;
    padding: 12px 14px;
    background: var(--ace-glass);
    border: 1px solid var(--ace-border);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.bdl-ace-demo__composer-placeholder {
    font-size: 12px;
    color: #52525b;
}

.bdl-ace-demo__composer-send {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #27272a;
    color: #71717a;
    font-size: 14px;
}

/* —— Preview column —— */
.bdl-ace-demo__preview-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #0d1017;
}

.bdl-ace-demo__browser-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ace-border);
    background: rgba(15, 18, 24, 0.8);
}

.bdl-ace-demo__browser-traffic {
    width: 52px;
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg, #27272a 0%, #27272a 100%);
    opacity: 0.5;
}

.bdl-ace-demo__browser-url {
    flex: 1;
    min-width: 0;
    padding: 6px 12px;
    font-size: 11px;
    color: var(--ace-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--ace-border);
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bdl-ace-demo__preview-stage {
    position: relative;
    flex: 1;
    min-height: 360px;
    overflow: hidden;
    background: #0d1017;
    isolation: isolate;
}

.bdl-ace-demo__preview-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px;
    text-align: center;
    color: #52525b;
    font-size: 13px;
    transition: opacity 0.35s var(--ace-ease);
}

.bdl-ace-demo__preview-empty-icon {
    font-size: 28px;
    opacity: 0.35;
}

.bdl-ace-demo__preview-panels {
    position: absolute;
    inset: 0;
}

.bdl-ace-demo__preview-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translate3d(24px, 0, 0);
    backface-visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.5s var(--ace-ease),
        transform 0.65s var(--ace-spring);
}

.bdl-ace-demo__preview-panel.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

.bdl-ace-demo__preview-panel.is-exiting {
    opacity: 0;
    transform: translate3d(-16px, 0, 0);
}

.bdl-ace-demo__scene {
    height: 100%;
    padding: clamp(20px, 4vw, 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.bdl-ace-demo__scene-meta {
    text-align: center;
}

.bdl-ace-demo__scene-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ace-text);
}

.bdl-ace-demo__scene-desc {
    margin: 0;
    font-size: 12px;
    color: var(--ace-muted);
}

/* Globe preview */
.bdl-ace-demo__globe {
    position: relative;
    width: min(200px, 70%);
    aspect-ratio: 1;
}

.bdl-ace-demo__globe-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(99, 102, 241, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 70% 65%, rgba(34, 197, 94, 0.2) 0%, transparent 40%),
        linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%);
    border: 1px solid var(--ace-border);
    box-shadow:
        inset -12px -12px 32px rgba(0, 0, 0, 0.5),
        0 16px 40px rgba(0, 0, 0, 0.4);
}

.bdl-ace-demo__globe-point {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--ace-green);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.8);
    animation: bdlAcePointPulse 2s ease infinite;
}

.bdl-ace-demo__globe-point:nth-child(3) { animation-delay: 0.3s; }
.bdl-ace-demo__globe-point:nth-child(4) { animation-delay: 0.6s; }
.bdl-ace-demo__globe-point:nth-child(5) { animation-delay: 0.9s; }
.bdl-ace-demo__globe-point:nth-child(6) { animation-delay: 1.2s; }

@keyframes bdlAcePointPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.7; }
}

/* Thermal preview */
.bdl-ace-demo__scene--thermal {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
}

.bdl-ace-demo__gauge {
    text-align: center;
}

.bdl-ace-demo__gauge-ring {
    --pct: 72;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        var(--ace-accent) 0deg,
        var(--ace-accent) calc(var(--pct) * 3.6deg),
        #27272a calc(var(--pct) * 3.6deg),
        #27272a 360deg
    );
    mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
    margin: 0 auto 10px;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.25);
}

.bdl-ace-demo__gauge-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--ace-text);
    letter-spacing: -0.03em;
}

.bdl-ace-demo__gauge-label {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--ace-muted);
}

.bdl-ace-demo__thermal-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 100px;
}

.bdl-ace-demo__thermal-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #52525b;
    font-style: normal;
}

.bdl-ace-demo__thermal-bar span {
    display: block;
    width: 22px;
    height: var(--h, 50%);
    max-height: 80px;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
    animation: bdlAceBarGrow 0.8s var(--ace-spring) forwards;
    transform-origin: bottom;
    transform: scaleY(0);
}

.bdl-ace-demo__thermal-bar:nth-child(2) span { animation-delay: 0.08s; }
.bdl-ace-demo__thermal-bar:nth-child(3) span { animation-delay: 0.16s; }
.bdl-ace-demo__thermal-bar:nth-child(4) span { animation-delay: 0.24s; }

@keyframes bdlAceBarGrow {
    to { transform: scaleY(1); }
}

/* Dashboard preview */
.bdl-ace-demo__dash-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 320px;
}

.bdl-ace-demo__dash-card {
    padding: 12px;
    background: var(--ace-glass);
    border: 1px solid var(--ace-border);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.bdl-ace-demo__dash-card span {
    display: block;
    font-size: 10px;
    color: var(--ace-muted);
    margin-bottom: 4px;
}

.bdl-ace-demo__dash-card strong {
    font-size: 18px;
    font-weight: 600;
    color: var(--ace-text);
}

.bdl-ace-demo__dash-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 88px;
    width: 100%;
    max-width: 320px;
    margin-top: 12px;
    padding: 10px 12px 0;
    border-radius: 10px;
    border: 1px solid var(--ace-border);
    background: rgba(0, 0, 0, 0.2);
}

.bdl-ace-demo__scene--dashboard::after {
    content: "Activity throughput";
    display: block;
    width: 100%;
    max-width: 320px;
    margin-top: 6px;
    font-size: 10px;
    color: var(--ace-muted);
    text-align: left;
}

.bdl-ace-demo__dash-chart span {
    flex: 1;
    height: var(--h);
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--ace-accent) 0%, #4f46e5 100%);
    opacity: 0.85;
    animation: bdlAceBarGrow 0.7s var(--ace-spring) forwards;
    transform-origin: bottom;
    transform: scaleY(0);
}

.bdl-ace-demo__dash-chart span:nth-child(2) { animation-delay: 0.05s; }
.bdl-ace-demo__dash-chart span:nth-child(3) { animation-delay: 0.1s; }
.bdl-ace-demo__dash-chart span:nth-child(4) { animation-delay: 0.15s; }
.bdl-ace-demo__dash-chart span:nth-child(5) { animation-delay: 0.2s; }
.bdl-ace-demo__dash-chart span:nth-child(6) { animation-delay: 0.25s; }
.bdl-ace-demo__dash-chart span:nth-child(7) { animation-delay: 0.3s; }
.bdl-ace-demo__dash-chart span:nth-child(8) { animation-delay: 0.35s; }

/* Robotics */
.bdl-ace-demo__robot-svg {
    width: min(220px, 80%);
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}

/* Neural search */
.bdl-ace-demo__search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    padding: 12px 14px;
    background: var(--ace-glass);
    border: 1px solid var(--ace-border);
    border-radius: 10px;
    font-size: 12px;
    color: var(--ace-muted);
    backdrop-filter: blur(10px);
}

.bdl-ace-demo__search-results {
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
    max-width: 300px;
}

.bdl-ace-demo__search-results li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ace-border);
    font-size: 12px;
}

.bdl-ace-demo__search-results strong {
    color: var(--ace-text);
    font-weight: 500;
}

.bdl-ace-demo__search-results span {
    color: var(--ace-green);
    font-size: 11px;
    font-weight: 600;
}

/* Utilities */
.bdl-ace-demo [hidden] {
    display: none !important;
}

/* GSAP drives motion — disable competing CSS transitions */
.bdl-ace-demo--gsap .bdl-ace-demo__task {
    transition: background 0.35s var(--ace-ease), border-color 0.35s var(--ace-ease), color 0.35s var(--ace-ease), box-shadow 0.35s var(--ace-ease);
}

.bdl-ace-demo--gsap .bdl-ace-demo__preview-panel {
    transition: none;
}

.bdl-ace-demo--gsap .bdl-ace-demo__file-pill,
.bdl-ace-demo--gsap .bdl-ace-demo__file-pill.is-visible {
    animation: none;
}

.bdl-ace-demo--gsap .bdl-ace-demo__thought-wrap,
.bdl-ace-demo--gsap .bdl-ace-demo__status,
.bdl-ace-demo--gsap .bdl-ace-demo__reply,
.bdl-ace-demo--gsap .bdl-ace-demo__prompt {
    animation: none;
}

.bdl-ace-demo--gsap .bdl-ace-demo__thermal-bar span,
.bdl-ace-demo--gsap .bdl-ace-demo__dash-chart span {
    animation: none;
    transform-origin: bottom center;
}

/* Fallback when preview mounts before GSAP bar tween runs */
.bdl-ace-demo__preview-panel.is-visible .bdl-ace-demo__dash-chart span,
.bdl-ace-demo__preview-panel.is-visible .bdl-ace-demo__thermal-bar span {
    transform: scaleY(1);
}

.bdl-ace-demo.is-typing [data-ace-thought-text]::after,
.bdl-ace-demo.is-typing [data-ace-user-prompt]::after,
.bdl-ace-demo.is-typing [data-ace-ai-summary]::after {
    content: "▋";
    display: inline-block;
    margin-left: 2px;
    color: var(--ace-muted);
    animation: bdlAceCaret 0.75s step-end infinite;
}

@keyframes bdlAceCaret {
    50% { opacity: 0; }
}

@keyframes bdlAceFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bdl-ace-demo[data-ace-stage="thinking"] .bdl-ace-demo__thought-wrap {
    display: block;
}

/* Responsive */
@media (max-width: 960px) {
    .bdl-home-landing__demo {
        padding-left: clamp(16px, 4vw, 24px);
        padding-right: clamp(16px, 4vw, 24px);
    }

    .bdl-ace-demo__workspace {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        min-height: 0;
    }

    .bdl-ace-demo__rail {
        border-right: none;
        border-bottom: 1px solid var(--ace-border);
    }

    .bdl-ace-demo__tasks {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .bdl-ace-demo__tasks > li {
        flex: 0 0 auto;
    }

    .bdl-ace-demo__task {
        min-width: 168px;
    }

    .bdl-ace-demo__agent {
        border-right: none;
        border-bottom: 1px solid var(--ace-border);
        min-height: 320px;
    }

    .bdl-ace-demo__preview-stage {
        min-height: 320px;
    }

    .bdl-ace-demo__scene--thermal {
        flex-direction: column;
    }
}

/* Light theme */
.bdl-ace-demo[data-ace-theme="light"] {
    color: #334155;
    --ace-bg: #f8fafc;
    --ace-surface: #ffffff;
    --ace-glass: rgba(255, 255, 255, 0.92);
    --ace-border: #e2e8f0;
    --ace-muted: #64748b;
    --ace-text: #0f172a;
    --ace-theme-btn-active-bg: #eef2ff;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__frame {
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.06),
        0 12px 40px rgba(15, 23, 42, 0.08),
        0 32px 64px rgba(15, 23, 42, 0.06);
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__chrome {
    background: rgba(255, 255, 255, 0.95);
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__rail {
    background: #f1f5f9;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__task:hover {
    background: rgba(15, 23, 42, 0.04);
    color: #334155;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__task.is-active {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__agent {
    background: #fff;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__prompt,
.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__thought-panel {
    background: #f8fafc;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__thought-toggle {
    background: #f1f5f9;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__prompt-text,
.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__reply-text {
    color: #334155;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__thought-text {
    color: #475569;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__file-pill {
    background: #fff;
    color: #334155;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__file-name {
    color: #0f172a;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__composer {
    background: #f8fafc;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__preview-pane {
    background: #f1f5f9;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__browser-bar {
    background: #fff;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__browser-url {
    background: #f1f5f9;
    color: #64748b;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__preview-empty {
    background: rgba(248, 250, 252, 0.96);
    color: #64748b;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__dash-card {
    background: #fff;
}

.bdl-ace-demo[data-ace-theme="light"] .bdl-ace-demo__search-bar {
    background: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .bdl-ace-demo__file-pill,
    .bdl-ace-demo__preview-panel,
    .bdl-ace-demo__thermal-bar span,
    .bdl-ace-demo__dash-chart span,
    .bdl-ace-demo__globe-point,
    .bdl-ace-demo__chrome-badge-dot {
        animation: none !important;
        transition: none !important;
    }

    .bdl-ace-demo__file-pill.is-visible,
    .bdl-ace-demo__preview-panel.is-visible {
        opacity: 1;
        transform: none;
    }

    .bdl-ace-demo.is-typing [data-ace-thought-text]::after,
    .bdl-ace-demo.is-typing [data-ace-user-prompt]::after,
    .bdl-ace-demo.is-typing [data-ace-ai-summary]::after {
        display: none;
    }
}
