/* Opted-in first scene only. Below desktop, retain the original card layout. */
.bs-astro-scan .bs-astro-card__media { display: contents; }
.bs-astro-scan .bs-astro-card__ascii,
.bs-astro-scan .bs-astro-card__platform,
.bs-astro-scan .bs-astro-browser-bar,
.bs-astro-scan .bs-astro-network { display: none; }
.bs-astro-scan .bs-astro-query-accessible { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (min-width: 1200px) {
    .bs-astro-scan { --bs-astro-cycle: 7.2s; --bs-astro-play: paused; }
    .bs-astro-scan .scan-carousel-slide.active .scan-results {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: min(100%, 414px);
        gap: 12px;
        animation: none;
        opacity: 1;
        transform: translateX(-50%);
    }
    .bs-astro-scan .scan-carousel-slide.active .bs-astro-card { animation: none; opacity: 1; transform: none; }
    .bs-astro-scan .bs-astro-card {
        width: auto;
        height: auto;
        min-width: 0;
        margin: 0;
        border: 1px solid #e5dfee;
        border-radius: 13px;
        background: #fdfcfe;
        box-shadow: 0 8px 18px -9px #180e2d55;
        animation: none;
    }
    .bs-astro-scan .bs-astro-card .result-badge {
        position: static;
        width: auto;
        height: auto;
        display: flex;
        justify-content: flex-start;
        gap: 5px;
        padding: 7px 9px 6px;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
    }
    .bs-astro-scan .bs-astro-card__platform {
        display: inline;
        color: #6b5a79;
        font: 500 11px/14px 'Matter Medium', sans-serif;
    }
    .bs-astro-scan .bs-astro-card__media {
        display: block;
        position: relative;
        isolation: isolate;
        container-type: inline-size;
        aspect-ratio: 1;
        margin: 0 5px 5px;
        border-radius: 9px;
        overflow: hidden;
        background: linear-gradient(150deg, #f0edf8, #f9f7fc 65%, #efecf7);
    }
    .bs-astro-scan .bs-astro-card .result-thumb {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-position: 50% 30%;
        transform: none;
        filter: none;
    }
    .bs-astro-scan .bs-astro-card__ascii {
        position: absolute;
        inset: 0;
        z-index: 1;
        margin: 0;
        overflow: hidden;
        background: linear-gradient(150deg, #f0edf8, #f9f7fc 65%, #efecf7);
        color: #856ca2;
        font: 400 4.16666cqw/4cqw 'Courier New', monospace;
        letter-spacing: 0;
        white-space: pre;
        pointer-events: none;
    }
    .bs-astro-scan .bs-astro-card__ascii span { display: block; height: 4cqw; line-height: 4cqw; }
    .bs-astro-scan .bs-astro-card .result-overlay {
        z-index: 2;
        inset: auto 11px 11px;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        background: none;
    }
    .bs-astro-scan .bs-astro-card .result-views,
    .bs-astro-scan .bs-astro-card .result-tag {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        width: fit-content;
        padding: 4px 6px;
        margin: 0;
        border-radius: 7px;
        background: #1d1b21;
        color: #fff;
        font: 500 11px/14px 'Matter Medium', sans-serif;
        white-space: nowrap;
    }
    .bs-astro-scan .bs-astro-card .result-tag { color: #e5d8fc; }
    .bs-astro-scan .bs-astro-card .bs-astro-card__loss { color: #ffb6b4; }
    .bs-astro-scan.bs-astro-ready .bs-astro-card__ascii { display: block; }
    .bs-astro-scan.bs-astro-ready .scan-carousel-slide.active .bs-astro-card .result-thumb {
        animation: bs-astro-photo-decode var(--bs-astro-cycle) cubic-bezier(.22,1,.36,1) infinite both;
        animation-play-state: var(--bs-astro-play);
    }
    .bs-astro-scan.bs-astro-ready .scan-carousel-slide.active .bs-astro-card__ascii {
        animation: bs-astro-text-decode var(--bs-astro-cycle) cubic-bezier(.22,1,.36,1) infinite both;
        animation-play-state: var(--bs-astro-play);
    }
    .bs-astro-scan.bs-astro-ready .scan-carousel-slide.active :is(.scan-cursor,.scan-profile-avatar,.scan-profile-chip,.scan-line,.scan-status-text) {
        animation-duration: var(--bs-astro-cycle);
        animation-play-state: var(--bs-astro-play);
    }
    @keyframes bs-astro-photo-decode { 0%,54% { opacity: 0; } 70%,100% { opacity: 1; } }
    @keyframes bs-astro-text-decode { 0%,54% { opacity: 1; } 70%,100% { opacity: 0; } }

    /* Open scan: identity and findings on the purple surface, dashboard below. */
    .bs-astro-scan.fa-visual-panel > .scan-carousel-slide { aspect-ratio: 1; }
    .bs-astro-scan.fa-visual-panel[data-panel="0"] > .scan-carousel-slide > .screenshot-frame {
        height: auto;
        aspect-ratio: 100 / 78;
        container-type: inline-size;
        padding: 0;
        isolation: isolate;
        border: 1px solid #c4a4ee;
        border-radius: 18px;
        background:
            radial-gradient(ellipse at 4% 0%, #faf6ffaf, transparent 54%),
            linear-gradient(153deg, #e7d6ff, #b085fa 29%, #7f42fd 62%, #6114ff);
        box-shadow: none;
    }
    .bs-astro-scan.fa-visual-panel > .scan-carousel-slide > .screenshot-frame::before {
        inset: 0;
        width: auto;
        height: auto;
        border-radius: inherit;
        background: repeating-linear-gradient(133deg, transparent 0 7px, #561cca0a 7px 8px);
        mask-image: linear-gradient(45deg, transparent 20%, #000);
        box-shadow: none;
        z-index: -1;
        pointer-events: none;
    }
    .bs-astro-scan .screenshot-frame-inset {
        top: 45cqw;
        right: auto;
        bottom: auto;
        left: 4.5%;
        width: 92%;
        padding: 0;
        transform: none;
        border: 1px solid #e4e1ee;
        border-radius: 13px;
        background: #fff;
        box-shadow: 0 18px 40px -14px #3d24572e, 0 2px 6px #3d24570a;
        z-index: 1;
    }
    .bs-astro-scan .screenshot-frame-inset::before { display: none; }
    .bs-astro-scan .screenshot-frame-inset .screenshot-frame-img { border-radius: 0 0 12px 12px; }
    .bs-astro-scan .bs-astro-browser-bar {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 42px;
        padding: 0 62px;
        background: linear-gradient(100deg, #fafbfe, #f2edfc);
        border-bottom: 1px solid #e8e7ef;
        color: #706b83;
    }
    .bs-astro-scan .bs-astro-browser-dots { position: absolute; left: 16px; display: flex; gap: 5px; }
    .bs-astro-scan .bs-astro-browser-dots i { width: 6px; height: 6px; border-radius: 50%; background: #d2d5e2; }
    .bs-astro-scan .bs-astro-browser-address {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 100%;
        max-width: 270px;
        height: 25px;
        border: 1px solid #eae7f2;
        border-radius: 8px;
        background: #ffffffa6;
        font: 500 10px/1 'Matter Medium', sans-serif;
        white-space: nowrap;
    }
    .bs-astro-scan .bs-astro-browser-address svg { width: 12px; height: 12px; flex: none; }
    .bs-astro-scan .bs-astro-browser-path { color: #9992aa; }
    .bs-astro-scan .bs-astro-browser-reload { position: absolute; right: 17px; width: 13px; height: 13px; color: #a39bb6; }
    .bs-astro-scan.fa-visual-panel .scan-stage {
        position: absolute;
        top: 4.8cqw;
        right: auto;
        left: 5.5cqw;
        width: 60cqw;
        max-width: none;
        height: 35cqw;
        padding: 0;
        transform: none;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        z-index: 3;
    }
    .bs-astro-scan .scan-stage::before { display: none; }
    .bs-astro-scan .scan-stage .scan-input-bar {
        position: absolute;
        top: 6.6cqw;
        left: 0;
        width: 100%;
        height: 7.2cqw;
        margin: 0;
        padding: 1.1cqw 1.1cqw 1.1cqw 2cqw;
        border: 1px solid #e6e2ed;
        border-radius: 1.65cqw;
        background: #fff;
        box-shadow: 0 7px 24px -10px #3a12614a;
    }
    .bs-astro-scan .scan-input-bar .scan-input-icon { width: 16px; height: 16px; margin-right: 8px; }
    .bs-astro-scan .scan-input-bar .scan-input-text { font-size: max(12px, 2cqw); }
    .bs-astro-scan .scan-input-bar .scan-input-btn { padding: 1.35cqw 1.65cqw; border-radius: 1.15cqw; font-size: max(11px, 1.6cqw); }
    .bs-astro-scan .scan-stage .scan-profile-avatar {
        top: 0;
        left: .2cqw;
        width: 4.4cqw;
        height: 4.4cqw;
        border: 2px solid #fff;
        box-shadow: none;
        opacity: 1;
        transform: none;
        animation: none;
    }
    .bs-astro-scan .scan-stage .scan-profile-chip {
        top: 1.2cqw;
        left: 5.6cqw;
        padding: 0;
        gap: 7px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: none;
        opacity: 1;
        transform: none;
        animation: none;
    }
    .bs-astro-scan .scan-profile-chip .chip-name { font-size: max(12px, 1.85cqw); color: #2b164d; }
    .bs-astro-scan .scan-profile-chip img.chip-favicon { width: 2.6cqw; height: 2.6cqw; border-radius: 0; }
    .bs-astro-scan .scan-carousel-slide.active .scan-status-text {
        top: 15.4cqw;
        left: 1cqw;
        display: flex;
        align-items: center;
        gap: .75cqw;
        font-size: 11px;
        color: #402164;
        opacity: 1;
        transform: none;
        animation: none;
    }
    .bs-astro-scan .scan-status-text::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #22c581; box-shadow: 0 0 0 3px #ffffff33; }
    .bs-astro-scan .scan-carousel-slide.active .scan-results { top: 19cqw; left: 1cqw; width: 51cqw; gap: 1.5cqw; transform: none; }
    .bs-astro-scan:not(.bs-astro-ready) .scan-carousel-slide.active :is(.scan-cursor,.scan-line,.scan-status-text) { animation: none; }
    .bs-astro-scan.bs-astro-ready .bs-astro-query-typed::after {
        content: '';
        display: inline-block;
        width: 1px;
        height: 1em;
        margin-left: 2px;
        vertical-align: -2px;
        background: #7f42fd;
        animation: bs-astro-type-caret var(--bs-astro-cycle) steps(1,end) infinite;
        animation-play-state: var(--bs-astro-play);
    }
    .bs-astro-scan.bs-astro-ready .scan-carousel-slide.active .scan-cursor {
        top: 10cqw;
        left: auto;
        right: 4cqw;
        animation-name: bs-astro-cursor;
    }
    .bs-astro-scan.bs-astro-ready .scan-carousel-slide.active .scan-line {
        top: 14cqw;
        width: 56cqw;
        max-width: none;
        animation-name: bs-astro-sweep;
    }
    @keyframes bs-astro-cursor {
        0%,8% { opacity: 0; transform: translate(18px, 22px); }
        22% { opacity: 1; transform: translate(0, 0); }
        26% { opacity: 1; transform: scale(.88); }
        29% { opacity: 1; transform: scale(1); }
        36%,100% { opacity: 0; transform: translate(0, 0); }
    }
    @keyframes bs-astro-sweep {
        0%,30% { opacity: 0; transform: translateX(-50%) scaleX(.1); }
        33% { opacity: .6; transform: translateX(-50%) scaleX(.25); }
        50% { opacity: 0; transform: translateX(-50%) scaleX(1); }
        100% { opacity: 0; }
    }
    @keyframes bs-astro-type-caret {
        0%,6%,12%,18%,24% { opacity: 1; }
        3%,9%,15%,21%,28%,100% { opacity: 0; }
    }

    .bs-astro-scan .bs-astro-network {
        --bs-astro-spectrum: conic-gradient(from 35deg, #ffaa00, #ff8400, #ff3d8b, #e14dff, #4f7bff, #38bdf8, #22c581, #ffd000, #ffaa00);
        position: absolute;
        display: block;
        top: 0;
        right: auto;
        bottom: auto;
        left: 0;
        width: 100%;
        height: 43cqw;
        transform: none;
        isolation: isolate;
        z-index: 2;
        overflow: visible;
        pointer-events: none;
    }
    .bs-astro-scan .bs-astro-network__tiles {
        position: absolute;
        inset: 0;
    }
    .bs-astro-scan .bs-astro-network__tile {
        position: absolute;
        display: grid;
        place-items: center;
        width: 8.7cqw;
        height: 8.7cqw;
        border: 1px solid #ffffff0d;
        border-radius: 2cqw;
        background: #24202c;
        color: #8c809d;
        box-shadow: 0 7px 17px -10px #25103355;
    }
    .bs-astro-scan .bs-astro-network__tile:nth-child(1) { left: 71cqw; top: 5cqw; transform: rotate(-8deg); }
    .bs-astro-scan .bs-astro-network__tile:nth-child(2) { left: 84cqw; top: 7cqw; transform: rotate(8deg); }
    .bs-astro-scan .bs-astro-network__tile:nth-child(3) { left: 93cqw; top: 16cqw; transform: rotate(11deg); opacity: .42; }
    .bs-astro-scan .bs-astro-network__tile:nth-child(4) { left: 71cqw; top: 29cqw; transform: rotate(-9deg); opacity: .62; }
    .bs-astro-scan .bs-astro-network__tile:nth-child(5) { left: 87cqw; top: 30cqw; transform: rotate(7deg); opacity: .78; }
    .bs-astro-scan .bs-astro-network__tile:nth-child(6) { left: 93cqw; top: 37cqw; transform: rotate(13deg); opacity: .28; }
    .bs-astro-scan .bs-astro-network__tile svg { width: 3.7cqw; height: 3.7cqw; }
    /* The glow and local softness stay still beneath the floating AI core. */
    .bs-astro-scan .bs-astro-network::before {
        content: '';
        position: absolute;
        top: 15cqw;
        left: 84cqw;
        width: 14cqw;
        height: 14cqw;
        transform: translateX(-50%);
        border-radius: 4cqw;
        background: var(--bs-astro-spectrum);
        filter: blur(1.7cqw);
        opacity: .28;
        z-index: 1;
    }
    .bs-astro-scan .bs-astro-network::after {
        content: '';
        position: absolute;
        top: 14cqw;
        left: 84cqw;
        width: 16cqw;
        height: 16cqw;
        transform: translateX(-50%);
        border-radius: 4cqw;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        mask-image: radial-gradient(closest-side, #000 65%, transparent);
        z-index: 1;
    }
    .bs-astro-scan .bs-astro-network__core {
        position: absolute;
        top: 16cqw;
        left: 84cqw;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 12cqw;
        height: 12cqw;
        transform: translate3d(-50%, 0, 0);
        backface-visibility: hidden;
        z-index: 2;
        border: 1.5px solid transparent;
        border-radius: 3cqw;
        background: linear-gradient(140deg, #242129, #151319) padding-box, var(--bs-astro-spectrum) border-box;
        box-shadow: 0 2px 4px -1px #15101f26, 0 9px 16px -7px #15101f40;
        color: #e0d9e9;
        font: 500 9px/1 'Matter Medium', sans-serif;
        letter-spacing: 1.4px;
        animation: bs-astro-ai-float 6s ease-in-out infinite;
        animation-play-state: var(--bs-astro-play);
    }
    .bs-astro-scan.active .bs-astro-network__core { will-change: transform; }
    .bs-astro-scan .bs-astro-network__core > svg { width: 5.4cqw; height: 5.4cqw; }
    .bs-astro-scan .bs-astro-network__caption {
        position: absolute;
        top: 29.8cqw;
        left: 84cqw;
        z-index: 3;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 4px 8px;
        border: 1px solid #ffffff10;
        border-radius: 20px;
        background: #251f2f;
        color: #e9e2f2;
        font: 500 10px/15px 'Matter Medium', sans-serif;
        white-space: nowrap;
    }
    .bs-astro-scan .bs-astro-network__dot { width: 4px; height: 4px; border-radius: 50%; background: #22c581; }
    .bs-astro-scan .bs-astro-network__platforms { position: relative; display: block; width: 48px; height: 15px; }
    .bs-astro-scan .bs-astro-network__platforms > span { position: absolute; inset: 0; opacity: 0; animation: bs-astro-platform-name 28.8s ease-in-out infinite; animation-delay: calc(var(--bs-astro-platform-index) * 3.6s - 28.8s); animation-play-state: var(--bs-astro-play); }
    .bs-astro-scan .bs-astro-network__platforms > span:first-child { opacity: 1; }
    @keyframes bs-astro-ai-float {
        0%, 100% { transform: translate3d(-50%, 0, 0); }
        50% { transform: translate3d(-50%, -4px, 0); }
    }
    @keyframes bs-astro-platform-name {
        0%, 10%, 100% { opacity: 1; }
        12.5%, 98% { opacity: 0; }
    }
}

@media (min-width: 1200px) and (prefers-reduced-motion: reduce) {
    .bs-astro-scan .scan-carousel-slide.active :is(.bs-astro-card,.result-thumb,.bs-astro-card__ascii,.scan-cursor,.scan-profile-avatar,.scan-profile-chip,.scan-line,.scan-status-text) { animation: none !important; }
    .bs-astro-scan .bs-astro-card__ascii { display: none !important; }
    .bs-astro-scan.bs-astro-ready .bs-astro-query-typed::after { display: none; }
    .bs-astro-scan .bs-astro-card,
    .bs-astro-scan .bs-astro-card .result-thumb { opacity: 1; transform: none; }
    .bs-astro-scan .bs-astro-network__core,
    .bs-astro-scan .bs-astro-network__platforms > span { animation: none; }
    .bs-astro-scan.active .bs-astro-network__core { will-change: auto; }
}
