/* V5.6.12: scoped home behavior. Preserve the approved type, brand and palette. */
[data-sbi-v53-root] .sbi-faq-item { box-sizing: border-box; }

/* The offscreen reservation probe must measure natural, unanimated answers. */
[data-sbi-v53-root] .sbi-faq-measure .sbi-faq-item { height: auto !important; }
[data-sbi-v53-root] .sbi-faq-measure .sbi-faq-item > p { opacity: 1 !important; }
[data-sbi-v53-root] .sbi-visual-card[data-visual-kind="client"]:not(a):not(button) { cursor: default; }

/* V5.6.13: one image preview system for every Content Library client.
   Bound height through width so mobile and tall images retain their ratio. */
[data-sbi-v53-root] .sbi-visual-card[data-sbi-image-preview="true"] {
    width: min(clamp(15rem, calc(26vw * var(--sbi-preview-ratio, .8)), 38rem), calc(34rem * var(--sbi-preview-ratio, .8)));
    max-width: 82vw;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: var(--sbi-preview-ratio, .8);
}
[data-sbi-v53-root] .sbi-visual-card[data-sbi-image-preview="true"] .sbi-visual-image {
    object-fit: contain;
    transform: none;
}
[data-sbi-v53-root] .sbi-visual-controls {
    position: absolute;
    z-index: 3;
    inset: 1rem 1rem auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    pointer-events: none;
}
[data-sbi-v53-root] .sbi-visual-controls :is(.sbi-visual-type, .sbi-visual-open) {
    position: static;
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.25;
}
[data-sbi-v53-root] .sbi-visual-controls .sbi-visual-open { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
    [data-sbi-v53-root] .sbi-faq-item,
    [data-sbi-v53-root] .sbi-faq-plus::after { transition: none; }
}

/* Registry archives remove the complete selected-work grid cell. */
[data-sbi-v53-root] .sbi-selected-work-item[hidden],
[data-sbi-v53-root] article.sbi-selected-work-card[hidden] { display: none !important; }

/* V5.6.17: archive-only layout. Keep the complete source frame and a compact
   metadata row on mobile, rather than stacking a large second action panel.
   The complete card remains the native, generously sized interactive target. */
[data-sbi-v53-root] .sbi-visual-media,
[data-sbi-v53-root] .sbi-visual-meta { display: contents; }
[data-sbi-v53-root] .sbi-visual-open-icon {
    display: inline-flex;
    flex: 0 0 .9rem;
    width: .9rem;
    height: .9rem;
    align-items: center;
}
[data-sbi-v53-root] .sbi-visual-open-icon svg { display: block; width: 100%; height: 100%; }
[data-sbi-v53-root] .sbi-visual-stage,
[data-sbi-v53-root] .sbi-visual-card { touch-action: pan-y pinch-zoom; }
[data-sbi-v53-root] .sbi-visual-stage.is-motion-ready .sbi-visual-track {
    animation: none;
    transition: none;
}
[data-sbi-v53-root] .sbi-visual-stage.is-dragging,
[data-sbi-v53-root] .sbi-visual-stage.is-dragging .sbi-visual-card {
    cursor: grabbing;
    -webkit-user-select: none;
    user-select: none;
}
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll {
    overflow-x: auto;
    touch-action: pan-x pan-y pinch-zoom;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 1rem;
}
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-card { touch-action: pan-x pan-y pinch-zoom; }
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-plane {
    width: max-content;
    min-width: 100%;
    margin-left: 0;
    transform: none;
}
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-track {
    width: max-content;
    min-width: 100%;
    justify-content: flex-start;
    animation: none;
    transform: none;
}
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-group {
    justify-content: flex-start;
    padding-inline: 1rem;
}
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-group[aria-hidden="true"] { display: none; }
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-card { scroll-snap-align: center; }
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll.is-dragging { scroll-snap-type: none; }

/* V5.6.19: let the mobile browser own the scrolling viewport, not a huge
   transformed GPU layer. The desktop tilt/hover presentation is unchanged. */
[data-sbi-v53-root] .sbi-visual-stage.is-native-loop {
    scroll-snap-type: none;
    scroll-behavior: auto;
    overflow-anchor: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
[data-sbi-v53-root] .sbi-visual-stage.is-native-loop::-webkit-scrollbar { display: none; }
[data-sbi-v53-root] .sbi-visual-stage.is-native-loop .sbi-visual-group {
    flex: none;
    padding-left: 0;
    padding-right: 1rem;
}
[data-sbi-v53-root] .sbi-visual-stage.is-native-loop .sbi-visual-group[aria-hidden="true"] { display: flex; }
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-track { will-change: auto; }
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-card,
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-card:is(:hover,:focus-visible,.is-selected) {
    transform: none;
    transition: border-color .2s ease;
}
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-image,
[data-sbi-v53-root] .sbi-visual-stage.is-native-scroll .sbi-visual-card:is(:hover,.is-selected) .sbi-visual-image {
    filter: none;
    transform: none;
    transition: none;
}

@media (max-width: 1024px) {
    [data-sbi-v53-root] .sbi-visual-card,
    [data-sbi-v53-root] .sbi-visual-card[data-sbi-image-preview="true"] {
        display: flex;
        flex-direction: column;
        width: min(88vw, calc(40rem * var(--sbi-preview-ratio, var(--sbi-visual-media-ratio, 1.25))));
        max-width: 88vw;
        height: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: auto;
        border-radius: 1.25rem;
        text-align: left;
        opacity: 1;
    }
    [data-sbi-v53-root] .sbi-visual-media {
        position: relative;
        display: block;
        flex: none;
        width: 100%;
        overflow: hidden;
        aspect-ratio: var(--sbi-preview-ratio, var(--sbi-visual-media-ratio, 1.25));
    }
    [data-sbi-v53-root] .sbi-visual-card .sbi-visual-image {
        object-fit: contain;
        transform: none;
    }
    [data-sbi-v53-root] .sbi-visual-card .sbi-visual-shade { display: none; }
    [data-sbi-v53-root] .sbi-visual-meta {
        display: grid;
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: 'category category' 'title action';
        align-items: center;
        gap: .3rem .75rem;
        padding: .7rem .85rem .8rem;
        border-top: 1px solid rgba(255, 255, 255, .1);
        background: #0b0711;
    }
    [data-sbi-v53-root] .sbi-visual-controls {
        display: contents;
    }
    [data-sbi-v53-root] .sbi-visual-controls .sbi-visual-type {
        grid-area: category;
        min-width: 0;
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        color: rgba(216, 189, 255, .9);
        background: transparent;
        backdrop-filter: none;
        font-size: .625rem;
        letter-spacing: .045em;
        line-height: 1.4;
        white-space: normal;
    }
    [data-sbi-v53-root] .sbi-visual-controls .sbi-visual-open {
        grid-area: action;
        justify-self: end;
        min-width: 0;
        max-width: 7rem;
        min-height: 0;
        gap: .3rem;
        margin: 0;
        padding: .2rem 0 .2rem .2rem;
        border: 0;
        border-radius: 0;
        color: #d8bdff;
        background: transparent;
        font-size: .625rem;
        letter-spacing: .035em;
        line-height: 1.35;
        backdrop-filter: none;
        transform: none;
    }
    [data-sbi-v53-root] .sbi-visual-card[data-visual-kind="client"] .sbi-visual-open {
        color: rgba(255, 255, 255, .6);
    }
    [data-sbi-v53-root] .sbi-visual-open > span {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    [data-sbi-v53-root] .sbi-visual-card .sbi-visual-label {
        grid-area: title;
        position: static;
        display: block;
        min-width: 0;
        max-width: 100%;
        font-size: clamp(1.0625rem, 2.3vw, 1.3rem);
        line-height: 1.2;
        letter-spacing: -.025em;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    /* Bound portrait height through width, keeping the complete source frame
       and the metadata's natural height outside that aspect ratio. */
    [data-sbi-v53-root] .sbi-visual-card,
    [data-sbi-v53-root] .sbi-visual-card[data-sbi-image-preview="true"] {
        width: min(88vw, 42rem, calc(35rem * var(--sbi-preview-ratio, var(--sbi-visual-media-ratio, 1.25))));
    }
}

/* V5.6.18: the proof invitation has one clear telephone action. Keep the
   complete card clickable while grouping the phone icon with its number. */
[data-sbi-v53-root] a.sbi-proof-call.sbi-proof-call--compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem 2rem;
    min-height: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(197, 156, 255, .22);
    border-radius: 1.25rem;
    background: #140f1c;
    text-align: left;
}
[data-sbi-v53-root] .sbi-proof-call--compact .sbi-proof-call-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: start;
    gap: .5rem;
    text-align: left;
}
[data-sbi-v53-root] .sbi-proof-call--compact .sbi-proof-call-label {
    grid-column: auto;
    color: rgba(216, 189, 255, .8);
    font-size: .625rem;
    line-height: 1.4;
    letter-spacing: .1em;
}
[data-sbi-v53-root] .sbi-proof-call--compact .sbi-proof-call-title {
    color: #fff;
    font-size: clamp(1.375rem, 2.4vw, 2rem);
    line-height: 1.16;
    letter-spacing: -.025em;
    text-transform: none;
    overflow-wrap: anywhere;
}
[data-sbi-v53-root] .sbi-proof-call--compact .sbi-proof-call-note {
    grid-column: auto;
    max-width: 38ch;
    margin: 0;
    color: rgba(255, 255, 255, .64);
    font-size: .875rem;
    line-height: 1.55;
    text-wrap: pretty;
}
[data-sbi-v53-root] .sbi-proof-call--compact .sbi-proof-call-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    gap: .625rem;
    min-width: 0;
    min-height: 48px;
    padding: .75rem 1rem;
    border: 1px solid rgba(216, 189, 255, .24);
    border-radius: 999px;
    color: #e5d2ff;
    background: rgba(197, 156, 255, .1);
}
[data-sbi-v53-root] .sbi-proof-call--compact .sbi-proof-call-icon {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: inherit;
}
[data-sbi-v53-root] .sbi-proof-call--compact .sbi-proof-call-number {
    color: inherit;
    font-size: .9375rem;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
[data-sbi-v53-root] a.sbi-proof-call.sbi-proof-call--compact:is(:hover, :focus-visible) {
    background: #1c1426;
    border-color: rgba(197, 156, 255, .6);
}
@media (max-width: 767px) {
    [data-sbi-v53-root] a.sbi-proof-call.sbi-proof-call--compact {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.1rem;
        padding: 1.25rem;
    }
    [data-sbi-v53-root] .sbi-proof-call--compact .sbi-proof-call-action {
        justify-self: start;
    }
}
@media (forced-colors: active) {
    [data-sbi-v53-root] a.sbi-proof-call.sbi-proof-call--compact,
    [data-sbi-v53-root] .sbi-proof-call--compact .sbi-proof-call-action {
        border-color: LinkText;
        background: Canvas;
    }
    [data-sbi-v53-root] .sbi-proof-call--compact :is(.sbi-proof-call-label, .sbi-proof-call-title, .sbi-proof-call-note, .sbi-proof-call-number, .sbi-proof-call-icon) {
        color: LinkText;
    }
}
