/**
 * Capabilities bento grid
 */

#capabilities {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.bento-card {
    min-height: 320px;
}

.bento-card--drill {
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.bento-card--drill:hover {
    border-color: rgba(5, 199, 187, 0.28);
}

.bento-icon-chip {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #05c7bb;
    font-size: 0.95rem;
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.bento-card--drill:hover .bento-icon-chip {
    background: rgba(5, 199, 187, 0.09);
    border-color: rgba(5, 199, 187, 0.35);
    color: #5eead4;
}

.bento-drill-chip {
    position: absolute;
    top: 1.5rem;
    right: 1.75rem;
    z-index: 15;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(209, 213, 219, 0.68);
    background: rgba(11, 29, 40, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.bento-card--drill:hover .bento-drill-chip {
    color: #fff;
    border-color: rgba(5, 199, 187, 0.45);
    background: rgba(5, 199, 187, 0.14);
    transform: translateX(2px);
}

.bento-card--span-2,
.bento-card--span-3 {
    min-height: 320px;
}

@media (min-width: 768px) {
    .bento-card--span-3 {
        grid-column: 1 / -1;
        min-height: 420px;
    }
}

@media (min-width: 768px) {
    .bento-card--span-2 {
        grid-column: span 2;
    }
}

.bento-card-copy {
    position: relative;
    z-index: 10;
    min-width: 0;
    max-width: 100%;
}

.bento-card--wide .bento-card-copy {
    width: 90%;
    max-width: 28rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .bento-card--wide .bento-card-copy {
        width: 40%;
        max-width: 40%;
    }
}

.bento-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 100%;
    overflow: hidden;
}

.bento-proof-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0 2px;
    border: 0;
    border-bottom: 1px solid rgba(5, 199, 187, 0.35);
    border-radius: 0;
    background: none;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #05c7bb;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.bento-proof-link:hover,
.bento-proof-link:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.65);
}

.bento-badge {
    font-size: 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: rgba(209, 213, 219, 0.9);
    white-space: nowrap;
    flex: 0 1 auto;
}

.bento-badge--teal {
    border-color: rgba(5, 199, 187, 0.2);
    background: rgba(5, 199, 187, 0.05);
    color: #05c7bb;
}

.bento-badge--model {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.5rem 0.22rem 0.35rem;
    font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: #f4f7f8;
}

.bento-badge--model img {
    display: block;
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.bento-badge-veo {
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #ff4b3a 0%, #ff7a29 58%, #ffb000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bento-deploy-graphic {
    position: relative;
    margin-top: auto;
    height: 8rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.bento-visual {
    position: relative;
    width: 100%;
    height: 8rem;
    margin-top: auto;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.bento-visual--mock {
    height: 13.5rem;
}

.bento-visual--hero {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 55%;
    height: 75%;
    margin-top: 0;
    border-radius: 1.5rem 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -8px -8px 40px rgba(0, 0, 0, 0.45);
    opacity: 0.45;
    mask-image: linear-gradient(to top left, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top left, black 60%, transparent 100%);
}

@media (min-width: 768px) {
    .bento-visual--hero {
        opacity: 1;
        width: 58%;
        height: 78%;
    }
}

.bento-visual--hero-ui {
    opacity: 0.92;
    mask-image: none;
    -webkit-mask-image: none;
    border-radius: 1rem 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: -12px -12px 36px rgba(0, 0, 0, 0.55);
}

@media (min-width: 768px) {
    .bento-visual--hero-ui {
        opacity: 1;
        width: 56%;
        height: 82%;
    }
}

/* Phones: the visual sits under the copy in normal flow instead of behind it,
   so product mocks never run over the text. */
@media (max-width: 767.98px) {
    .bento-visual--hero,
    .bento-visual--hero-ui {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        margin-top: 1.25rem;
        opacity: 1;
        border-radius: 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        mask-image: none;
        -webkit-mask-image: none;
    }

    .bento-card--wide .bento-card-copy {
        width: 100%;
        max-width: 100%;
    }
}

.bento-visual--hero .bento-visual-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(11, 29, 40, 0.25);
    pointer-events: none;
    transition: background 0.4s ease;
}

.bento-card:hover .bento-visual--hero .bento-visual-overlay {
    background: rgba(11, 29, 40, 0.08);
}

.bento-mock-root {
    width: 100%;
    height: 100%;
    min-height: 128px;
    overflow: hidden;
}

.bento-visual--hero .bento-mock-root {
    min-height: 100%;
}

.bento-slideshow-img,
.bento-slideshow-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.bento-slideshow-img {
    transform: scale(1);
    z-index: 0;
}

.bento-slideshow-img.active {
    opacity: 1;
    z-index: 1;
}

.bento-slideshow-img.is-incoming {
    z-index: 2;
}

.bento-slideshow-video.active {
    opacity: 1;
}

.bento-prompt {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 20;
}

/* Bento drill-down triggers */
.bento-card--drill {
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bento-card--drill:hover {
    border-color: rgba(0, 192, 180, 0.25);
    box-shadow: 0 0 40px rgba(0, 192, 180, 0.08);
}

.bento-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Video bento segmented progress */
.bento-progress-bar {
    position: absolute;
    top: 12px;
    left: 14px;
    right: 14px;
    display: flex;
    gap: 5px;
    z-index: 12;
    pointer-events: none;
}

.bento-progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.bento-progress-fill {
    height: 100%;
    width: 0%;
    background: #00C0B4;
    border-radius: 999px;
    transition: width 0.12s linear;
}

.bento-progress-segment.is-completed .bento-progress-fill {
    width: 100%;
    transition: none;
}

.bento-progress-segment.is-active .bento-progress-fill {
    background: #00C0B4;
}

/* ---------- Capability mocks — real-UI crops (features.js · smBx) ----------
   Rendered 1:1 (no scaling) and reflowed with container queries, so the same
   mock reads in a bento card and in its wider deep-dive panel. Overrides of
   shared showcase rules use the same :is() prefix to match its specificity. */
.sm-bx,
.sm-bx-nodechip {
    --sm-bg: #171d21;
    --sm-teal: #00C0B4;
    --sm-text: #D5E2EA;
    --sm-muted: #74919c;
    --sm-border: rgba(255, 255, 255, 0.07);
    --sm-glass: rgba(27, 34, 38, 0.12);
    --sm-purple: #bc48f0;
}

.sm-bx {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--sm-bg);
    color: var(--sm-text);
    font: 400 9px/1.35 Inter, system-ui, sans-serif;
    container-type: inline-size;
    box-sizing: border-box;
}

.sm-bx *,
.sm-bx *::before,
.sm-bx *::after {
    box-sizing: border-box;
}

.sm-bx figure,
.sm-bx p {
    margin: 0;
}

.feature-detail-mock > .sm-bx {
    min-height: 100%;
}

/* Data Hub: no detail column, fluid grid */
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui).sm-bx--datahub .sm-app-shell--ide-datahub .sm-dh-workspace {
    grid-template-columns: minmax(0, 1fr);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui).sm-bx--datahub .sm-app-shell--ide-datahub .sm-dh-file-grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    overflow: hidden;
    padding-bottom: 34px;
}

/* Shared: avatars, presence, canvas */
.sm-bx-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 6.5px;
    font-weight: 700;
    color: #0e1418;
    border: 1.5px solid var(--sm-bg);
}

.sm-bx-avatar--teal { background: #00C0B4; }
.sm-bx-avatar--purple { background: #c084fc; }
.sm-bx-avatar--amber { background: #fbbf24; }

.sm-bx-canvas {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    background-color: #12181c;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 12px 12px;
}

.sm-bx-presence {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    display: flex;
    align-items: center;
    padding: 2px 4px 2px 6px;
    border: 1px solid var(--sm-border);
    border-radius: 999px;
    background: rgba(20, 26, 30, 0.9);
}

.sm-bx-presence .sm-bx-avatar + .sm-bx-avatar {
    margin-left: -4px;
}

.sm-bx-live {
    width: 5px;
    height: 5px;
    margin-right: 4px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px #34d399;
}

.sm-bx-imgnode {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sm-bx-imgnode figcaption {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 7.5px;
    color: var(--sm-muted);
    white-space: nowrap;
}

.sm-bx-imgnode figcaption .sm-ico {
    width: 8px;
    height: 8px;
}

.sm-bx-imgnode img,
.sm-bx-imgnode video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
    background: #0d1215;
}

/* Collab: pins, cursor, popover, Board panel */
.sm-bx--collab .sm-bx-imgnode {
    top: 14px;
    left: 12px;
    width: 46%;
    height: calc(100% - 28px);
}

.sm-bx-pin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px 9px 9px 2px;
    background: rgba(20, 26, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--sm-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.sm-bx-pin .sm-ico {
    width: 9px;
    height: 9px;
}

.sm-bx-pin em {
    font-style: normal;
    font-size: 7px;
    font-weight: 700;
}

.sm-bx-pin--active {
    background: var(--sm-teal);
    border-color: var(--sm-teal);
    color: #0e1418;
    box-shadow: 0 0 0 3px rgba(0, 192, 180, 0.25), 0 4px 12px rgba(0, 0, 0, 0.45);
}

.sm-bx-cursor {
    position: absolute;
    left: 40%;
    bottom: 18%;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    color: #c084fc;
    animation: sm-bx-cursor 6s ease-in-out infinite;
}

.sm-bx-cursor .sm-ico {
    width: 11px;
    height: 11px;
}

.sm-bx-cursor .sm-ico svg {
    fill: currentColor;
    stroke: #0e1418;
    stroke-width: 1.5;
}

.sm-bx-cursor em {
    margin: 9px 0 0 -2px;
    padding: 1px 5px;
    border-radius: 4px;
    background: #c084fc;
    color: #0e1418;
    font: 600 7px/1.4 Inter, system-ui, sans-serif;
}

@keyframes sm-bx-cursor {
    0%, 100% { transform: translate(0, 0); }
    40% { transform: translate(-28px, -22px); }
    70% { transform: translate(-12px, -30px); }
}

.sm-bx-popover {
    position: absolute;
    top: 14px;
    right: 10px;
    z-index: 4;
    width: min(50%, 210px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 7px 7px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(24, 31, 36, 0.97);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}

.sm-bx--collab .sm-bx-popover {
    top: 34px;
}

.sm-bx-popover-head {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 8px;
}

.sm-bx-popover-head .sm-ico {
    width: 9px;
    height: 9px;
}

.sm-bx-popover-head > span:not(.sm-ico) {
    flex: 1;
}

.sm-bx-popover-head .sm-ico:last-child {
    color: var(--sm-muted);
}

.sm-bx-msg {
    display: flex;
    gap: 5px;
}

.sm-bx-msg strong {
    font-size: 7.5px;
}

.sm-bx-msg time,
.sm-bx-cm-meta time {
    margin-left: 3px;
    font-size: 6.5px;
    color: var(--sm-muted);
}

.sm-bx-msg p,
.sm-bx-cm-card p {
    margin-top: 1px;
    font-size: 7.5px;
    line-height: 1.4;
    color: #b9c7cf;
}

.sm-bx-msg p b {
    color: var(--sm-teal);
    font-weight: 600;
}

.sm-bx-msg--reply {
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 7px;
}

.sm-bx-composer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 20px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    font-size: 7px;
    color: var(--sm-muted);
}

.sm-bx-composer .sm-ico {
    width: 9px;
    height: 9px;
    color: var(--sm-teal);
}

.sm-bx-board-panel {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 36%;
    max-width: 230px;
    padding: 8px;
    border-left: 1px solid var(--sm-border);
    background: #151b1f;
}

.sm-bx-board-panel .sm-board-sections {
    margin: 0 0 2px;
}

.sm-bx-cm-card {
    display: flex;
    gap: 6px;
    padding: 6px;
    border-radius: 7px;
    border: 1px solid var(--sm-border);
    background: rgba(255, 255, 255, 0.025);
}

.sm-bx-cm-card:first-of-type {
    border-color: rgba(0, 192, 180, 0.35);
    background: rgba(0, 192, 180, 0.06);
}

.sm-bx-cm-meta strong {
    font-size: 7.5px;
}

.sm-bx-cm-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.sm-bx-cm-anchor {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 5px 1px 2px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 6.5px;
    color: var(--sm-text);
}

.sm-bx-cm-anchor img {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    object-fit: cover;
}

.sm-bx-cm-anchor .sm-ico {
    width: 8px;
    height: 8px;
    color: var(--sm-muted);
}

.sm-bx-cm-replies {
    font-size: 6.5px;
    color: var(--sm-teal);
}

@container (min-width: 520px) {
    .sm-bx-board-panel {
        display: flex;
    }

    .sm-bx--collab .sm-bx-imgnode {
        width: 52%;
    }

    .sm-bx-popover {
        width: 180px;
        right: 14px;
    }
}

/* CAD: viewer + Decimate dialog */
.sm-bx-viewer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: radial-gradient(120% 90% at 30% 40%, #20292f 0%, #12181c 70%);
}

.sm-bx-viewer-grid {
    position: absolute;
    left: -20%;
    right: -20%;
    bottom: -30%;
    height: 80%;
    background-image:
        linear-gradient(rgba(0, 192, 180, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 192, 180, 0.14) 1px, transparent 1px);
    background-size: 18px 18px;
    transform: perspective(240px) rotateX(58deg);
    transform-origin: top center;
    mask-image: linear-gradient(to bottom, transparent, black 45%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 45%);
}

.sm-bx-viewer img {
    position: absolute;
    left: 2%;
    top: 18%;
    width: 38%;
    height: 70%;
    object-fit: contain;
    mix-blend-mode: lighten;
}

.sm-bx-viewer-chip em {
    display: none;
    font-style: normal;
    color: var(--sm-muted);
}

.sm-bx-viewer-chip,
.sm-bx-viewer-result {
    position: absolute;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 7.5px;
    white-space: nowrap;
}

.sm-bx-viewer-chip {
    top: 8px;
    border: 1px solid var(--sm-border);
    background: rgba(20, 26, 30, 0.9);
}

.sm-bx-viewer-result {
    display: none;
    bottom: 8px;
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.08);
}

.sm-bx-viewer-chip .sm-ico,
.sm-bx-viewer-result .sm-ico {
    width: 9px;
    height: 9px;
}

.sm-bx-dialog {
    position: absolute;
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: min(62%, 230px);
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 9px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(24, 31, 36, 0.97);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.sm-bx-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 600;
}

.sm-bx-dialog-head .sm-ico {
    width: 10px;
    height: 10px;
    color: var(--sm-muted);
}

.sm-bx-dialog-intro {
    font-size: 7.5px;
    color: var(--sm-muted);
}

.sm-bx-dialog-intro b {
    color: var(--sm-text);
    font-weight: 600;
}

.sm-bx-dialog-label {
    display: block;
    margin-bottom: 2px;
    font-size: 7px;
    font-weight: 600;
    color: #9ba5b0;
}

.sm-bx-select,
.sm-bx-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 20px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.22);
    font-size: 8px;
}

.sm-bx-select .sm-ico {
    width: 8px;
    height: 8px;
    color: var(--sm-muted);
}

.sm-bx-dialog-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 7.5px;
}

.sm-bx-dialog-row--extra {
    display: none;
    align-items: stretch;
    gap: 6px;
}

.sm-bx-dialog-row--extra > span {
    flex: 1;
}

.sm-bx-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.sm-bx-check + .sm-bx-check {
    margin-left: 6px;
}

.sm-bx-check.is-on {
    background: var(--sm-teal);
    border-color: var(--sm-teal);
    color: #0e1418;
}

.sm-bx-check .sm-ico {
    width: 7px;
    height: 7px;
}

.sm-bx-dialog-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 5px 6px;
    border-radius: 6px;
    background: rgba(0, 192, 180, 0.07);
    font-size: 7.5px;
    color: var(--sm-muted);
}

.sm-bx-dialog-price strong {
    color: var(--sm-teal);
}

.sm-bx-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    padding-top: 5px;
    border-top: 1px solid var(--sm-border);
}

.sm-bx-btn {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 7px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 7.5px;
    font-weight: 600;
    white-space: nowrap;
}

.sm-bx-btn--primary {
    background: var(--sm-teal);
    border-color: var(--sm-teal);
    color: #0e1418;
}

@container (min-width: 480px) {
    .sm-bx-dialog {
        top: 50%;
        bottom: auto;
        right: 7%;
        transform: translateY(-50%);
        width: 240px;
    }

    .sm-bx-dialog-row--extra,
    .sm-bx-viewer-result {
        display: flex;
    }

    .sm-bx-viewer-chip em {
        display: inline;
    }

    .sm-bx-viewer img {
        left: 6%;
        width: 46%;
    }
}

/* Image / Video: generation pipeline */
.sm-bx-canvas--pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 30px 4% 40px;
}

.sm-bx-canvas--pipeline .sm-bx-imgnode {
    position: relative;
    flex: 0 0 24%;
    height: 72%;
}

.sm-bx-canvas--pipeline .sm-bx-imgnode--out {
    flex-basis: 30%;
    height: 86%;
}

.sm-bx--image .sm-bx-imgnode--in img {
    object-fit: contain;
    padding: 6px;
    background: #f1f3f4;
}

.sm-bx-wire {
    flex: 1 1 18px;
    max-width: 44px;
    height: 2px;
    background: linear-gradient(90deg, rgba(188, 72, 240, 0.25), var(--sm-purple), rgba(188, 72, 240, 0.25));
    background-size: 200% 100%;
    animation: sm-shimmer 2.2s linear infinite;
    position: relative;
}

.sm-bx-wire::before,
.sm-bx-wire::after {
    content: '';
    position: absolute;
    top: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sm-purple);
}

.sm-bx-wire::before { left: -3px; }
.sm-bx-wire::after { right: -3px; }

.sm-bx-gen {
    flex: 0 0 30%;
    max-width: 210px;
    border-radius: 9px;
    border: 1px solid rgba(188, 72, 240, 0.45);
    background: rgba(24, 31, 36, 0.97);
    box-shadow: 0 0 0 3px rgba(188, 72, 240, 0.08), 0 12px 28px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.sm-bx-gen-head,
.sm-bx-nodechip-head {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    background: linear-gradient(90deg, rgba(188, 72, 240, 0.28), rgba(168, 78, 209, 0.12));
    font: 700 7.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.06em;
    color: #f3e8ff;
}

.sm-bx-gen-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--sm-purple);
    color: #fff;
}

.sm-bx-gen-ico .sm-ico {
    width: 9px;
    height: 9px;
}

.sm-bx-gen-dot {
    width: 5px;
    height: 5px;
    margin-left: auto;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px #34d399;
}

.sm-bx-gen p {
    padding: 6px 7px 4px;
    font-size: 7.5px;
    line-height: 1.45;
    color: #c4d0d7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sm-bx-gen-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px 7px;
    font-size: 7px;
    color: var(--sm-muted);
}

.sm-bx-gen-model {
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(188, 72, 240, 0.4);
    background: rgba(188, 72, 240, 0.12);
    color: #e9d5ff;
    font: 600 7px/1.4 Inter, system-ui, sans-serif;
    letter-spacing: 0;
}

.sm-bx-play {
    position: absolute;
    left: 50%;
    top: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    transform: translate(-50%, -50%);
}

.sm-bx-play .sm-ico {
    width: 10px;
    height: 10px;
}

.sm-bx-dur {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.6);
    font-size: 6.5px;
    color: #fff;
}

/* Image / Video bento: node chip over the slideshow */
.sm-bx-nodechip {
    max-width: 360px;
    border-radius: 10px;
    border: 1px solid rgba(188, 72, 240, 0.45);
    background: rgba(20, 26, 30, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.sm-bx-nodechip-head {
    font-size: 8.5px;
    padding: 6px 8px;
}

.sm-bx-nodechip-head .sm-bx-gen-model {
    margin-left: auto;
    font-size: 8px;
}

.sm-bx-nodechip-cost {
    font: 500 8px/1 Inter, system-ui, sans-serif;
    letter-spacing: 0;
    color: rgba(243, 232, 255, 0.7);
}

.sm-bx-nodechip-body {
    padding: 7px 9px 9px;
    font: 400 10px/1.45 Inter, system-ui, sans-serif;
    color: #d5e2ea;
    min-height: 2.9em;
}

/* Estimate + heal crops. Same markup in the card and the deep dive. */
.sm-bx-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(118px, 46%);
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 8px;
}

.sm-bx-shot {
    position: relative;
    min-width: 0;
    min-height: 0;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0d1215;
}

.sm-bx-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.sm-bx-shot-chip,
.sm-bx-heal-tag {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: calc(100% - 12px);
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(14, 20, 24, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 7.5px;
    white-space: nowrap;
}

.sm-bx-shot-chip {
    left: 6px;
    bottom: 6px;
    color: var(--sm-text);
}

.sm-bx-shot-chip .sm-ico,
.sm-bx-heal-tag {
    color: var(--sm-teal);
}

.sm-bx-shot-chip .sm-ico {
    width: 8px;
    height: 8px;
}

.sm-bx-heal-ring {
    position: absolute;
    z-index: 1;
    left: 46%;
    top: 30%;
    width: 34%;
    height: 24%;
    border: 1.5px dashed #00C0B4;
    border-radius: 4px;
    background: rgba(0, 192, 180, 0.22);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.sm-bx-heal-tag {
    left: 46%;
    top: 24%;
    color: #d9fffa;
}

.sm-bx-sidepanel {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    min-height: 0;
    padding: 7px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(24, 31, 36, 0.97);
    overflow: hidden;
}

.sm-bx-sidepanel-head {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sm-bx-sidepanel .sm-bx-dialog-label {
    margin-top: 2px;
}

.sm-bx-sidepanel-note {
    margin: 2px 0 0;
    font-size: 7.5px;
    line-height: 1.35;
    color: var(--sm-muted);
}

.sm-bx-tools,
.sm-bx-compare {
    display: flex;
    gap: 3px;
}

.sm-bx-tools span,
.sm-bx-compare span {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 7.5px;
    color: var(--sm-muted);
}

.sm-bx-tools span.is-on,
.sm-bx-compare span.is-on {
    border-color: rgba(0, 192, 180, 0.45);
    background: rgba(0, 192, 180, 0.12);
    color: #d9fffa;
}

.sm-bx-models {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
}

.sm-bx-model {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    height: 16px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 8px;
}

.sm-bx-model span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.sm-bx-model .sm-ico {
    width: 8px;
    height: 8px;
}

.sm-bx-model em {
    font-style: normal;
    color: var(--sm-muted);
}

.sm-bx-model.is-on {
    background: rgba(0, 192, 180, 0.12);
}

.sm-bx-model.is-on em {
    color: var(--sm-teal);
}

.sm-bx-cost {
    margin-top: auto;
    padding: 5px 6px;
    border-radius: 6px;
    background: rgba(0, 192, 180, 0.07);
}

.sm-bx-cost-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 7.5px;
    color: var(--sm-muted);
}

.sm-bx-cost-base {
    display: none;
}

.sm-bx-cost-row em {
    font-style: normal;
}

.sm-bx-cost-row.is-final strong {
    color: var(--sm-teal);
    font-size: 8px;
}

.sm-bx-sidepanel .sm-bx-dialog-actions {
    margin-top: 2px;
}

@container (min-width: 460px) {
    .sm-bx-split {
        grid-template-columns: minmax(0, 1.1fr) minmax(168px, 0.9fr);
        padding: 14px;
        gap: 12px;
    }

    .sm-bx-cost-base {
        display: flex;
        margin-bottom: 3px;
    }

    .sm-bx-sidepanel-head,
    .sm-bx-model,
    .sm-bx-cost-row.is-final strong {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sm-bx-cursor,
    .sm-bx-wire {
        animation: none;
    }
}

.sm-bx-camp {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.35fr);
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 8px;
}

.sm-bx-camp-source,
.sm-bx-camp-tile,
.sm-bx-camp-range {
    position: relative;
    min-width: 0;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0d1215;
}

.sm-bx-camp-source {
    display: flex;
    flex-direction: column;
}

.sm-bx-camp-source img,
.sm-bx-camp-tile img,
.sm-bx-camp-range img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sm-bx-camp-source img {
    flex: 1;
    min-height: 0;
}

.sm-bx-camp-k,
.sm-bx-camp-tile figcaption,
.sm-bx-camp-range figcaption {
    position: absolute;
    left: 6px;
    bottom: 6px;
    z-index: 2;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(8, 14, 18, 0.78);
    color: #d5e2ea;
    font: 600 9px/1.3 Inter, system-ui, sans-serif;
}

.sm-bx-camp-k {
    top: 6px;
    bottom: auto;
    color: #5eead4;
}

.sm-bx-camp-source .sm-bx-shot-chip {
    position: absolute;
    left: 6px;
    bottom: 6px;
}

.sm-bx-camp-outs {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-rows: 1.05fr 0.95fr;
    gap: 8px;
    min-width: 0;
    min-height: 0;
}

.sm-bx-camp-outs > .sm-bx-camp-tile:first-child {
    grid-column: 1 / -1;
}

.sm-bx-camp-range {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
}

.sm-bx-camp-tile .sm-bx-play {
    top: 42%;
}
