.bfba {
    --bfba-border-width: var(--section-border, 2px);
    --bfba-radius: var(--card-radius, 24px);
    --bfba-gap: var(--site-grid-gap, 1rem);
    --bfba-button-border: var(--button-border-color, #111);
    --bfba-button-bg: var(--button-bg-color, #fff);
    --bfba-button-text: var(--button-text-color, #111);
    --bfba-button-hover-bg: var(--button-hover-bg-color, #111);
    --bfba-button-hover-text: var(--button-hover-text-color, #fff);
    --bfba-font-nav: var(--font-family-navigation, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --bfba-font-body: var(--font-family-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --bfba-position: 50%;
    --bfba-object-x: 50%;
    --bfba-object-y: 50%;
    display: block;
    margin: 0 0 var(--bfba-gap);
    font-family: var(--bfba-font-body);
}

.bfba-stage,
.bfba-side-grid {
    border: var(--bfba-border-width) solid var(--bfba-button-border);
    border-radius: var(--bfba-radius);
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

.bfba-stage {
    position: relative;
    aspect-ratio: var(--bfba-aspect-ratio, 16 / 9);
    width: 100%;
    touch-action: none;
    user-select: none;
}

.bfba-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bfba-layer--before {
    z-index: 1;
}

.bfba-layer--after {
    z-index: 2;
    clip-path: inset(0 0 0 var(--bfba-position));
}

.bfba--hover .bfba-layer--after {
    clip-path: none;
    opacity: 0;
    transition: opacity 220ms ease-in-out;
}

.bfba--hover.bfba--reveal-hover .bfba-stage:hover .bfba-layer--after,
.bfba--hover.bfba--reveal-hover .bfba-stage:focus .bfba-layer--after,
.bfba--hover.bfba--reveal-hover .bfba-stage:focus-within .bfba-layer--after,
.bfba--hover.bfba--reveal-auto .bfba-stage:hover .bfba-layer--after,
.bfba--hover.bfba--reveal-auto .bfba-stage:focus .bfba-layer--after,
.bfba--hover.bfba--reveal-auto .bfba-stage:focus-within .bfba-layer--after,
.bfba--hover.is-revealed .bfba-layer--after {
    opacity: 1;
}

.bfba-media {
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
    object-position: var(--bfba-object-x, 50%) var(--bfba-object-y, 50%);
}

.bfba-side-panel {
    --bfba-panel-object-x: var(--bfba-object-x, 50%);
    --bfba-panel-object-y: var(--bfba-object-y, 50%);
}

.bfba-side-panel .bfba-media {
    object-position: var(--bfba-panel-object-x, var(--bfba-object-x, 50%)) var(--bfba-panel-object-y, var(--bfba-object-y, 50%));
}

.bfba--fit-cover .bfba-media {
    object-fit: cover;
}

.bfba--fit-contain .bfba-media {
    object-fit: contain;
    background: #000;
}

.bfba-label,
.bfba-hover-hint {
    position: absolute;
    z-index: 4;
    left: 1rem;
    top: 1rem;
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
    border: var(--bfba-border-width) solid var(--bfba-button-border);
    border-radius: 999px;
    background: var(--bfba-button-bg);
    color: var(--bfba-button-text);
    font-family: var(--bfba-font-nav);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bfba-label--after {
    left: auto;
    right: 1rem;
}

.bfba--hover .bfba-layer--before .bfba-label,
.bfba--hover .bfba-layer--after .bfba-label {
    left: 50%;
    right: auto;
    top: 1rem;
    transform: translateX(-50%);
    transition: opacity 220ms ease-in-out;
}

.bfba--hover.bfba--reveal-hover .bfba-stage:hover .bfba-layer--before .bfba-label,
.bfba--hover.bfba--reveal-hover .bfba-stage:focus .bfba-layer--before .bfba-label,
.bfba--hover.bfba--reveal-hover .bfba-stage:focus-within .bfba-layer--before .bfba-label,
.bfba--hover.bfba--reveal-auto .bfba-stage:hover .bfba-layer--before .bfba-label,
.bfba--hover.bfba--reveal-auto .bfba-stage:focus .bfba-layer--before .bfba-label,
.bfba--hover.bfba--reveal-auto .bfba-stage:focus-within .bfba-layer--before .bfba-label,
.bfba--hover.is-revealed .bfba-layer--before .bfba-label {
    opacity: 0;
}

.bfba-hover-hint {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity 180ms ease;
}

.bfba--hover.bfba--reveal-hover .bfba-stage:hover .bfba-hover-hint,
.bfba--hover.bfba--reveal-hover .bfba-stage:focus .bfba-hover-hint,
.bfba--hover.bfba--reveal-hover .bfba-stage:focus-within .bfba-hover-hint,
.bfba--hover.bfba--reveal-auto .bfba-stage:hover .bfba-hover-hint,
.bfba--hover.bfba--reveal-auto .bfba-stage:focus .bfba-hover-hint,
.bfba--hover.bfba--reveal-auto .bfba-stage:focus-within .bfba-hover-hint,
.bfba--hover.is-revealed .bfba-hover-hint {
    opacity: 0;
}

.bfba-handle {
    position: absolute;
    z-index: 6;
    inset-block: 0;
    left: var(--bfba-position);
    width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bfba-button-text);
    cursor: ew-resize;
    transform: translateX(-50%);
}

.bfba-handle:focus-visible .bfba-handle-knob {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.bfba-handle-line {
    position: absolute;
    inset-block: 0;
    left: 50%;
    width: var(--bfba-border-width);
    min-width: 2px;
    background: var(--bfba-button-border);
    transform: translateX(-50%);
}

.bfba-handle-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3.1rem;
    height: 3.1rem;
    display: grid;
    place-items: center;
    border: var(--bfba-border-width) solid var(--bfba-button-border);
    border-radius: 999px;
    background: var(--bfba-button-bg);
    color: var(--bfba-button-text);
    font-family: var(--bfba-font-nav);
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.bfba-handle:hover .bfba-handle-knob {
    background: var(--bfba-button-hover-bg);
    color: var(--bfba-button-hover-text);
}

.bfba-side-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.bfba-side-panel {
    position: relative;
    aspect-ratio: var(--bfba-aspect-ratio, 16 / 9);
    min-width: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.bfba-side-panel.is-panning {
    cursor: grabbing;
}

.bfba-side-panel + .bfba-side-panel {
    border-left: var(--bfba-border-width) solid var(--bfba-button-border);
}

.bfba-notice {
    border: 2px solid #b32d2e;
    border-radius: 14px;
    padding: 1rem;
    background: #fff;
    color: #1d2327;
}

@media (max-width: 700px) {
    .bfba-side-grid {
        grid-template-columns: 1fr;
    }

    .bfba-side-panel.is-panning {
        cursor: grabbing;
    }

    .bfba-side-panel + .bfba-side-panel {
        border-left: 0;
        border-top: var(--bfba-border-width) solid var(--bfba-button-border);
    }

    .bfba-label,
    .bfba-hover-hint {
        font-size: 0.72rem;
        min-height: 1.75rem;
        padding: 0.3rem 0.6rem;
    }

    .bfba-handle-knob {
        width: 2.7rem;
        height: 2.7rem;
    }
}

.bfba-iframe-shell {
    position: absolute;
    inset: 0 auto auto 0;
    width: var(--bfba-iframe-width, 1500px);
    height: 100%;
    transform-origin: top left;
    background: #fff;
}

.bfba-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

.bfba-iframe-load {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.55rem 1rem;
    border: var(--bfba-border-width) solid var(--bfba-button-border);
    border-radius: 999px;
    background: var(--bfba-button-bg);
    color: var(--bfba-button-text);
    font-family: var(--bfba-font-nav);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.bfba-iframe-load:hover,
.bfba-iframe-load:focus-visible {
    background: var(--bfba-button-hover-bg);
    color: var(--bfba-button-hover-text);
}

.bfba-iframe-shell.is-loaded .bfba-iframe-load {
    display: none;
}


@media (hover: none), (pointer: coarse) {
    .bfba--hover.bfba--reveal-auto .bfba-stage:hover .bfba-layer--after,
    .bfba--hover.bfba--reveal-auto .bfba-stage:focus .bfba-layer--after,
    .bfba--hover.bfba--reveal-auto .bfba-stage:focus-within .bfba-layer--after {
        opacity: 0;
    }

    .bfba--hover.bfba--reveal-auto.is-revealed .bfba-layer--after {
        opacity: 1;
    }

    .bfba--hover.bfba--reveal-auto .bfba-stage:hover .bfba-layer--before .bfba-label,
    .bfba--hover.bfba--reveal-auto .bfba-stage:focus .bfba-layer--before .bfba-label,
    .bfba--hover.bfba--reveal-auto .bfba-stage:focus-within .bfba-layer--before .bfba-label {
        opacity: 1;
    }

    .bfba--hover.bfba--reveal-auto.is-revealed .bfba-layer--before .bfba-label {
        opacity: 0;
    }

    .bfba--hover.bfba--reveal-auto .bfba-stage:hover .bfba-hover-hint,
    .bfba--hover.bfba--reveal-auto .bfba-stage:focus .bfba-hover-hint,
    .bfba--hover.bfba--reveal-auto .bfba-stage:focus-within .bfba-hover-hint {
        opacity: 1;
    }

    .bfba--hover.bfba--reveal-auto.is-revealed .bfba-hover-hint {
        opacity: 0;
    }
}

.bfba--click-reveal-enabled .bfba-stage {
    cursor: pointer;
}

.bfba-set {
    display: grid;
    gap: 0.75rem;
}

.bfba-set-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.bfba-set-selector__label {
    color: var(--bfba-button-text, #111);
    font-family: var(--bfba-font-nav, inherit);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bfba-set-selector__select {
    appearance: auto;
    min-height: 2.65rem;
    min-width: min(100%, 18rem);
    max-width: 100%;
    border: var(--bfba-border-width, 2px) solid var(--bfba-button-border, currentColor);
    border-radius: 999px;
    background: var(--bfba-button-bg, #fff);
    color: var(--bfba-button-text, #111);
    cursor: pointer;
    font-family: var(--bfba-font-nav, inherit);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.1;
    padding: 0.55rem 1rem;
}

.bfba-set-selector__select:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .bfba-set-selector {
        align-items: stretch;
        justify-content: stretch;
    }

    .bfba-set-selector__label,
    .bfba-set-selector__select {
        width: 100%;
    }
}

.bfba-set--smooth .bfba-layer,
.bfba-set--smooth .bfba-label,
.bfba-set--smooth .bfba-set-note {
    transition: opacity 160ms ease-in-out;
}

.bfba-set--smooth.is-switching .bfba-layer,
.bfba-set--smooth.is-switching .bfba-label,
.bfba-set--smooth.is-switching .bfba-set-note {
    opacity: 0.18;
}

.bfba-set-note {
    border: var(--bfba-border-width, 2px) solid var(--bfba-button-border, currentColor);
    border-radius: calc(var(--bfba-radius, 24px) * 0.65);
    background: var(--bfba-button-bg, #fff);
    color: var(--bfba-button-text, #111);
    padding: 0.75rem 1rem;
    font-family: var(--bfba-font-body, inherit);
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: pre-line;
}

.bfba-set-note[hidden] {
    display: none;
}

.bfba-set-note p {
    margin: 0 0 0.6rem;
}

.bfba-set-note p:last-child {
    margin-bottom: 0;
}

.bfba-set-selector__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
    justify-content: center;
    width: 100%;
}

.bfba-set-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.65rem;
    border: var(--bfba-border-width, 2px) solid var(--bfba-button-border, currentColor);
    border-radius: 999px;
    background: var(--bfba-button-bg, #fff);
    color: var(--bfba-button-text, #111);
    cursor: pointer;
    font-family: var(--bfba-font-nav, inherit);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.1;
    padding: 0.5rem 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bfba-set-choice:hover,
.bfba-set-choice:focus-visible,
.bfba-set-choice.is-active {
    background: var(--bfba-button-hover-bg, #111);
    color: var(--bfba-button-hover-text, #fff);
}

.bfba-set-choice:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.bfba-set--selector-thumbs .bfba-set-choice {
    border-radius: calc(var(--bfba-radius, 24px) * 0.65);
    padding: 0.45rem 0.65rem;
    text-align: left;
}

.bfba-set-choice__thumbs {
    display: grid;
    grid-template-columns: repeat(2, 2.7rem);
    gap: 0.2rem;
    flex: 0 0 auto;
}

.bfba-set-choice__thumbs img {
    width: 2.7rem;
    height: 2.7rem;
    display: block;
    border: 1px solid currentColor;
    border-radius: 0.45rem;
    object-fit: cover;
    background: #fff;
}

.bfba-set-choice__label {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 700px) {
    .bfba-set-selector__choices,
    .bfba-set-choice {
        width: 100%;
    }

    .bfba-set-choice {
        justify-content: center;
    }

    .bfba-set--selector-thumbs .bfba-set-choice {
        justify-content: flex-start;
    }
}

.bfba-set-progression {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.bfba-set-progress-button,
.bfba-set-progress-step {
    border: var(--bfba-border-width, 2px) solid var(--bfba-button-border, currentColor);
    background: var(--bfba-button-bg, #fff);
    color: var(--bfba-button-text, #111);
    cursor: pointer;
    font-family: var(--bfba-font-nav, inherit);
    font-weight: 900;
    line-height: 1;
}

.bfba-set-progress-button {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-size: 1.25rem;
}

.bfba-set-progress-button--play {
    width: auto;
    min-width: 3.5rem;
    padding-inline: 0.9rem;
    font-size: 0.95rem;
}

.bfba-set-progress-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-left: 0.25rem;
}

.bfba-set-progress-step {
    width: 2.05rem;
    height: 2.05rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-size: 0.78rem;
}

.bfba-set-progress-button:hover,
.bfba-set-progress-button:focus-visible,
.bfba-set-progress-button.is-playing,
.bfba-set-progress-step:hover,
.bfba-set-progress-step:focus-visible,
.bfba-set-progress-step.is-active {
    background: var(--bfba-button-hover-bg, #111);
    color: var(--bfba-button-hover-text, #fff);
}

.bfba-set-progress-button:focus-visible,
.bfba-set-progress-step:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .bfba-set-progression,
    .bfba-set-progress-steps {
        width: 100%;
    }

    .bfba-set-progress-steps {
        margin-left: 0;
    }
}

/* v01.20 Comparison Set refinements */
.bfba-set-note[hidden],
.bfba-set-note:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.bfba-set-progression {
    gap: 0.75rem;
}

.bfba-set-progress-button,
.bfba-set-progress-step {
    appearance: none;
    border: 0;
    background: transparent;
    color: currentColor;
    padding: 0.2rem 0.35rem;
    min-width: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    text-decoration: none;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0.72;
}

.bfba-set-progress-button:hover,
.bfba-set-progress-button:focus-visible,
.bfba-set-progress-button.is-playing,
.bfba-set-progress-step:hover,
.bfba-set-progress-step:focus-visible,
.bfba-set-progress-step.is-active {
    background: transparent;
    color: currentColor;
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.bfba-set-progress-button--play {
    width: auto;
    min-width: 0;
    padding-inline: 0.35rem;
    font-size: 0.9rem;
}

.bfba-set-progress-steps {
    gap: 0.45rem;
}

.bfba-set-progress-step span {
    display: inline;
}

.bfba-set-side-by-side {
    margin: 0;
}

.bfba-set-side-by-side__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--bfba-gap, 1rem);
    align-items: stretch;
}

.bfba-set-side-by-side__panel {
    position: relative;
    aspect-ratio: var(--bfba-aspect-ratio, 16 / 9);
    overflow: hidden;
    border: var(--bfba-border-width, 2px) solid var(--bfba-border-color, currentColor);
    border-radius: var(--bfba-radius, 1rem);
    background: var(--bfba-surface, #fff);
}

.bfba-set-side-by-side__panel .bfba-media {
    width: 100%;
    height: 100%;
    object-fit: var(--bfba-object-fit, cover);
    object-position: var(--bfba-object-x, 50%) var(--bfba-object-y, 50%);
    display: block;
}

.bfba-set--layout-side_by_side.bfba--fit-contain .bfba-media,
.bfba-set--layout-side_by_side .bfba--fit-contain .bfba-media {
    object-fit: contain;
}

.bfba-set-side-by-side__badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    transform: translate(-50%, -50%);
    display: inline-grid;
    place-items: center;
    min-width: 3.25rem;
    min-height: 3.25rem;
    padding: 0.45rem 0.65rem;
    border: var(--bfba-border-width, 2px) solid var(--bfba-border-color, currentColor);
    border-radius: 999px;
    background: var(--bfba-badge-bg, #fff);
    color: var(--bfba-badge-text, #111);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.14);
}

@media (max-width: 700px) {
    .bfba-set-side-by-side__grid {
        grid-template-columns: 1fr;
    }

    .bfba-set-side-by-side__badge {
        top: 50%;
    }
}

/* v01.21 Comparison Set side-by-side + note-flow fixes */
.bfba-set .bfba-set-note {
    width: 100%;
    box-sizing: border-box;
}

.bfba-set > .bfba-set-note {
    margin-top: 0;
}

.bfba-set-side-by-side__panel picture,
.bfba-set-side-by-side__panel picture img {
    width: 100%;
    height: 100%;
    display: block;
}

.bfba-set-side-by-side__panel picture img {
    object-fit: inherit;
    object-position: inherit;
}

.bfba-set-side-by-side__panel > .bfba-media:not([data-bfba-set-before-media]):not([data-bfba-set-after-media]) {
    display: none !important;
}

/* v01.22 Comparison Set zoom + synced pan */
.bfba-set-zoom-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.92rem;
}

.bfba-set-zoom-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    cursor: pointer;
}

.bfba-set-zoom-button:hover,
.bfba-set-zoom-button:focus-visible {
    text-decoration-thickness: 2px;
}

.bfba-set-zoom-hint {
    opacity: 0.72;
}

.bfba-set--zoom-enabled .bfba-stage,
.bfba-set--zoom-enabled .bfba-set-side-by-side__grid {
    touch-action: none;
}

.bfba-set--zoom-enabled [data-bfba-set-before-media],
.bfba-set--zoom-enabled [data-bfba-set-after-media] {
    transform-origin: center center;
    transition: transform 180ms ease;
    will-change: transform;
}

.bfba-set--zoom-enabled.is-zoomed [data-bfba-set-before-media],
.bfba-set--zoom-enabled.is-zoomed [data-bfba-set-after-media] {
    transform: translate(var(--bfba-set-pan-x, 0px), var(--bfba-set-pan-y, 0px)) scale(var(--bfba-set-zoom-scale, 2));
    cursor: grab;
}

.bfba-set--zoom-enabled.is-panning [data-bfba-set-before-media],
.bfba-set--zoom-enabled.is-panning [data-bfba-set-after-media] {
    cursor: grabbing;
    transition: none;
}
