/* compact-board.css — view-specific board styles */

.sequence-head,
        .sequence-row {
            position: relative;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 18px;
            padding: 8px 0;
        }

.sequence-head.business-only,
        .sequence-row.business-only {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

.sequence-head {
            order: 1;
            align-items: center;
            min-height: 50px;
            height: 50px;
            padding: 0;
            box-sizing: border-box;
        }

.sequence-grid:not(:has(.compact-placed-row)) > .sequence-head {
            z-index: 3;
        }

.sequence-grid:not(:has(.compact-placed-row)) > .sequence-head + .sequence-row {
            margin-top: 0;
        }

.sequence-row {
            order: 3;
            position: relative;
            z-index: 1;
        }

.results-window.is-keep-top .sequence-row.is-match {
            order: 2;
        }

.sequence-cell {
            min-width: 0;
            min-height: 72px;
        }

.compact-board .sequence-cell {
            overflow: visible;
        }

.compact-board {
            display: flex;
            flex-direction: column;
            position: relative;
            isolation: isolate;
            margin-top: 0;
            padding-bottom: 32px;
            /*
             * Cards view — one fixed stack step for all 4 columns:
             * 92px card − 13px overlap → 79px top-to-top.
             * Same for placed rows, LAB businesses, +N / M / nested, Expand All.
             */
            --compact-overlap: 13px;
            --compact-child-overlap: 13px;
            --compact-row-overlap: 13px;
        }

.compact-board.is-hidden,
        .sequence-grid.is-hidden {
            display: none;
        }

.compact-placed-row {
            align-items: start;
            position: relative;
            z-index: 1;
            order: unset;
            isolation: isolate;
            /*
             * Placed boards reuse .compact-match for the 4-column grid, but must not
             * inherit its 8px vertical padding — that padding pushes entity/brand/
             * merchant cards down while the LAB business overlay stays at the row top.
             */
            padding: 0;
        }

.compact-board > .brand-column-connector-layer {
            position: absolute;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            overflow: visible;
        }

.brand-column-connector-layer {
            position: absolute;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            overflow: visible;
        }

.brand-column-connector-line {
            position: absolute;
            background: rgba(64, 116, 226, 0.42);
            pointer-events: none;
            z-index: 0;
        }

.brand-column-connector-line.is-horizontal {
            height: 2px;
        }

.brand-column-connector-line.is-vertical {
            width: 2px;
        }

.compact-board .compact-placed-row > .sequence-cell,
        .compact-board .compact-match > .sequence-cell {
            position: relative;
            z-index: 1;
        }

.compact-board .compact-placed-row.has-merchant-reveal-open > .sequence-cell:nth-child(3),
        .compact-board .compact-match.has-merchant-reveal-open > .sequence-cell:nth-child(3),
        .sequence-grid .sequence-row.has-merchant-reveal-open > .sequence-cell:nth-child(3) {
            z-index: 6;
        }

.compact-board .compact-placed-row.has-merchant-reveal-open > .sequence-cell:nth-child(4),
        .compact-board .compact-match.has-merchant-reveal-open > .sequence-cell:nth-child(4),
        .sequence-grid .sequence-row.has-merchant-reveal-open > .sequence-cell:nth-child(4) {
            z-index: 2;
        }

.compact-board .compact-placed-row > .sequence-cell,
        .compact-board .compact-match > .sequence-cell,
        .compact-board .stack-column,
        .compact-board .business-stack-column.stack-column,
        .compact-board .compact-stack-cell,
        .compact-board .compact-extracted-stack,
        .compact-board .placed-dropdown,
        .compact-board .hidden-brand-merchant-panel {
            pointer-events: none;
        }

.compact-board .card[data-relationship-card="true"],
        .compact-board .card.stack-card,
        .compact-board .card.merchant-card,
        .compact-board .entity-card-shell,
        .compact-board .entity-card-shell > .card,
        .compact-board .business-reference,
        .compact-board .business-merchants-actions,
        .compact-board .placed-count-badge,
        .compact-board .hidden-brand-merchant-button,
        .compact-board .response-button,
        .compact-board .card-response-button,
        .compact-board .merchant-response-button,
        .compact-board .business-stack-pin-button,
        .compact-board .business-merchants-control,
        .compact-board .entity-card-actions,
        .compact-board .entity-card-actions .response-button,
        .compact-board .entity-card-actions .entity-wallets-button {
            pointer-events: auto;
        }

.compact-board .business-merchants-response-button {
            pointer-events: auto;
        }

.compact-board .entity-wallets-button,
        .compact-board .entity-card-shell .wallet-dropdown,
        .compact-board .wallet-row-id,
        .compact-board .wallet-row-id-visible {
            pointer-events: auto;
        }

.compact-board:not(:has(.compact-placed-row)) .stack-column > .card.stack-card,
        .compact-board:not(:has(.compact-placed-row)) .stack-column > .entity-card-shell > .card.stack-card,
        .compact-board:not(:has(.compact-placed-row)) .compact-match > .sequence-cell > .card.stack-card,
        .compact-board:not(:has(.compact-placed-row)) .compact-match > .sequence-cell .entity-card-shell > .card.stack-card,
        .compact-board:not(:has(.compact-placed-row)) .compact-match > .sequence-cell > .merchant-position > .card.stack-card {
            pointer-events: auto;
        }

.compact-head,
        .compact-match,
        .compact-columns {
            position: relative;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 18px;
            z-index: 1;
        }

.compact-head {
            order: 1;
            z-index: 1;
            align-items: center;
            min-height: 50px;
            height: 50px;
            padding-bottom: 0;
            box-sizing: border-box;
        }

/*
         * Default merchant-search board (List All Merchants off): keep the header
         * bar separated from the first stack row. Row overlap must not pull stacks
         * up into the 50px header zone (empty compact-before rows used to cause this).
         */
.compact-board:not(:has(.compact-placed-row)) > .compact-head {
            z-index: 3;
        }

.compact-board:not(:has(.compact-placed-row)) > .compact-head + .compact-columns,
        .compact-board:not(:has(.compact-placed-row)) > .compact-head + .compact-match,
        .compact-board:not(:has(.compact-placed-row)) > .compact-head + .compact-after {
            margin-top: 0;
        }

.compact-board:not(:has(.compact-placed-row)) > .compact-columns:not(:has(.card)) + .compact-match,
        .compact-board:not(:has(.compact-placed-row)) > .compact-columns:not(:has(.card)) + .compact-after {
            margin-top: 0;
        }

.compact-before {
            order: 2;
            z-index: 1;
        }

.compact-match {
            order: 3;
            z-index: 2;
        }

.compact-placed-row.is-hover-top {
            z-index: var(--compact-row-hover-z);
        }

.compact-placed-row + .compact-placed-row {
            margin-top: calc(-1 * var(--compact-row-overlap));
        }

.compact-placed-row.has-open-placed-dropdown + .compact-placed-row {
            margin-top: calc(-1 * var(--compact-row-overlap));
        }

.compact-placed-row.has-merchant-extracted-open + .compact-placed-row,
        .compact-match.has-merchant-extracted-open + .compact-placed-row,
        .compact-placed-row.has-merchant-extracted-open + .compact-match,
        .compact-match.has-merchant-extracted-open + .compact-match {
            margin-top: calc(-1 * var(--compact-row-overlap) - var(--merchant-extracted-tail-gap, 0px));
        }

.compact-after {
            order: 4;
            z-index: 3;
        }

/*
         * Default merchant-search board only (compact-before / compact-match / compact-after).
         * Placed boards reorder rows in JS and must not inherit these flex order/z-index rules.
         */

.results-window.is-keep-top .compact-match:not(.compact-placed-row) {
            order: 2;
            z-index: 1;
        }

.results-window.is-keep-top .compact-before {
            order: 3;
            z-index: 2;
        }

.results-window.is-keep-top .compact-after {
            z-index: 3;
        }

.results-window.is-keep-top .compact-before,
        .results-window.is-keep-top .compact-after {
            margin-top: calc(-1 * var(--compact-row-overlap));
        }

/*
         * Keep Top + expanded merchant +N: skip the extra tail-gap pull (it hid row 2+
         * entity/brand stacks) but keep the normal compact row overlap percentage.
         */

.results-window.is-keep-top .compact-board .compact-placed-row.has-merchant-extracted-open + .compact-placed-row,
        .results-window.is-keep-top .compact-board .compact-match.has-merchant-extracted-open + .compact-placed-row,
        .results-window.is-keep-top .compact-board .compact-placed-row.has-merchant-extracted-open + .compact-match,
        .results-window.is-keep-top .compact-board .compact-match.has-merchant-extracted-open + .compact-match {
            margin-top: calc(-1 * var(--compact-row-overlap));
            --merchant-extracted-tail-gap: 0px;
        }

.compact-head.business-only,
        .compact-match.business-only,
        .compact-columns.business-only {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

.compact-match {
            padding: 8px 0;
        }

/*
         * Placed rows use both .compact-match and .compact-placed-row.
         * .compact-match { padding: 8px 0 } must not win — that 8px top/bottom
         * widens the row step while LAB business overlays stay on cardHeight −
         * rowOverlap, so bus stacks look tightened / off the Ent/Brd/Merchant line.
         */
.compact-match.compact-placed-row {
            padding: 0;
        }

.compact-match .stack-card {
            border-color: transparent;
            background:
                linear-gradient(180deg, rgba(234, 243, 255, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
            box-shadow: none;
        }

.compact-match + .compact-columns {
            margin-top: calc(-1 * var(--compact-row-overlap));
        }

.compact-columns + .compact-match {
            margin-top: calc(-1 * var(--compact-row-overlap));
        }

.compact-match .merchant-card {
            border-color: transparent;
            background:
                linear-gradient(180deg, rgba(234, 243, 255, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
        }

.stack-column {
            min-width: 0;
        }

/*
         * Business column — same 13px / 79px step as every other cards-view column.
         */

.compact-board .sequence-cell:first-child > .compact-stack-cell + .compact-stack-cell {
            margin-top: calc(-1 * var(--compact-overlap)) !important;
        }

.compact-board .business-stack-column.stack-column > .compact-stack-cell + .compact-stack-cell {
            margin-top: calc(-1 * var(--compact-overlap)) !important;
        }

/*
         * List All Businesses + multi-row merchant scope: overlay business stacks so
         * entity/brand/merchant rows stay line-by-line from the top.
         */

.results-window.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child.is-business-stack-host {
            position: relative;
            height: var(--compact-card-height);
            min-height: var(--compact-card-height);
            max-height: var(--compact-card-height);
            overflow: visible;
            align-self: start;
            z-index: 6;
        }

.results-window.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child.is-business-stack-spacer {
            height: var(--compact-card-height);
            min-height: var(--compact-card-height);
            max-height: var(--compact-card-height);
            align-self: start;
        }

.results-window.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child.is-business-stack-host > .business-stack-column.stack-column {
            position: absolute !important;
            top: 0;
            left: 0;
            right: 0;
            z-index: 8;
        }

/*
         * LAB business column: same fixed 79px step as Ent/Brd/Merchant
         * (--compact-row-overlap = 13px). Do NOT include
         * --merchant-extracted-tail-gap — that only adjusts sibling rows under
         * the pinned business; unpinned businesses have no sibling relation.
         */
.results-window.is-board-list-businesses-active .board-view--compact .business-stack-column.stack-column > .compact-stack-cell + .compact-stack-cell,
        .results-window.is-board-list-businesses-active .board-view--compact .is-business-stack-host > .business-stack-column.stack-column > .compact-stack-cell + .compact-stack-cell,
        .results-window.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child > .compact-stack-cell + .compact-stack-cell {
            margin-top: calc(-1 * var(--compact-row-overlap)) !important;
        }

/*
         * Merchant rows below the active business must not swallow clicks on the
         * independent business stack overlay in column 1.
         */

.results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(> .sequence-cell.is-business-stack-spacer) {
            pointer-events: none;
        }

.results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(> .sequence-cell.is-business-stack-spacer) > .sequence-cell:nth-child(n+2) {
            pointer-events: auto;
        }

.compact-board .sequence-cell > .compact-stack-cell > .card.business-reference,
        .compact-board .sequence-cell > .compact-stack-cell > .card.board-list-business-reference,
        .compact-board .business-stack-column.stack-column > .card.business-reference,
        .compact-board .business-stack-column.stack-column > .compact-stack-cell > .card.business-reference,
        .compact-board .business-stack-column.stack-column > .compact-stack-cell > .card.board-list-business-reference {
            flex-shrink: 0;
            box-sizing: border-box;
            height: var(--compact-card-height);
            min-height: var(--compact-card-height);
            max-height: var(--compact-card-height);
        }

.compact-board .sequence-cell > .compact-stack-cell:has(.business-reference:hover),
        .compact-board .sequence-cell > .compact-stack-cell:has(.board-list-business-reference:hover),
        .compact-board .business-stack-column.stack-column:has(.card:hover),
        .compact-board .business-stack-column.stack-column:has(.card.is-relation-hover) {
            position: relative;
            z-index: var(--compact-cell-hover-z);
        }

.results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .sequence-cell > .compact-stack-cell > .card.stack-card.business-reference:is(:hover, .is-relation-hover),
        .results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .sequence-cell > .compact-stack-cell > .card.stack-card.board-list-business-reference:is(:hover, .is-relation-hover),
        .results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .business-stack-column.stack-column > .card.stack-card:is(:hover, .is-relation-hover) {
            border-color: transparent;
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.results-window.is-board-list-businesses-active .business-reference:not(.is-active-board-business):not(:hover),
        .results-window.is-board-list-businesses-active .board-list-business-reference:not(.is-active-board-business):not(:hover) {
            user-select: none;
            -webkit-user-select: none;
        }

.results-window.is-board-list-businesses-active .business-reference:is(:hover, .is-active-board-business) .card-content,
        .results-window.is-board-list-businesses-active .board-list-business-reference:is(:hover, .is-active-board-business) .card-content {
            user-select: text;
            -webkit-user-select: text;
        }

.results-window.is-board-list-businesses-active .business-reference:is(:hover, .is-active-board-business) .card-content .field-value,
        .results-window.is-board-list-businesses-active .board-list-business-reference:is(:hover, .is-active-board-business) .card-content .field-value {
            user-select: text;
            -webkit-user-select: text;
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-reference,
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference {
            cursor: default;
            opacity: 1;
            transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-reference:not(.is-active-board-business),
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference:not(.is-active-board-business) {
            background: var(--business-stack-inactive-gradient);
            border-color: rgba(15, 118, 110, 0.12);
            box-shadow: none;
        }

/* Pinned business: fade other inactive stacks 15% more. */
.results-window.is-board-list-businesses-active:has(.compact-stack-cell.is-business-merchants-pinned) .board-view--compact .business-reference:not(.is-active-board-business):not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active:has(.compact-stack-cell.is-business-merchants-pinned) .board-view--compact .board-list-business-reference:not(.is-active-board-business):not(:hover):not(.is-relation-hover) {
            opacity: 0.85;
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-reference:not(.is-active-board-business) .card-content .field-value,
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference:not(.is-active-board-business) .card-content .field-value {
            color: var(--business-stack-inactive-field);
        }

        .results-window.is-board-list-businesses-active .board-view--compact .business-reference.is-active-board-business:not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference.is-active-board-business:not(:hover):not(.is-relation-hover) {
            background: var(--business-stack-active-gradient);
            border: 1px solid transparent;
            border-top: 3px solid rgba(64, 116, 226, 0.44);
        }

.results-window.is-board-list-businesses-active .board-view--compact .sequence-cell > .compact-stack-cell:has(.is-active-board-business),
        .results-window.is-board-list-businesses-active .board-view--compact .business-stack-column.stack-column:has(.is-active-board-business) {
            position: relative;
            z-index: var(--stack-hover-float-z);
        }

.results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell:not(.is-business-merchants-pinned):not(.is-business-merchants-pin-pending) > .business-reference.is-active-board-business:not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell:not(.is-business-merchants-pinned):not(.is-business-merchants-pin-pending) > .board-list-business-reference.is-active-board-business:not(:hover):not(.is-relation-hover) {
            z-index: var(--stack-hover-float-z);
            transform: none;
            box-shadow: var(--business-stack-selected-shadow);
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-reference.is-active-board-business:not(:hover):not(.is-relation-hover) .card-content .field-value,
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference.is-active-board-business:not(:hover):not(.is-relation-hover) .card-content .field-value {
            color: inherit;
        }

.results-window.is-board-list-businesses-active .board-view--compact .sequence-cell > .compact-stack-cell:has(.business-reference:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .sequence-cell > .compact-stack-cell:has(.board-list-business-reference:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .business-stack-column.stack-column:has(.business-reference:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .business-stack-column.stack-column:has(.board-list-business-reference:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .business-stack-column.stack-column:has(.card.is-relation-hover) {
            position: relative;
            z-index: var(--stack-hover-float-z);
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-reference:hover,
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference:hover {
            background: var(--business-stack-active-gradient);
            border: 1px solid transparent;
            border-top: 3px solid rgba(64, 116, 226, 0.44);
            z-index: var(--stack-hover-float-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-reference.is-relation-hover:not(:hover):not(.is-active-board-business),
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference.is-relation-hover:not(:hover):not(.is-active-board-business) {
            background: var(--business-stack-active-gradient);
            border: 1px solid transparent;
            border-top: 3px solid rgba(64, 116, 226, 0.44);
            transform: none;
            box-shadow: none;
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-reference.is-active-board-business.is-relation-hover:not(:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference.is-active-board-business.is-relation-hover:not(:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell:is(.is-business-merchants-pinned, .is-business-merchants-pin-pending) > .business-reference.is-relation-hover:not(:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell:is(.is-business-merchants-pinned, .is-business-merchants-pin-pending) > .board-list-business-reference.is-relation-hover:not(:hover) {
            z-index: var(--stack-hover-float-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

/*
         * Overlay business stack: only suppress row lift when the business card
         * itself is hovered — not when it merely has ID relation highlight.
         */
.results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(.is-business-stack-host .business-reference:hover) > .sequence-cell:nth-child(n+2) .card:is(:hover, .is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(.business-stack-column .business-reference:hover) > .sequence-cell:nth-child(n+2) .card:is(:hover, .is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(.is-business-stack-host .board-list-business-reference:hover) > .sequence-cell:nth-child(n+2) .card:is(:hover, .is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(.business-stack-column .board-list-business-reference:hover) > .sequence-cell:nth-child(n+2) .card:is(:hover, .is-relation-hover) {
            transform: none;
            box-shadow: none;
        }

.results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(.is-business-stack-host .business-reference:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(.business-stack-column .business-reference:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(.is-business-stack-host .board-list-business-reference:hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-placed-row:has(.business-stack-column .board-list-business-reference:hover) {
            z-index: 1;
        }

/*
         * Inline business (same row column): direct business hover must not lift
         * the row; entity/brand/merchant hovers in that row stay normal.
         */
.compact-board .compact-placed-row:has(> .sequence-cell:first-child .business-reference:hover),
        .compact-board .compact-placed-row:has(> .sequence-cell:first-child .board-list-business-reference:hover),
        .compact-board .compact-match:has(> .sequence-cell:first-child .business-reference:hover),
        .compact-board .compact-match:has(> .sequence-cell:first-child .board-list-business-reference:hover) {
            z-index: 1;
        }

.compact-board .compact-placed-row.is-hover-top:has(> .sequence-cell:first-child .business-reference:hover),
        .compact-board .compact-placed-row.is-hover-top:has(> .sequence-cell:first-child .board-list-business-reference:hover),
        .compact-board .compact-match.is-hover-top:has(> .sequence-cell:first-child .business-reference:hover),
        .compact-board .compact-match.is-hover-top:has(> .sequence-cell:first-child .board-list-business-reference:hover) {
            z-index: 1;
        }

.results-window.is-board-list-businesses-active .board-view--compact .sequence-cell > .compact-stack-cell:has(.is-active-board-business:is(:hover, .is-relation-hover)),
        .results-window.is-board-list-businesses-active .board-view--compact .business-stack-column.stack-column:has(.is-active-board-business:is(:hover, .is-relation-hover)) {
            z-index: var(--compact-cell-hover-z);
        }

.results-window.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child > .compact-stack-cell.is-business-merchants-pinned,
        .results-window.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child > .compact-stack-cell.is-business-merchants-pin-pending,
        .results-window.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child .business-stack-column .compact-stack-cell.is-business-merchants-pinned,
        .results-window.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child .business-stack-column .compact-stack-cell.is-business-merchants-pin-pending {
            z-index: var(--business-merchants-pin-z);
        }

/*
         * Pinned LAB business: freeze under the results toolbar while its
         * Ent/Brd/Merchant sibling rows scroll, then leave with the last sibling
         * (sticky range height = sibling rows; flow space stays one card via
         * negative margin — see syncPinnedBusinessColumnStickyRange).
         */
.results-window.is-board-list-businesses-active .board-view--compact .business-pin-sticky-range {
            position: relative;
            z-index: var(--business-merchants-pin-z);
            pointer-events: none;
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-stack-column > .business-pin-sticky-range + .compact-stack-cell {
            margin-top: calc(-1 * var(--compact-row-overlap)) !important;
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-pin-sticky-range > .compact-stack-cell.is-business-merchants-pinned:not(.is-business-merchants-pin-animating):not(.is-business-merchants-pin-pending) {
            position: -webkit-sticky;
            position: sticky;
            top: var(--results-controls-h, 58px);
            z-index: var(--business-merchants-pin-z);
            pointer-events: none;
        }

.results-window.is-account-create-active.is-board-list-businesses-active .board-view--compact .business-pin-sticky-range > .compact-stack-cell.is-business-merchants-pinned:not(.is-business-merchants-pin-animating):not(.is-business-merchants-pin-pending) {
            top: calc(
                var(--account-create-controls-h, 58px)
                + var(--account-create-head-h, 50px)
                + var(--account-create-panel-h, 0px)
            );
        }

.results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pin-animating,
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pin-pending {
            position: relative;
            z-index: var(--business-merchants-pin-z);
            will-change: transform;
        }

.results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pin-animating > .business-reference:not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pin-animating > .board-list-business-reference:not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pin-pending > .business-reference:not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pin-pending > .board-list-business-reference:not(:hover):not(.is-relation-hover) {
            z-index: var(--stack-hover-float-z);
            transform: none;
            box-shadow: var(--business-stack-pinned-shadow);
        }

.results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pinned > .business-reference:not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pinned > .board-list-business-reference:not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pin-pending > .business-reference:not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pin-pending > .board-list-business-reference:not(:hover):not(.is-relation-hover) {
            transform: none;
            box-shadow: var(--business-stack-pinned-shadow);
        }

.results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pinned > .business-reference.is-active-board-business:not(:hover):not(.is-relation-hover),
        .results-window.is-board-list-businesses-active .board-view--compact .compact-stack-cell.is-business-merchants-pinned > .board-list-business-reference.is-active-board-business:not(:hover):not(.is-relation-hover) {
            box-shadow: var(--business-stack-pinned-shadow);
        }

.platform-stacks {
            position: relative;
            display: grid;
            gap: 18px;
            width: 100%;
            margin: 1lh 0 2lh;
        }

.platform-stacks::before {
            content: none;
            position: absolute;
            left: 112px;
            top: 76px;
            bottom: -24px;
            width: 4px;
            border-radius: 999px;
            background:
                linear-gradient(180deg, #93c5fd 0%, #38bdf8 38%, #2563eb 100%);
            box-shadow:
                0 0 0 5px rgba(219, 234, 254, 0.72),
                0 16px 28px rgba(37, 99, 235, 0.24);
        }

.platform-stacks::after {
            content: none;
            position: absolute;
            left: 102px;
            bottom: -37px;
            width: 18px;
            height: 18px;
            border: 4px solid rgba(59, 130, 246, 0.74);
            border-radius: 50%;
            background: #ffffff;
            box-shadow:
                0 0 0 6px rgba(219, 234, 254, 0.74),
                0 8px 18px rgba(37, 99, 235, 0.18);
        }

.platform-stack-row {
            position: relative;
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            grid-template-rows: auto auto;
            gap: 18px;
            align-items: start;
        }

.platform-stack-row::before {
            content: none;
            position: absolute;
            left: 112px;
            top: 72px;
            width: 56px;
            height: 4px;
            border-radius: 999px;
            background: linear-gradient(90deg, #0ea5e9, #60a5fa);
            box-shadow:
                0 0 0 5px rgba(219, 234, 254, 0.58),
                0 6px 14px rgba(37, 99, 235, 0.14);
        }

.platform-stack-row::after {
            content: none;
            position: absolute;
            left: 102px;
            top: 62px;
            width: 18px;
            height: 18px;
            border: 4px solid rgba(59, 130, 246, 0.74);
            border-radius: 50%;
            background: #ffffff;
            box-shadow:
                0 0 0 6px rgba(219, 234, 254, 0.74),
                0 8px 18px rgba(37, 99, 235, 0.18);
        }

.platform-stack-title {
            grid-column: 1;
            grid-row: 1;
            width: 100%;
            margin: 0 0 -8px;
            color: var(--muted);
            font-size: 14px;
            font-weight: 800;
        }

.platform-card-list {
            grid-column: 1;
            grid-row: 2;
            display: grid;
            width: 100%;
            margin: 0;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 12px;
        }

.platform-card-list.platform-card-list--stacked {
            grid-template-columns: minmax(0, 1fr);
            gap: 6px;
        }

.platform-card-list:empty::before {
            content: "Click a Sub-Segment to load Segment";
            color: var(--muted);
            font-size: 13px;
            line-height: 92px;
        }

.platform-stacks .card.stack-card {
            height: 98px;
        }

.platform-stacks .card-content {
            padding-top: 0;
        }

.platform-stacks .stack-card:hover,
        .platform-stacks .card.stack-card:hover,
        .platform-stacks .card.stack-card.is-relation-hover {
            z-index: var(--stack-hover-z);
            transform: none;
            box-shadow: var(--platform-stack-hover-shadow);
        }

.stack-card {
            border-top-color: rgba(64, 116, 226, 0.36);
            border-top-width: 3px;
            background:
                linear-gradient(180deg, rgba(234, 243, 255, 0.92) 0, rgba(255, 255, 255, 0.98) 19px, #ffffff 100%);
            box-shadow:
                0 -8px 0 rgba(226, 239, 255, 0.9),
                0 -12px 20px rgba(64, 116, 226, 0.18),
                0 10px 18px rgba(15, 23, 42, 0.06);
            transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
        }

.stack-card + .stack-card {
            margin-top: -14px;
        }

.compact-board .stack-card + .stack-card {
            margin-top: calc(-1 * var(--compact-overlap));
        }

/*
         * Entity stacks are wrapped in .entity-card-shell, so the generic
         * .stack-card + .stack-card overlap never applies between them. Mirror
         * the overlap on consecutive shells (and a shell after a bare card) so
         * the entity column overlaps like the brand column and rows stay inline.
         */
.compact-board .stack-column > .entity-card-shell + .entity-card-shell,
        .compact-board .stack-column > .card.stack-card + .entity-card-shell,
        .compact-board .stack-column > .entity-card-shell + .card.stack-card {
            margin-top: calc(-1 * var(--compact-overlap));
        }

.compact-board .entity-card-shell:has(> .card:hover),
        .compact-board .entity-card-shell:has(> .card.is-relation-hover) {
            position: relative;
            z-index: var(--compact-cell-hover-z);
        }

.stack-card:hover {
            z-index: 5;
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.card {
            position: relative;
            z-index: 1;
            width: 100%;
            height: 92px;
            padding: 12px 14px 28px;
            border: 1px solid transparent;
            border-radius: 8px;
            background: #ffffff;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
            overflow: hidden;
        }

.card.stack-card {
            border-top: 3px solid rgba(64, 116, 226, 0.44);
            background:
                linear-gradient(180deg, rgba(234, 243, 255, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
            box-shadow: none;
        }

/*
         * Stack chrome = default cursor. Text I-beam only over glyph width
         * (not full line). Double-click on I-beam selects text; elsewhere retrieves.
         */
.board-view .card.stack-card,
        .platform-stacks .card.stack-card,
        .account-creation-panel .card.stack-card,
        .account-creation-drop-cell .card.stack-card {
            cursor: default;
        }

.board-view .card.stack-card > .card-content > .field-value:not(.entity-primary-line):not(.merchant-primary-line):not(.merchant-id-line):not(.brand-primary-line):not(.business-primary-line),
        .platform-stacks .card.stack-card > .card-content > .field-value:not(.entity-primary-line):not(.merchant-primary-line):not(.merchant-id-line):not(.brand-primary-line):not(.business-primary-line),
        .account-creation-panel .card.stack-card > .card-content > .field-value:not(.entity-primary-line):not(.merchant-primary-line):not(.merchant-id-line):not(.brand-primary-line):not(.business-primary-line),
        .account-creation-drop-cell .card.stack-card > .card-content > .field-value:not(.entity-primary-line):not(.merchant-primary-line):not(.merchant-id-line):not(.brand-primary-line):not(.business-primary-line) {
            width: fit-content;
            max-width: 100%;
            cursor: text;
        }

.board-view .entity-primary-line,
        .board-view .merchant-primary-line,
        .board-view .merchant-id-line,
        .board-view .brand-primary-line,
        .board-view .business-primary-line,
        .account-creation-panel .entity-primary-line,
        .account-creation-panel .merchant-primary-line,
        .account-creation-panel .merchant-id-line,
        .account-creation-panel .brand-primary-line,
        .account-creation-panel .business-primary-line,
        .account-creation-drop-cell .entity-primary-line,
        .account-creation-drop-cell .merchant-primary-line,
        .account-creation-drop-cell .merchant-id-line,
        .account-creation-drop-cell .brand-primary-line,
        .account-creation-drop-cell .business-primary-line {
            cursor: default;
        }

.board-view .entity-primary-line .entity-name,
        .board-view .entity-primary-line .entity-country,
        .board-view .merchant-primary-line .merchant-name,
        .board-view .merchant-primary-line .merchant-country,
        .board-view .merchant-id-line .merchant-legacy-id,
        .board-view .merchant-id-line .merchant-id,
        .board-view .brand-primary-line .brand-name,
        .board-view .business-primary-line .business-name,
        .account-creation-panel .entity-primary-line .entity-name,
        .account-creation-panel .entity-primary-line .entity-country,
        .account-creation-panel .merchant-primary-line .merchant-name,
        .account-creation-panel .merchant-primary-line .merchant-country,
        .account-creation-panel .merchant-id-line .merchant-legacy-id,
        .account-creation-panel .merchant-id-line .merchant-id,
        .account-creation-panel .brand-primary-line .brand-name,
        .account-creation-panel .business-primary-line .business-name,
        .account-creation-drop-cell .entity-primary-line .entity-name,
        .account-creation-drop-cell .entity-primary-line .entity-country,
        .account-creation-drop-cell .merchant-primary-line .merchant-name,
        .account-creation-drop-cell .merchant-primary-line .merchant-country,
        .account-creation-drop-cell .merchant-id-line .merchant-legacy-id,
        .account-creation-drop-cell .merchant-id-line .merchant-id,
        .account-creation-drop-cell .brand-primary-line .brand-name,
        .account-creation-drop-cell .business-primary-line .business-name {
            cursor: text;
        }

.board-view .stack-primary-trailing .placed-count-badge,
        .board-view .stack-primary-trailing .hidden-brand-merchant-button {
            cursor: pointer;
        }

.board-view .business-merchants-actions,
        .board-view .entity-card-actions,
        .board-view .platform-card-actions,
        .board-view .placed-dropdown-controls {
            cursor: default;
        }

.board-view .business-merchants-actions .business-merchants-control,
        .board-view .business-merchants-actions .response-button,
        .board-view .business-stack-pin-button,
        .board-view .entity-card-actions .response-button,
        .board-view .entity-card-actions .entity-wallets-button,
        .board-view .platform-card-actions .response-button,
        .board-view .placed-dropdown-controls .placed-count-badge {
            cursor: pointer;
        }

.card.stack-card:hover,
        .card.stack-card.is-relation-hover {
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.compact-board .compact-placed-row > .sequence-cell > .card:not(.merchant-card).is-relation-hover:not(.is-dropdown-child-hover),
        .compact-board .compact-placed-row > .sequence-cell > .card.stack-card:not(.merchant-card).is-relation-hover:not(.is-dropdown-child-hover),
        .compact-board .compact-match > .sequence-cell > .card:not(.merchant-card).is-relation-hover:not(.is-dropdown-child-hover),
        .compact-board .compact-match > .sequence-cell > .card.stack-card:not(.merchant-card).is-relation-hover:not(.is-dropdown-child-hover) {
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.compact-board .compact-placed-row > .sequence-cell > .card.stack-card:not(.merchant-card):not(.hidden-brand-card).is-relation-hover:not(.is-dropdown-child-hover),
        .compact-board .compact-match > .sequence-cell > .card.stack-card:not(.merchant-card):not(.hidden-brand-card).is-relation-hover:not(.is-dropdown-child-hover),
        .compact-board .compact-placed-row > .sequence-cell > .card.stack-card.merchant-card:not(.merchant-focus):not(.has-placed-dropdown).is-relation-hover:not(.is-dropdown-child-hover),
        .compact-board .compact-match > .sequence-cell > .card.stack-card.merchant-card:not(.merchant-focus):not(.has-placed-dropdown).is-relation-hover:not(.is-dropdown-child-hover) {
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.compact-board .placed-dropdown .card.merchant-card.merchant-focus.is-relation-hover,
        .compact-board .hidden-brand-merchant-panel .card.merchant-card.merchant-focus.is-relation-hover {
            border-color: rgba(234, 88, 12, 0.55) transparent transparent;
            box-shadow: var(--stack-hover-shadow-orange);
        }

.card.stack-card.merchant-card.merchant-focus:hover,
        .card.stack-card.merchant-card.merchant-focus.is-relation-hover,
        .merchant-card.merchant-focus:hover,
        .merchant-card.merchant-focus.is-relation-hover,
        .compact-board .compact-placed-row > .sequence-cell > .card.stack-card.merchant-card.merchant-focus.is-relation-hover {
            border-color: rgba(234, 88, 12, 0.55) transparent transparent;
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow-orange);
        }

.card.business-reference {
            overflow: visible;
            padding: 12px 14px 28px;
        }

.business-reference .card-content {
            display: block;
            height: auto;
            max-height: none;
            overflow: hidden;
            padding-right: 0;
        }

.business-reference .card-content .field-value {
            margin-bottom: 4px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

.business-reference .card-content .field-value.identifier {
            margin-bottom: 0;
        }

.card-content {
            width: 100%;
            height: 100%;
            overflow: auto hidden;
        }

.entity-primary-line {
            position: relative;
            display: block;
            min-width: 0;
            width: 100%;
            overflow: hidden;
            white-space: nowrap;
        }

.entity-primary-line .entity-name {
            display: inline-block;
            vertical-align: top;
            max-width: calc(100% - 3.25em);
            min-width: 0;
            overflow-x: auto;
            overflow-y: hidden;
            text-overflow: clip;
            white-space: nowrap;
            scrollbar-width: thin;
        }

.entity-primary-line .entity-name::-webkit-scrollbar {
            height: 4px;
        }

.entity-primary-line .entity-name::-webkit-scrollbar-thumb {
            background: rgba(148, 163, 184, 0.7);
            border-radius: 999px;
        }

.entity-primary-line .entity-country {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            padding-left: 8px;
            white-space: nowrap;
            background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 28%, rgba(255, 255, 255, 0.98) 45%);
        }

/*
         * Merchants: flex + margin-left:auto (not absolute). Beats the later
         * .merchant-country { display: inline-flex } rule that kept AE+flag
         * glued to the name.
         */
.merchant-card .merchant-primary-line,
        .merchant-primary-line {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            width: 100%;
            overflow: hidden;
            white-space: nowrap;
            font-weight: 400;
        }

.merchant-card .merchant-primary-line .merchant-name,
        .merchant-primary-line .merchant-name {
            flex: 0 1 auto;
            max-width: calc(100% - 4.5em);
            min-width: 0;
            overflow: hidden;
            text-overflow: clip;
            white-space: nowrap;
            font-weight: 400;
        }

.merchant-card .merchant-primary-line .merchant-country,
        .merchant-primary-line .merchant-country {
            position: static;
            top: auto;
            right: auto;
            transform: none;
            flex: 0 0 auto;
            margin-left: 0;
            display: inline-flex;
            align-items: center;
            gap: 0.5ch;
            padding-left: 0;
            white-space: nowrap;
            background: transparent;
        }

.brand-primary-line {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            width: 100%;
            overflow: hidden;
            white-space: nowrap;
        }

.brand-primary-line .brand-name {
            flex: 0 1 auto;
            min-width: 0;
            overflow: hidden;
            text-overflow: clip;
            white-space: nowrap;
        }

.stack-primary-trailing {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex: 0 0 auto;
            margin-left: auto;
            min-width: 0;
            max-width: none;
        }

/*
         * Child labels (+N / M) sit inline after country/flag — never absolute float.
         * !important beats the later .placed-count-badge { position: absolute } rules.
         */
.stack-primary-trailing .stack-inline-controls,
        .stack-primary-trailing .placed-dropdown-controls,
        .stack-primary-trailing .hidden-brand-merchant-controls {
            position: static !important;
            top: auto !important;
            right: auto !important;
            left: auto !important;
            display: inline-flex !important;
            align-items: center;
            gap: 5px;
            pointer-events: auto;
            transform: none !important;
        }

.stack-primary-trailing .placed-count-badge,
        .stack-primary-trailing .hidden-brand-merchant-button,
        .stack-primary-trailing .locate-pin-indicator {
            position: static !important;
            top: auto !important;
            right: auto !important;
            left: auto !important;
            transform: none !important;
            flex: 0 0 auto;
        }

.merchant-primary-line,
        .brand-primary-line {
            flex-wrap: nowrap;
            max-height: 20px;
        }

.sequence-cell:empty {
            min-height: 20px;
        }

.match-card {
            border-color: rgba(15, 118, 110, 0.55);
            background: var(--match-bg);
            box-shadow: 0 10px 22px rgba(15, 118, 110, 0.1);
        }

.merchant-card {
            padding: 10px 14px;
        }

.merchant-card .field-value {
            margin-bottom: 4px;
        }

/*
         * Faded row counter in the results-window right gutter — outside the
         * 4-column grid so it never sits on merchant cards. Hover the rail only.
         */

.merchant-card {
            overflow: visible;
        }

.results-window > .merchant-row-counter-rail {
            position: absolute;
            right: 0;
            width: 24px;
            z-index: 5;
            pointer-events: auto;
            transform: translateX(100%);
            background: transparent;
            overflow: visible;
        }

.merchant-row-counter-rail:hover,
        .merchant-row-counter-rail.is-locked {
            box-shadow: 4px 0 14px rgba(15, 23, 42, 0.12);
        }

.merchant-row-counter-lock-bar {
            position: sticky;
            top: 0;
            left: 0;
            right: 0;
            width: 100%;
            margin: 0;
            padding: 0;
            background: transparent;
            border: 0;
            box-shadow: none;
            z-index: 2;
            pointer-events: none;
        }

.merchant-row-counter-rail.is-locked .merchant-row-counter-lock-bar {
            z-index: 250;
        }

.merchant-row-counter-lock {
            position: absolute;
            top: 50%;
            left: 50%;
            display: block;
            margin: 0;
            padding: 0;
            border: 0;
            background: transparent;
            box-shadow: none;
            cursor: pointer;
            font-size: 13px;
            line-height: 1;
            text-align: center;
            opacity: 0;
            transform: translate(-50%, -50%);
            transition: opacity 0.15s ease;
            pointer-events: auto;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }

.merchant-row-counter-lock:hover,
        .merchant-row-counter-lock:active,
        .merchant-row-counter-lock:focus {
            background: transparent;
            box-shadow: none;
            outline: none;
        }

.merchant-row-counter-body {
            position: absolute;
            left: 0;
            right: 0;
            width: 100%;
        }

.merchant-row-counter {
            position: absolute;
            left: 0;
            right: 0;
            transform: translateY(-50%);
            font-size: 11px;
            font-variant-numeric: tabular-nums;
            line-height: 1;
            text-align: center;
            letter-spacing: 0.02em;
            color: hsl(0, 0%, 70%);
            pointer-events: none;
            z-index: 0;
            opacity: 0;
            transition: opacity 0.15s ease, color 0.15s ease;
        }

.merchant-row-counter-rail:hover .merchant-row-counter-lock,
        .merchant-row-counter-rail.is-locked .merchant-row-counter-lock {
            opacity: 1;
        }

.merchant-row-counter-rail:hover .merchant-row-counter,
        .merchant-row-counter-rail.is-locked .merchant-row-counter {
            opacity: 1;
            color: hsl(0, 0%, 52%);
        }

.merchant-position {
            position: relative;
        }

.results-window.is-locate-active .merchant-focus {
            border-color: var(--locate-border);
            background: var(--locate-soft);
            box-shadow: var(--locate-shadow);
        }

.results-window.is-locate-active .entity-focus,
        .results-window.is-locate-active .card.stack-card.entity-focus {
            border-color: rgba(220, 38, 38, 0.58) transparent transparent;
            background:
                linear-gradient(180deg, rgba(255, 235, 238, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
            box-shadow: var(--locate-shadow);
        }

.results-window.is-locate-active .brand-focus,
        .results-window.is-locate-active .card.stack-card.brand-focus,
        .results-window.is-locate-active .hidden-brand-card.brand-focus {
            border-color: rgba(220, 38, 38, 0.58) transparent transparent;
            background:
                linear-gradient(180deg, rgba(255, 235, 238, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
            box-shadow: var(--locate-shadow);
        }

.results-window.is-locate-active .entity-focus:hover,
        .results-window.is-locate-active .brand-focus:hover,
        .results-window.is-locate-active .card.stack-card.entity-focus:hover,
        .results-window.is-locate-active .card.stack-card.brand-focus:hover,
        .results-window.is-locate-active .hidden-brand-card.brand-focus:hover {
            border-color: var(--locate-border) transparent transparent;
            box-shadow: var(--stack-hover-shadow-locate);
        }

.results-window.is-locate-active .card.stack-card.merchant-card.merchant-focus,
        .results-window.is-locate-active .compact-match .card.stack-card.merchant-card.merchant-focus {
            border-color: rgba(220, 38, 38, 0.58) transparent transparent;
            background:
                linear-gradient(180deg, rgba(255, 235, 238, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
        }

.results-window.is-locate-active .card.stack-card.merchant-card.merchant-focus:hover,
        .results-window.is-locate-active .compact-match:hover > .sequence-cell > .merchant-position > .card.stack-card.merchant-card.merchant-focus,
        .results-window.is-locate-active .compact-match:hover > .sequence-cell > .card.stack-card.merchant-card.merchant-focus {
            border-color: var(--locate-border) transparent transparent;
            box-shadow: var(--stack-hover-shadow-locate);
        }

.results-window:not(.is-locate-active) .match-card:not(.merchant-focus):not(.business-reference) {
            border-color: transparent;
            background: #ffffff;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
        }

.results-window:not(.is-locate-active) .compact-match.is-match > .sequence-cell > .stack-card:not(.merchant-card):hover,
        .results-window:not(.is-locate-active) .compact-match.is-match > .sequence-cell > .merchant-position > .stack-card:not(.merchant-card):hover,
        .results-window.is-locate-active .compact-match.is-match > .sequence-cell > .stack-card:not(.merchant-card):hover,
        .results-window.is-locate-active .compact-match.is-match > .sequence-cell > .merchant-position > .stack-card:not(.merchant-card):hover {
            z-index: var(--stack-hover-z);
            border-color: transparent;
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.results-window:not(.is-locate-active) .compact-match.is-match > .sequence-cell > .merchant-position > .merchant-card:not(.merchant-focus):not(.has-placed-dropdown):hover,
        .results-window:not(.is-locate-active) .compact-match.is-match > .sequence-cell > .merchant-card:not(.merchant-focus):not(.has-placed-dropdown):hover,
        .results-window.is-locate-active .compact-match.is-match > .sequence-cell > .merchant-position > .merchant-card:not(.merchant-focus):not(.has-placed-dropdown):hover,
        .results-window.is-locate-active .compact-match.is-match > .sequence-cell > .merchant-card:not(.merchant-focus):not(.has-placed-dropdown):hover {
            border-color: transparent;
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.results-window.is-locate-active.business-search .business-reference.is-business-located {
            border-color: rgba(220, 38, 38, 0.58) transparent transparent;
            background:
                linear-gradient(180deg, rgba(255, 235, 238, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
        }

.results-window.is-locate-active.business-search .business-reference.is-business-located:hover {
            border-color: var(--locate-border);
            box-shadow: var(--stack-hover-shadow-locate);
        }

/* Default merchant view — compact: same stack-card look as list-all-merchants placed rows */

.results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .compact-match .card.merchant-card.merchant-focus,
        .results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .compact-match .card.match-card {
            border: 1px solid transparent;
            border-top: 3px solid rgba(64, 116, 226, 0.44);
            background:
                linear-gradient(180deg, rgba(234, 243, 255, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
            box-shadow: none;
        }

/* Default merchant view — expanded: plain card like list-all-merchants expanded rows */

.results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .card.merchant-card.merchant-focus:hover,
        .results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .card.merchant-card.merchant-focus.is-relation-hover,
        .results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .card.stack-card.merchant-card.merchant-focus:hover,
        .results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .card.stack-card.merchant-card.merchant-focus.is-relation-hover {
            border: 1px solid transparent;
            border-top: 3px solid rgba(64, 116, 226, 0.44);
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .stack-column > .card.stack-card:is(:hover, .is-relation-hover),
        .results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .stack-column > .card.business-reference:is(:hover, .is-relation-hover),
        .results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .compact-match.is-match > .sequence-cell > .card:not(.merchant-card.merchant-focus):is(:hover, .is-relation-hover),
        .results-window.merchant-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .compact-match.is-match > .sequence-cell > .merchant-position > .card:not(.merchant-card.merchant-focus):is(:hover, .is-relation-hover) {
            border-color: transparent;
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

/*
         * Business-ID search renders independent business / entity / brand stacks
         * in the default column view. Each stack must lift on hover the same way
         * merchant-search stacks do (entity cards live inside .entity-card-shell).
         */
.results-window.business-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .stack-column > .card.stack-card:is(:hover, .is-relation-hover),
        .results-window.business-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .stack-column > .card.business-reference:is(:hover, .is-relation-hover),
        .results-window.business-search:not(.is-locate-active):not(.has-placed-merchants) .compact-board .stack-column > .entity-card-shell > .card.stack-card:is(:hover, .is-relation-hover) {
            border-color: transparent;
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.field-value {
            margin: 0 0 8px;
            font-size: 14px;
            line-height: 20px;
            min-height: 20px;
            white-space: nowrap;
            overflow-wrap: anywhere;
        }

.field-value:last-child {
            margin-bottom: 0;
        }

.display-name {
            font-weight: 800;
        }

.identifier {
            font-family: "SFMono-Regular", Menlo, Consolas, Monaco, monospace;
            font-size: 13px;
            line-height: 19px;
            min-height: 19px;
        }

.inline-id-list {
            display: inline-flex;
            gap: 5ch;
            white-space: nowrap;
        }

.inline-detail-list {
            display: inline-flex;
            gap: 5ch;
            white-space: nowrap;
        }

.platform-detail-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            align-items: center;
            gap: 5ch;
            height: 100%;
            padding-right: 118px;
        }

.platform-detail-column {
            min-width: 0;
        }

.platform-detail-column .field-value {
            min-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

.platform-secret-row.is-hidden {
            visibility: hidden;
        }

.platform-toggle-button {
            position: absolute;
            top: 8px;
            right: 10px;
            min-height: auto;
            padding: 0;
            background: transparent;
            color: var(--accent);
            font-size: 14px;
            text-decoration: none;
        }

.platform-toggle-button:hover {
            background: transparent;
            color: var(--accent-dark);
        }

.wallets-button {
            position: absolute;
            right: 46px;
            bottom: 33px;
            min-height: 22px;
            border: 1px solid rgba(15, 118, 110, 0.22);
            border-radius: 999px;
            padding: 0 9px;
            background: rgba(240, 253, 250, 0.86);
            color: var(--accent);
            font-size: 11px;
            text-decoration: none;
        }

.wallets-button:hover {
            background: #dff7f2;
            color: var(--accent-dark);
        }

.platform-card-list .platform-toggle-button {
            top: 8px;
            right: 10px;
        }

.platform-card-list .card-response-button {
            top: auto;
            right: auto;
            bottom: auto;
            transform: none;
        }

.platform-card-list .wallets-button {
            display: inline-flex;
            align-items: center;
            gap: 0.5ch;
            right: auto;
            bottom: auto;
            min-height: auto;
            border: 0;
            border-radius: 0;
            padding: 0;
            background: transparent;
            font-size: 14px;
            font-weight: 800;
            text-decoration: none;
        }

.wallets-button .wallet-icon {
            flex: 0 0 15px;
            width: 15px;
            height: 13px;
            border-radius: 2px;
        }

.platform-card-list .wallets-button:hover {
            background: transparent;
            color: var(--accent-dark);
            text-decoration: none;
        }

.platform-card-shell {
            position: relative;
        }

.platform-card-shell.wallet-open {
            z-index: 700;
        }

.platform-card-actions {
            position: absolute;
            right: 10px;
            bottom: 8px;
            z-index: 4;
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 1ch;
            background: transparent;
        }

.platform-card-actions--with-businesses {
            left: 10px;
            right: 10px;
            justify-content: space-between;
        }

.platform-card-actions-left,
        .platform-card-actions-right {
            display: inline-flex;
            align-items: center;
            min-width: 0;
        }

.platform-card-actions-left {
            gap: 0;
        }

.platform-card-actions-right {
            flex: 0 0 auto;
            gap: 1ch;
            margin-left: auto;
        }

.platform-businesses-response-button {
            position: static;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 16px;
            width: 16px;
            height: 16px;
            margin: 0;
            padding: 0;
            color: var(--muted);
            font-size: 14px;
            font-weight: 700;
            line-height: 1;
            text-decoration: none;
        }

.platform-businesses-response-button {
            visibility: hidden;
        }

.platform-businesses-response-button.has-response,
        .platform-businesses-response-button[data-stored-response]:not([data-stored-response=""]) {
            visibility: visible;
            color: var(--accent);
            text-decoration: none;
        }

.platform-businesses-response-button + .platform-businesses-control {
            margin-left: 0.5ch;
        }

.platform-businesses-control {
            position: relative;
            z-index: 13;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            min-height: 24px;
            margin: -4px -2px;
            padding: 4px 2px;
            border: 0;
            background: transparent;
            color: var(--muted);
            cursor: pointer;
            font-size: 11px;
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
            box-shadow: none;
        }

.platform-businesses-control:hover {
            background: transparent;
            color: var(--accent);
            box-shadow: none;
        }

.platform-businesses-control:disabled,
        .platform-businesses-control.is-loading {
            cursor: wait;
        }

.platform-businesses-check {
            position: relative;
            flex: 0 0 13px;
            width: 13px;
            height: 13px;
            border: 2px solid var(--accent);
            border-radius: 2px;
            background: #ffffff;
            cursor: inherit;
        }

.platform-businesses-control.is-checked .platform-businesses-check {
            background: var(--accent);
        }

.platform-businesses-control.is-checked .platform-businesses-check::after {
            content: "";
            position: absolute;
            left: 50%;
            top: 50%;
            width: 4px;
            height: 7px;
            border: solid #ffffff;
            border-width: 0 2px 2px 0;
            transform: translate(-50%, -58%) rotate(45deg);
        }

.platform-businesses-control.is-loading .platform-businesses-check {
            border-color: rgba(15, 118, 110, 0.35);
            animation: platform-businesses-spin 0.8s linear infinite;
        }

.platform-businesses-control.is-loading .platform-businesses-check::after {
            content: "";
            border: 0;
        }

@keyframes platform-businesses-spin {
            to {
                transform: rotate(360deg);
            }
        }

.platform-businesses-filter-stats {
            margin-left: 2ch;
            color: var(--muted);
            font-size: 10px;
            font-weight: 600;
            white-space: nowrap;
            cursor: default;
        }

.platform-businesses-filter-stats.is-hidden {
            display: none;
        }

.platform-businesses-note {
            margin-left: 0.35ch;
            color: var(--muted);
            font-size: 10px;
            font-weight: 600;
            white-space: nowrap;
        }

.platform-businesses-note.is-over-limit {
            color: var(--error-text, #991b1b);
        }

.platform-businesses-note.is-hidden {
            display: none;
        }

.business-merchants-note {
            margin-left: 0.35ch;
            color: var(--muted);
            font-size: 10px;
            font-weight: 600;
            white-space: nowrap;
        }

.business-merchants-note.is-over-limit {
            color: var(--error-text, #991b1b);
        }

.business-merchants-note.is-hidden {
            display: none;
        }

.platform-card-actions .response-button {
            position: static;
            margin: 0;
            transform: none;
        }

.wallet-dropdown {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            z-index: 720;
            display: none;
            width: 100%;
            border: 1px solid rgba(64, 116, 226, 0.26);
            border-radius: 8px;
            background: #f1f7ff;
            box-shadow:
                0 0 0 3px rgba(226, 239, 255, 0.72),
                0 22px 44px rgba(15, 23, 42, 0.18);
            overflow: hidden;
            transform-origin: top center;
        }

.wallet-dropdown.is-open,
        .wallet-dropdown.is-closing {
            display: block;
        }

.wallet-dropdown.is-open {
            animation: walletDropIn 0.18s ease-out both;
        }

.wallet-dropdown.is-closing {
            pointer-events: none;
            animation: walletMergeUp 0.34s ease-in both;
        }

@keyframes walletDropIn {
            from {
                opacity: 0;
                transform: translateY(-18px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

@keyframes walletMergeUp {
            from {
                opacity: 1;
                transform: translateY(0);
            }
            to {
                opacity: 0;
                transform: translateY(-18px);
            }
        }

.wallet-list {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            padding: 12px;
            max-height: 420px;
            overflow: auto;
            background:
                linear-gradient(180deg, rgba(241, 247, 255, 0.98), rgba(250, 252, 255, 0.98));
        }

.wallet-dropdown-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px;
            border-bottom: 1px solid rgba(64, 116, 226, 0.16);
            background: #e5f2ff;
            font-weight: 800;
            font-size: 12px;
        }

.wallet-card {
            position: relative;
            display: flex;
            align-items: center;
            gap: 12px;
            min-height: 58px;
            border: 1px solid rgba(96, 165, 250, 0.28);
            border-radius: 8px;
            padding: 10px 42px 10px 12px;
            background: #ffffff;
            box-shadow: 0 8px 18px rgba(30, 64, 175, 0.06);
            overflow: hidden;
        }

.wallet-card .wallet-response-button {
            position: absolute;
            right: 12px;
            top: 50%;
            bottom: auto;
            left: auto;
            z-index: 4;
            display: inline-flex;
            width: 16px;
            height: 16px;
            align-items: center;
            justify-content: center;
            margin: 0;
            text-decoration: none;
            transform: translateY(-50%);
        }

.platform-card-shell.wallet-open > .stack-card {
            border-color: rgba(59, 130, 246, 0.45);
            box-shadow:
                inset 0 8px 0 rgba(214, 231, 255, 0.72),
                0 12px 24px rgba(64, 116, 226, 0.12);
        }

.entity-card-shell {
            position: relative;
            width: 100%;
        }

.entity-card-shell.has-entity-wallets > .card {
            overflow: visible;
        }

.entity-card-shell.has-entity-wallets > .card .entity-card-actions {
            z-index: 8;
        }

.compact-board .entity-card-actions .entity-wallets-button,
        .compact-board .entity-card-shell > .entity-wallets-button {
            position: static;
            right: auto;
            bottom: auto;
            min-height: auto;
            border: 0;
            padding: 0;
            background: transparent;
            visibility: visible;
        }

.entity-card-shell.wallet-open {
            z-index: 700;
        }

.entity-card-shell.wallet-open > .card {
            border-color: rgba(59, 130, 246, 0.45);
            box-shadow:
                inset 0 8px 0 rgba(214, 231, 255, 0.72),
                0 12px 24px rgba(64, 116, 226, 0.12);
        }

.entity-card-actions {
            position: absolute;
            right: 10px;
            bottom: 8px;
            z-index: 6;
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 6px;
            background: transparent;
            pointer-events: auto;
        }

.entity-card-actions .response-button {
            position: static;
            width: 16px;
            height: 16px;
            margin: 0;
            transform: none;
        }

.entity-card-actions .entity-wallets-button,
        .entity-card-shell .entity-wallets-button {
            position: static;
            right: auto;
            bottom: auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 0;
            padding: 0;
            background: transparent;
            min-height: auto;
        }

.entity-card-shell .entity-wallets-button .wallet-icon {
            flex: 0 0 15px;
            width: 15px;
            height: 13px;
            border-radius: 2px;
            display: inline-block;
            background-image: url("data:image/svg+xml,%3Csvg width='512' height='512' viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='512' height='512' fill='none'/%3E%3Cpath d='M142 174l200-118c10-6 23-2 29 8l45 78-250 148z' fill='%23ffc107'/%3E%3Cpath d='M190 205l214-126 39 68-214 126z' fill='%23ff9800'/%3E%3Crect x='49' y='166' width='401' height='297' rx='24' fill='%23f44336'/%3E%3Cpath d='M49 190c0-13 11-24 24-24h51v297H73c-13 0-24-11-24-24z' fill='%23d32f2f'/%3E%3Cpath d='M337 270h118c5 0 8 4 8 8v80c0 4-3 8-8 8H337c-26 0-48-22-48-48s22-48 48-48z' fill='%23fde7ea'/%3E%3Ccircle cx='337' cy='318' r='21' fill='%23f44336'/%3E%3C/svg%3E");
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }

.entity-card-shell .wallet-dropdown {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            z-index: 720;
            display: none;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            border: 1px solid rgba(64, 116, 226, 0.26);
            border-radius: 8px;
            background: #f1f7ff;
            box-shadow:
                0 0 0 3px rgba(226, 239, 255, 0.72),
                0 22px 44px rgba(15, 23, 42, 0.18);
            overflow: hidden;
            transform-origin: top center;
        }

.entity-card-shell .wallet-dropdown.is-open,
        .entity-card-shell .wallet-dropdown.is-closing {
            display: block;
        }

.entity-card-shell .wallet-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 10px;
            max-height: min(420px, 60vh);
            overflow: auto;
            background:
                linear-gradient(180deg, rgba(241, 247, 255, 0.98), rgba(250, 252, 255, 0.98));
        }

.entity-card-shell .wallet-card {
            width: 100%;
            min-height: 52px;
            padding: 10px 12px;
            box-sizing: border-box;
        }

.wallet-icon {
            flex: 0 0 34px;
            width: 34px;
            height: 34px;
            border-radius: 8px;
            background-image: url("data:image/svg+xml,%3Csvg width='512' height='512' viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='512' height='512' fill='none'/%3E%3Cpath d='M142 174l200-118c10-6 23-2 29 8l45 78-250 148z' fill='%23ffc107'/%3E%3Cpath d='M190 205l214-126 39 68-214 126z' fill='%23ff9800'/%3E%3Crect x='49' y='166' width='401' height='297' rx='24' fill='%23f44336'/%3E%3Cpath d='M49 190c0-13 11-24 24-24h51v297H73c-13 0-24-11-24-24z' fill='%23d32f2f'/%3E%3Cpath d='M337 270h118c5 0 8 4 8 8v80c0 4-3 8-8 8H337c-26 0-48-22-48-48s22-48 48-48z' fill='%23fde7ea'/%3E%3Ccircle cx='337' cy='318' r='21' fill='%23f44336'/%3E%3C/svg%3E");
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }

.wallet-main {
            position: relative;
            display: flex;
            align-items: center;
            gap: 0;
            flex: 1 1 auto;
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
        }

.wallet-card:has(.wallet-row-id:hover),
        .wallet-card:has(.wallet-row-id:focus-within) {
            overflow: visible;
            z-index: 2;
        }

.wallet-main:has(.wallet-row-id:hover),
        .wallet-main:has(.wallet-row-id:focus-within) {
            overflow: visible;
        }

.wallet-row-id {
            position: relative;
            display: inline-block;
            flex: 0 0 10ch;
            width: 10ch;
            max-width: 10ch;
            margin-right: 2ch;
            vertical-align: middle;
            cursor: text;
        }

.wallet-row-id-visible {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            user-select: none;
        }

.wallet-row-id:hover .wallet-row-id-visible,
        .wallet-row-id:focus-within .wallet-row-id-visible {
            position: absolute;
            top: 50%;
            left: 0;
            z-index: 8;
            width: max-content;
            max-width: min(60ch, 70vw);
            overflow: visible;
            padding-right: 8px;
            background: #ffffff;
            box-shadow: 8px 0 14px rgba(255, 255, 255, 0.96);
            transform: translateY(-50%);
            white-space: nowrap;
            user-select: text;
            cursor: text;
        }

.wallet-row-legacy {
            flex: 0 0 auto;
            margin-right: 1ch;
            white-space: nowrap;
        }

.wallet-currencies {
            display: inline-flex;
            align-items: center;
            flex: 0 0 auto;
            gap: 0;
            margin-right: 1ch;
            min-width: 0;
            white-space: nowrap;
        }

.wallet-country {
            display: inline-flex;
            align-items: center;
            flex: 0 0 auto;
            gap: 0.5ch;
            white-space: nowrap;
        }

.wallet-id {
            margin: 0;
        }

@media (max-width: 900px) {
            .wallet-list {
                grid-template-columns: 1fr;
            }
        }

.currency-base {
            display: inline-flex;
            align-items: center;
            min-height: 18px;
            margin-left: 0;
            border: 0;
            border-radius: 2px;
            padding: 0 4px;
            background: rgba(219, 234, 254, 0.58);
            color: #2563eb;
            font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            font-size: 0.92em;
            font-weight: 800;
            line-height: 18px;
        }

.currency-charge {
            display: inline-flex;
            align-items: center;
            min-height: 18px;
            margin-left: 0;
            border: 0;
            border-radius: 2px;
            padding: 0 4px;
            background: rgba(220, 252, 231, 0.58);
            color: #16a34a;
            font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            font-size: 0.92em;
            font-weight: 800;
            line-height: 18px;
        }

.merchant-id-line {
            display: flex;
            align-items: center;
            gap: 2ch;
            min-width: 0;
            white-space: nowrap;
        }

.merchant-id-line .merchant-legacy-id,
        .merchant-id-line .merchant-id {
            flex: 0 0 auto;
        }

.merchant-currencies {
            display: inline-flex;
            align-items: center;
            gap: 0;
            margin-left: 0;
            white-space: nowrap;
        }

.merchant-country {
            display: inline-flex;
            align-items: center;
            gap: 0.5ch;
            margin-left: 0;
            white-space: nowrap;
        }

.empty-state {
            margin: 0;
            color: var(--muted);
            font-size: 14px;
        }

.response-button {
            display: inline-flex;
            align-items: center;
            border: 0;
            min-height: auto;
            padding: 0;
            background: transparent;
            color: var(--text);
            cursor: pointer;
            font-size: 14px;
            font-weight: 700;
            text-decoration: none;
        }

.response-button:hover {
            background: transparent;
            color: var(--accent-dark);
        }

.card-response-button[data-modal-target],
        .merchant-response-button[data-modal-target],
        .card-response-button[data-stored-response],
        .merchant-response-button[data-stored-response],
        .wallet-response-button[data-stored-response],
        .card-response-button.has-response,
        .merchant-response-button.has-response,
        .wallet-response-button.has-response,
        .business-merchants-response-button.has-response,
        .platform-businesses-response-button.has-response,
        .platform-businesses-response-button[data-stored-response]:not([data-stored-response=""]) {
            color: var(--accent);
            text-decoration: none;
        }

button.response-button.platform-businesses-response-button,
        button.response-button.business-merchants-response-button {
            min-height: 0;
            border-radius: 0;
            padding: 0;
            background: transparent;
            box-shadow: none;
        }

button.response-button.platform-businesses-response-button.has-response,
        button.response-button.platform-businesses-response-button[data-stored-response]:not([data-stored-response=""]),
        button.response-button.business-merchants-response-button.has-response,
        button.response-button.business-merchants-response-button[data-stored-response]:not([data-stored-response=""]) {
            color: var(--accent);
            text-decoration: none;
        }

button.response-button.platform-businesses-response-button.has-response:hover,
        button.response-button.platform-businesses-response-button[data-stored-response]:not([data-stored-response=""]):hover,
        button.response-button.business-merchants-response-button.has-response:hover,
        button.response-button.business-merchants-response-button[data-stored-response]:not([data-stored-response=""]):hover {
            background: transparent;
            color: var(--accent-dark);
            box-shadow: none;
        }

.merchant-response-button {
            position: absolute;
            top: auto;
            right: 10px;
            bottom: 9px;
            z-index: 4;
            width: 16px;
            height: 16px;
            align-items: center;
            justify-content: center;
            transform: none;
            margin-left: 0;
        }

.card-response-button {
            position: absolute;
            right: 10px;
            bottom: 9px;
            z-index: 4;
            width: 16px;
            height: 16px;
            align-items: center;
            justify-content: center;
            margin: 0;
            text-decoration: none;
        }

/* Former retrieve (◉) slot — LAB business pin */
.business-stack-pin-button {
            position: absolute;
            right: 10px;
            bottom: 9px;
            z-index: 14;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            margin: 0;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent !important;
            box-shadow: none !important;
            min-height: 0;
            font-size: 13px;
            line-height: 1;
            cursor: pointer;
            pointer-events: auto;
            opacity: 1;
            transition: opacity 0.18s ease;
        }

.business-stack-pin-button:hover,
        .business-stack-pin-button:focus,
        .business-stack-pin-button:focus-visible,
        .business-stack-pin-button:active {
            background: transparent !important;
            box-shadow: none !important;
            outline: none;
            transform: none;
        }

.business-stack-pin-button.is-pinned,
        .business-stack-pin-button:disabled {
            cursor: default;
            pointer-events: none;
            opacity: 1;
        }

.results-window.is-board-list-businesses-active .business-reference:not(.is-active-board-business) .business-stack-pin-button,
        .results-window.is-board-list-businesses-active .board-list-business-reference:not(.is-active-board-business) .business-stack-pin-button {
            opacity: 0.42;
        }

.results-window.is-board-list-businesses-active .business-reference:not(.is-active-board-business):hover .business-stack-pin-button,
        .results-window.is-board-list-businesses-active .board-list-business-reference:not(.is-active-board-business):hover .business-stack-pin-button {
            opacity: 0.72;
        }

.results-window.is-board-list-businesses-active .business-reference .business-merchants-actions,
        .results-window.is-board-list-businesses-active .board-list-business-reference .business-merchants-actions {
            right: 36px;
        }

.business-merchants-actions {
            position: absolute;
            left: 14px;
            right: 14px;
            bottom: 0;
            height: 28px;
            z-index: 12;
            display: flex;
            align-items: flex-end;
            justify-content: flex-start;
            gap: 0;
            padding-bottom: 9px;
            line-height: 1;
            white-space: nowrap;
            pointer-events: auto;
            box-sizing: border-box;
        }

.business-merchants-actions .business-merchants-response-button {
            position: static;
            flex: 0 0 16px;
            width: 16px;
            height: 16px;
            margin: 0;
            padding: 0;
        }

.business-merchants-actions .business-merchants-response-button:not(.has-response):not([data-stored-response]) {
            display: none;
        }

.business-merchants-actions .business-merchants-response-button.has-response,
        .business-merchants-actions .business-merchants-response-button[data-stored-response]:not([data-stored-response=""]) {
            display: inline-flex;
            color: var(--accent);
            text-decoration: none;
        }

.business-merchants-actions .business-merchants-response-button + .business-merchants-control {
            margin-left: 1ch;
        }

.business-merchants-actions .business-board-merchants-count {
            flex: 1 1 auto;
            min-width: 0;
            margin: 0 1ch;
            padding: 0;
            font-size: 11px;
            font-weight: 600;
            line-height: 16px;
            color: #5b6570;
            cursor: default;
            overflow: hidden;
            text-overflow: ellipsis;
        }

/*
         * Status footer sits in the same bottom band as business Merchants x/y.
         * Keep fixed stack height so LAB business overlays stay row-aligned
         * (taller merchant cards would widen row step while stacks stay at
         * cardHeight − rowOverlap).
         */
.merchant-card.has-merchant-charges-status {
            box-sizing: border-box;
            height: var(--compact-card-height);
            min-height: var(--compact-card-height);
            max-height: var(--compact-card-height);
            padding: 10px 14px 28px;
        }

.merchant-card .merchant-charges-status-actions {
            right: 14px;
            pointer-events: none;
        }

.merchant-card .merchant-charges-status {
            flex: 1 1 auto;
            min-width: 0;
            margin: 0 1ch;
            padding: 0;
            font-size: 11px;
            font-weight: 600;
            line-height: 16px;
            color: #5b6570;
            cursor: default;
            overflow: hidden;
            text-overflow: ellipsis;
        }

.merchant-card .merchant-charges-status.is-active {
            color: #16a34a;
        }

.merchant-card .merchant-charges-status.is-not-active {
            color: #dc2626;
        }

.business-merchants-actions .card-response-button {
            position: static;
            flex: 0 0 16px;
            width: 16px;
            height: 16px;
            margin: 0 0 0 auto;
            padding: 0;
            right: auto;
            bottom: auto;
        }

.business-merchants-actions .business-merchants-note {
            position: absolute;
            left: 0;
            right: 0;
            bottom: calc(100% + 2px);
            margin: 0;
            pointer-events: none;
            text-align: left;
        }

.business-merchants-control {
            pointer-events: auto;
            flex-shrink: 0;
        }

.business-merchants-control {
            position: relative;
            z-index: 13;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            min-height: 24px;
            margin: -4px -2px;
            padding: 4px 2px;
            border: 0;
            background: transparent;
            color: var(--muted);
            cursor: pointer;
            font-size: 11px;
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
            box-shadow: none;
        }

.business-merchants-control:hover {
            background: transparent;
            color: var(--accent);
            box-shadow: none;
        }

.business-merchants-control:disabled {
            cursor: wait;
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-reference.is-stack-controls-locked .business-merchants-actions,
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference.is-stack-controls-locked .business-merchants-actions {
            pointer-events: none;
            opacity: 0.55;
        }

.results-window.is-board-list-businesses-active .board-view--compact .business-reference.is-stack-controls-locked:hover .business-merchants-actions,
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference.is-stack-controls-locked:hover .business-merchants-actions,
        .results-window.is-board-list-businesses-active .board-view--compact .business-reference.is-active-board-business .business-merchants-actions,
        .results-window.is-board-list-businesses-active .board-view--compact .board-list-business-reference.is-active-board-business .business-merchants-actions {
            pointer-events: auto;
            opacity: 1;
        }

.results-window.is-board-list-businesses-active .business-merchants-actions .is-stack-inactive:disabled {
            cursor: default;
        }

.business-merchants-control.is-success {
            color: #16a34a;
        }

.business-merchants-check {
            position: relative;
            flex: 0 0 13px;
            width: 13px;
            height: 13px;
            border: 2px solid var(--accent);
            border-radius: 2px;
            background: #ffffff;
            cursor: inherit;
        }

.business-merchants-control.is-checked .business-merchants-check {
            background: var(--accent);
        }

.business-merchants-control.is-checked .business-merchants-check::after {
            content: "";
            position: absolute;
            left: 50%;
            top: 50%;
            width: 4px;
            height: 7px;
            border: solid #ffffff;
            border-width: 0 2px 2px 0;
            transform: translate(-50%, -58%) rotate(45deg);
        }

.business-merchants-control.is-loading .business-merchants-check {
            border-color: rgba(102, 112, 133, 0.28);
            border-top-color: var(--accent);
            border-radius: 999px;
            background: #ffffff;
            animation: spin 0.8s linear infinite;
        }

.business-merchants-control.is-loading .business-merchants-check::after {
            content: none;
        }

.business-merchants-response-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: var(--muted);
            font-size: 14px;
            line-height: 16px;
            text-decoration: none;
        }

.business-merchants-response-button.has-response {
            color: var(--accent);
        }

.placed-dropdown-controls {
            position: absolute;
            top: 8px;
            right: 10px;
            z-index: 6;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            pointer-events: none;
        }

.placed-dropdown-controls .placed-count-badge {
            position: static;
            top: auto;
            right: auto;
            pointer-events: auto;
        }

.locate-pin-indicator {
            flex: 0 0 10px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #dc2626;
            box-shadow: 0 2px 6px rgba(220, 38, 38, 0.42);
            animation: locate-pin-blink 1.25s ease-in-out infinite;
            pointer-events: none;
        }

@keyframes locate-pin-blink {
            0%,
            100% {
                opacity: 1;
                transform: scale(1);
                box-shadow: 0 2px 6px rgba(220, 38, 38, 0.42);
            }

            50% {
                opacity: 0.45;
                transform: scale(0.88);
                box-shadow: 0 1px 3px rgba(220, 38, 38, 0.24);
            }
        }

.placed-count-badge {
            position: absolute;
            top: 8px;
            right: 10px;
            z-index: 6;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: auto !important;
            min-width: 22px !important;
            max-width: max-content !important;
            height: 18px !important;
            min-height: 18px !important;
            max-height: 18px !important;
            block-size: 18px !important;
            aspect-ratio: auto;
            border: 1px solid rgba(180, 83, 9, 0.18);
            border-radius: 999px;
            padding: 0 6px !important;
            background: #fff3c4;
            color: #b45309;
            box-sizing: border-box;
            cursor: pointer;
            font-size: 11px;
            font-weight: 800;
            line-height: 18px !important;
            text-align: center;
            white-space: nowrap;
            writing-mode: horizontal-tb;
            flex: 0 0 auto;
            box-shadow: none;
        }

.placed-count-badge:hover {
            background: #ffe8a3;
        }

.card.has-placed-dropdown.is-dropdown-open .placed-count-badge,
        .card.has-placed-dropdown.is-dropdown-open .placed-count-badge:hover {
            color: #b45309;
            background: rgba(255, 243, 196, 0.42);
            border-color: rgba(180, 83, 9, 0.1);
        }

.hidden-brand-merchant-controls {
            position: absolute;
            top: 9px;
            right: 10px;
            z-index: 7;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            pointer-events: none;
        }

.hidden-brand-merchant-controls .hidden-brand-merchant-button {
            position: static;
            top: auto;
            right: auto;
            pointer-events: auto;
        }

.hidden-brand-merchant-button {
            position: absolute;
            top: 9px;
            right: 10px;
            z-index: 7;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: auto !important;
            min-width: 22px !important;
            max-width: max-content !important;
            height: 18px !important;
            min-height: 18px !important;
            max-height: 18px !important;
            block-size: 18px !important;
            aspect-ratio: auto;
            border: 1px solid rgba(180, 83, 9, 0.18);
            border-radius: 999px;
            padding: 0 6px !important;
            background: #fff3c4;
            color: #b45309;
            box-sizing: border-box;
            cursor: pointer;
            font-size: 11px;
            font-weight: 800;
            line-height: 18px !important;
            white-space: nowrap;
            writing-mode: horizontal-tb;
            flex: 0 0 auto;
            box-shadow: none;
        }

.hidden-brand-merchant-button:hover {
            background: #ffe8a3;
            color: #b45309;
        }

.hidden-brand-merchant-button.is-active {
            color: #b45309;
            background: rgba(255, 243, 196, 0.42);
            border-color: rgba(180, 83, 9, 0.1);
        }

        .hidden-brand-merchant-button.is-active:hover {
            color: #b45309;
            background: rgba(255, 232, 163, 0.52);
            border-color: rgba(180, 83, 9, 0.12);
        }

.hidden-brand-card.is-relation-hover .hidden-brand-merchant-button,
        .hidden-brand-merchant-button.is-relation-hover {
            background: #ffe8a3;
            color: #b45309;
            box-shadow: none;
        }

.hidden-brand-card.is-selected-hidden-brand {
            background:
                linear-gradient(180deg, rgba(255, 248, 219, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
        }

.placed-dropdown .hidden-brand-card {
            overflow: visible;
        }

.placed-dropdown .hidden-brand-card.has-merchant-reveal {
            overflow: visible;
            margin-top: var(--merchant-column-clearance, 0px);
            margin-bottom: var(--hidden-merchant-extra, 0px);
        }

.compact-board .compact-extracted-stack.is-open > .card.hidden-brand-card.is-selected-hidden-brand {
            margin-top: var(--merchant-column-clearance, 0px);
            margin-bottom: var(--hidden-merchant-extra, 0px);
        }

.compact-board .compact-extracted-stack.is-open > .card.hidden-brand-card:first-child {
            margin-top: var(--merchant-column-clearance, 0px) !important;
        }

.compact-board .compact-placed-row.has-merchant-extracted-open .compact-stack-cell > .card.has-placed-dropdown + .compact-extracted-stack.is-open,
        .compact-board .compact-match.has-merchant-extracted-open .compact-stack-cell > .card.has-placed-dropdown + .compact-extracted-stack.is-open {
            margin-top: calc(-1 * var(--compact-child-overlap) + var(--brand-extracted-stack-offset, 0px)) !important;
        }

.compact-board .compact-extracted-stack.is-open > .card.hidden-brand-card:not(:first-child) {
            margin-top: calc(var(--merchant-column-clearance, 0px) - var(--compact-child-overlap)) !important;
        }

/*
         * Expanded view — revealed stacks use normal row spacing, not compact overlap.
         */

/*
         * Brand-column connectors are drawn in JS (.brand-column-connector-layer).
         * Never use pseudo-elements for stack/M connectors — they must stay behind cards
         * and must not lift or float over stacks on hover.
         */

.hidden-brand-card.has-merchant-reveal::before,
        .hidden-brand-merchant-panel::before,
        .placed-dropdown.is-open::before,
        .placed-dropdown > .card:not(:last-child)::after,
        .card.has-placed-dropdown.is-dropdown-open::after,
        .card.has-placed-dropdown.is-dropdown-open.has-dropdown-offset::after,
        .compact-board .hidden-brand-card.has-brand-stack-gap::after,
        .compact-board .compact-extracted-stack.is-open > .card.has-brand-stack-gap:not(:last-child)::after,
        .compact-board .compact-stack-cell > .card.has-placed-dropdown.is-dropdown-open.has-brand-stack-gap::after {
            display: none !important;
            content: none !important;
        }

.hidden-brand-merchant-panel {
            position: absolute;
            top: 50%;
            left: calc(100% + 22px);
            z-index: 84;
            width: 100%;
            min-width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            border: 0;
            padding: 0;
            background: transparent;
            box-shadow: none;
            transform: translateY(calc(-0.5 * var(--compact-card-height)));
        }

.hidden-brand-merchant-panel .card {
            width: 100%;
            min-width: 0;
            max-width: 100%;
            height: var(--compact-card-height);
            min-height: var(--compact-card-height);
            max-height: var(--compact-card-height);
            box-sizing: border-box;
        }

.hidden-brand-merchant-panel .card + .card {
            margin-top: calc(-1 * var(--compact-child-overlap));
        }

.hidden-brand-merchant-panel .card.has-placed-dropdown.is-dropdown-open {
            margin-bottom: 0;
        }

.card.has-placed-dropdown {
            --placed-dropdown-height: 0px;
            --placed-dropdown-offset: 0px;
            overflow: visible;
        }

.card.has-placed-dropdown.is-dropdown-open {
            z-index: 90;
        }

.card.has-placed-dropdown.is-dropdown-child-hover:not(.is-relation-hover) {
            transform: none;
            box-shadow: none;
        }

.compact-board .card.has-placed-dropdown.is-dropdown-child-hover:hover > .placed-dropdown:not(.compact-extracted-stack),
        .compact-board .card.has-placed-dropdown.is-dropdown-child-hover.is-relation-hover > .placed-dropdown:not(.compact-extracted-stack),
        .compact-board .hidden-brand-card.has-merchant-reveal.is-dropdown-child-hover:hover > .hidden-brand-merchant-panel,
        .compact-board .hidden-brand-card.has-merchant-reveal.is-dropdown-child-hover.is-relation-hover > .hidden-brand-merchant-panel {
            z-index: 80;
        }

.compact-board .card.has-placed-dropdown.is-dropdown-child-hover > .placed-dropdown.compact-extracted-stack,
        .compact-board .card.has-placed-dropdown.is-dropdown-child-hover:hover > .placed-dropdown.compact-extracted-stack,
        .compact-board .card.has-placed-dropdown.is-dropdown-child-hover.is-relation-hover > .placed-dropdown.compact-extracted-stack {
            transform: none;
        }

.compact-board .hidden-brand-card.has-merchant-reveal.is-dropdown-child-hover > .hidden-brand-merchant-panel,
        .compact-board .hidden-brand-card.has-merchant-reveal.is-dropdown-child-hover:hover > .hidden-brand-merchant-panel,
        .compact-board .hidden-brand-card.has-merchant-reveal.is-dropdown-child-hover.is-relation-hover > .hidden-brand-merchant-panel {
            transform: translateY(-50%);
        }

.compact-board .hidden-brand-merchant-panel .card.has-placed-dropdown.is-dropdown-child-hover > .placed-dropdown,
        .compact-board .hidden-brand-merchant-panel .card.has-placed-dropdown.is-dropdown-child-hover:hover > .placed-dropdown,
        .compact-board .hidden-brand-merchant-panel .card.has-placed-dropdown.is-dropdown-child-hover.is-relation-hover > .placed-dropdown {
            transform: none;
        }

.placed-dropdown {
            position: absolute;
            top: calc(100% + 8px + var(--placed-dropdown-offset, 0px));
            left: 0;
            right: 0;
            z-index: 80;
            display: none;
            width: 100%;
            min-width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            overflow: visible;
            border: 0;
            padding: 0;
            background: transparent;
            box-shadow: none;
        }

.placed-dropdown.is-open {
            display: grid;
            gap: 0;
        }

.placed-dropdown .card {
            position: relative;
            z-index: 1;
            width: 100%;
            min-width: 0;
            max-width: 100%;
            height: var(--compact-card-height);
            min-height: var(--compact-card-height);
            max-height: var(--compact-card-height);
            box-sizing: border-box;
            border-top-color: rgba(245, 158, 11, 0.38);
            background:
                linear-gradient(180deg, rgba(255, 248, 219, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
            box-shadow: none;
        }

.placed-dropdown .card:not(.merchant-card):hover,
        .hidden-brand-merchant-panel .card:not(.merchant-card):hover {
            transform: none;
            box-shadow: none;
        }

.compact-board .compact-placed-row > .sequence-cell > .card.stack-card:not(.merchant-card):not(.hidden-brand-card).is-relation-hover:not(.is-dropdown-child-hover),
        .compact-board .compact-match > .sequence-cell > .card.stack-card:not(.merchant-card):not(.hidden-brand-card).is-relation-hover:not(.is-dropdown-child-hover),
        .compact-board .compact-placed-row > .sequence-cell > .card.stack-card.merchant-card:not(.merchant-focus):not(.has-placed-dropdown).is-relation-hover:not(.is-dropdown-child-hover),
        .compact-board .compact-match > .sequence-cell > .card.stack-card.merchant-card:not(.merchant-focus):not(.has-placed-dropdown).is-relation-hover:not(.is-dropdown-child-hover) {
            z-index: 125;
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.placed-dropdown .card-content,
        .hidden-brand-merchant-panel .card-content {
            max-width: 100%;
            overflow: auto hidden;
        }

.placed-dropdown .field-value,
        .hidden-brand-merchant-panel .field-value {
            width: max-content;
            min-width: 100%;
            max-width: none;
            overflow: visible;
            text-overflow: clip;
            white-space: nowrap;
        }

.placed-dropdown .card + .card {
            margin-top: -14px;
        }

.compact-board .card.has-placed-dropdown.is-dropdown-open {
            height: var(--compact-card-height);
            min-height: var(--compact-card-height);
            margin-bottom: calc(var(--placed-dropdown-height, 0px) + var(--placed-dropdown-offset, 0px) - var(--compact-child-overlap));
            z-index: 95;
        }

.compact-board .hidden-brand-merchant-panel .card.has-placed-dropdown.is-dropdown-open {
            margin-bottom: 0;
        }

.compact-board .placed-dropdown:not(.compact-extracted-stack) {
            position: absolute;
            top: calc(100% - var(--compact-child-overlap) + var(--placed-dropdown-offset, 0px));
            left: 0;
            right: 0;
            width: 100%;
            margin-top: 0;
            transform: translateY(0);
            transition: none;
            gap: 0;
            padding: 0;
        }

.compact-board .compact-stack-cell {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

.compact-board .sequence-cell > .compact-stack-cell + .compact-stack-cell {
            margin-top: calc(-1 * var(--compact-overlap)) !important;
        }

.compact-board .compact-extracted-stack {
            position: static;
            top: auto;
            left: auto;
            right: auto;
            z-index: auto;
            display: none;
            flex-direction: column;
            width: 100%;
            margin: 0;
            padding: 0;
            transform: none;
            border: 0;
            background: transparent;
            box-shadow: none;
            overflow: visible;
        }

.compact-board .compact-extracted-stack.is-open {
            display: flex;
        }

.compact-board .compact-extracted-stack > .card + .card,
        .compact-board .compact-extracted-stack > .compact-stack-cell + .compact-stack-cell {
            margin-top: calc(-1 * var(--compact-child-overlap)) !important;
        }

.compact-board .compact-stack-cell > .card.has-placed-dropdown.merchant-card.is-dropdown-open {
            height: var(--compact-card-height);
            min-height: var(--compact-card-height);
            margin-bottom: 0;
            z-index: 1;
        }

/*
         * Revealed stack children — unified amber color + hover shadow everywhere
         * (merchant +N, brand +N, M panel, M>+N nested).
         */
.compact-board .compact-extracted-stack.is-open > .card.stack-card,
        .compact-board .hidden-brand-merchant-panel .placed-dropdown.is-open > .card.merchant-card,
        .compact-board .hidden-brand-merchant-panel .compact-extracted-stack.is-open > .card.stack-card {
            border-top-color: rgba(245, 158, 11, 0.38);
            border-top-width: 3px;
            background:
                linear-gradient(180deg, rgba(255, 248, 219, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
            box-shadow: none;
        }

.compact-board .compact-extracted-stack.is-open > .card.stack-card {
            z-index: 2;
        }

.compact-board .compact-extracted-stack.is-open > .card.stack-card:is(:hover, .is-relation-hover),
        .compact-board .compact-stack-cell > .compact-extracted-stack.is-open > .card.merchant-card:is(:hover, .is-relation-hover),
        .compact-board .placed-dropdown.is-open > .card.merchant-card:is(:hover, .is-relation-hover),
        .compact-board .hidden-brand-merchant-panel .placed-dropdown.is-open > .card.merchant-card:is(:hover, .is-relation-hover),
        .compact-board .hidden-brand-merchant-panel .compact-extracted-stack.is-open > .card.stack-card:is(:hover, .is-relation-hover),
        .compact-board .hidden-brand-merchant-panel > .card.merchant-card:not(.has-placed-dropdown):is(:hover, .is-relation-hover),
        .compact-board .hidden-brand-merchant-panel .placed-dropdown:not(.compact-extracted-stack) .card.merchant-card:is(:hover, .is-relation-hover) {
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow-amber);
        }

.compact-board .hidden-brand-merchant-panel .card.merchant-card.merchant-focus:is(:hover, .is-relation-hover) {
            border-color: rgba(234, 88, 12, 0.55) transparent transparent;
            box-shadow: var(--stack-hover-shadow-orange);
        }

/*
         * Revealed stack host hovers — hosts keep column color (merchant +N host = blue).
         */
.compact-board .compact-stack-cell > .card.has-placed-dropdown.merchant-card:is(:hover, .is-relation-hover):not(.is-dropdown-child-hover) {
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.compact-board .hidden-brand-merchant-panel > .card.has-placed-dropdown.merchant-card.is-dropdown-open {
            z-index: 1;
        }

.compact-board .hidden-brand-merchant-panel > .card.has-placed-dropdown.merchant-card.is-dropdown-open:is(:hover, .is-relation-hover):not(.is-dropdown-child-hover):not(:has(> .placed-dropdown.is-open > .card.merchant-card:hover)) {
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow-amber);
        }

.compact-board .hidden-brand-merchant-panel > .card.has-placed-dropdown.merchant-card.is-dropdown-open:has(> .placed-dropdown.is-open > .card.merchant-card:hover) {
            z-index: 1;
            transform: none !important;
            box-shadow: none !important;
        }

.compact-board .hidden-brand-merchant-panel > .card.has-placed-dropdown > .placed-dropdown.is-open > .card.merchant-card {
            z-index: 2;
            pointer-events: auto;
        }

.compact-board .compact-stack-cell > .card.has-placed-dropdown.is-dropdown-open {
            height: var(--compact-card-height);
            min-height: var(--compact-card-height);
            margin-bottom: 0;
            z-index: auto;
        }

.compact-board .compact-stack-cell > .card + .card,
        .compact-board .compact-stack-cell > .placed-dropdown + .card,
        .compact-board .compact-stack-cell > .card + .placed-dropdown,
        .compact-board .compact-stack-cell > .placed-dropdown + .placed-dropdown {
            margin-top: calc(-1 * var(--compact-child-overlap)) !important;
        }

.compact-board .compact-extracted-stack .hidden-brand-card.has-merchant-reveal {
            overflow: visible;
            position: relative;
        }

.compact-board .hidden-brand-merchant-panel {
            position: absolute;
            top: 50%;
            left: var(--merchant-panel-left, calc(100% + 18px));
            z-index: 84;
            display: flex;
            flex-direction: column;
            width: var(--merchant-panel-width, 100%);
            min-width: var(--merchant-panel-width, 100%);
            max-width: var(--merchant-panel-width, 100%);
            box-sizing: border-box;
            border: 0;
            padding: 0;
            background: transparent;
            box-shadow: none;
            transform: translateY(-50%);
            overflow: visible;
        }

.compact-board .hidden-brand-card.is-selected-hidden-brand.has-merchant-reveal.has-merchant-gap > .hidden-brand-merchant-panel {
            top: 50%;
            transform: translateY(calc(-0.5 * var(--compact-card-height)));
        }

.compact-board .hidden-brand-card.is-selected-hidden-brand.has-merchant-reveal.is-dropdown-child-hover.has-merchant-gap > .hidden-brand-merchant-panel {
            transform: translateY(calc(-0.5 * var(--compact-card-height)));
        }

.compact-board .hidden-brand-merchant-panel > .compact-stack-cell,
        .sequence-grid .hidden-brand-merchant-panel > .compact-stack-cell {
            position: relative;
            display: flex;
            flex-direction: column;
            width: 100%;
            min-width: 0;
        }

.compact-board .hidden-brand-merchant-panel .compact-extracted-stack.is-open,
        .sequence-grid .hidden-brand-merchant-panel .compact-extracted-stack.is-open {
            display: flex;
            flex-direction: column;
        }

.compact-board .hidden-brand-merchant-panel .compact-extracted-stack > .card + .card {
            margin-top: calc(-1 * var(--compact-child-overlap)) !important;
        }

.compact-board .hidden-brand-merchant-panel .compact-stack-cell > .card + .placed-dropdown {
            margin-top: calc(-1 * var(--compact-child-overlap)) !important;
        }

.compact-board .has-merchant-reveal-open .hidden-brand-merchant-panel .card {
            position: relative;
            z-index: 2;
        }

.compact-board .placed-dropdown:not(.compact-extracted-stack).is-open {
            display: flex;
            flex-direction: column;
            gap: 0;
        }

.compact-board .card.has-placed-dropdown.is-dropdown-open.is-dropdown-child-hover:hover > .placed-dropdown,
        .compact-board .card.has-placed-dropdown.is-dropdown-open.is-dropdown-child-hover.is-relation-hover > .placed-dropdown {
            transform: none;
        }

.compact-board .placed-dropdown .card + .card {
            margin-top: calc(-1 * var(--compact-child-overlap)) !important;
        }

.compact-board .hidden-brand-merchant-panel .card + .card {
            margin-top: calc(-1 * var(--compact-child-overlap)) !important;
        }

.sequence-grid .hidden-brand-merchant-panel .card.has-placed-dropdown.is-dropdown-open,
        .compact-board .hidden-brand-merchant-panel .card.has-placed-dropdown.is-dropdown-open {
            margin-bottom: 0;
        }

.hidden-brand-merchant-panel .card.stack-card {
            border-top-color: rgba(245, 158, 11, 0.38);
            background:
                linear-gradient(180deg, rgba(255, 248, 219, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
            box-shadow: none;
        }

.compact-board .placed-dropdown:not(.compact-extracted-stack) .card,
        .compact-board .compact-extracted-stack .card,
        .compact-board .hidden-brand-merchant-panel:not(.compact-extracted-stack) .card {
            flex: 0 0 var(--compact-card-height);
            height: var(--compact-card-height) !important;
            min-height: var(--compact-card-height) !important;
            max-height: var(--compact-card-height) !important;
            margin-bottom: 0;
        }

.compact-board .placed-dropdown .hidden-brand-card.has-merchant-reveal {
            margin-bottom: var(--hidden-merchant-extra, 0px);
        }

.compact-board .sequence-cell > .card.stack-card:not(.merchant-card):is(:hover, .is-relation-hover):not(.is-dropdown-child-hover),
        .compact-board .hidden-brand-card:is(:hover, .is-relation-hover):not(.is-dropdown-child-hover):not(.compact-extracted-stack > *) {
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow-amber);
        }

.compact-board .sequence-cell > .card.stack-card.merchant-card:not(.merchant-focus):not(.has-placed-dropdown):is(:hover, .is-relation-hover):not(.is-dropdown-child-hover),
        .compact-board .compact-stack-cell > .card.has-placed-dropdown:not(.merchant-card):is(:hover, .is-relation-hover):not(.is-dropdown-child-hover) {
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.compact-board .placed-dropdown:not(.compact-extracted-stack) .card:not(:hover):not(.is-relation-hover),
        .compact-board .compact-extracted-stack .card:not(:hover):not(.is-relation-hover),
        .compact-board .hidden-brand-merchant-panel:not(.compact-extracted-stack) .card:not(:hover):not(.is-relation-hover) {
            transform: none;
            box-shadow: none;
        }

.compact-board .stack-column:has(.card:hover),
        .compact-board .stack-column:has(.card.is-relation-hover) {
            position: relative;
            z-index: var(--compact-cell-hover-z);
        }

.compact-board .compact-placed-row > .sequence-cell:has(.card:hover:not(.business-reference)),
        .compact-board .compact-placed-row > .sequence-cell:has(.card.is-relation-hover:not(.business-reference)),
        .compact-board .compact-match > .sequence-cell:has(.card:hover:not(.business-reference)),
        .compact-board .compact-match > .sequence-cell:has(.card.is-relation-hover:not(.business-reference)) {
            position: relative;
            z-index: var(--compact-cell-hover-z);
        }

.compact-board .compact-placed-row:has(.sequence-cell .card:hover:not(.business-reference)),
        .compact-board .compact-placed-row:has(.sequence-cell .card.is-relation-hover:not(.business-reference)),
        .compact-board .compact-match:has(.sequence-cell .card:hover:not(.business-reference)),
        .compact-board .compact-match:has(.sequence-cell .card.is-relation-hover:not(.business-reference)),
        .compact-board .compact-columns:has(.stack-column .card:hover:not(.business-reference)),
        .compact-board .compact-columns:has(.stack-column .card.is-relation-hover:not(.business-reference)) {
            position: relative;
            z-index: var(--compact-row-hover-z);
        }

/*
         * Create panel open: keep hovered stack rows under the sticky create slot
         * (and under the expanded edit / create-error sheet).
         */
.results-window.is-account-create-active .compact-board .compact-placed-row:has(.sequence-cell .card:hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .compact-placed-row:has(.sequence-cell .card.is-relation-hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .compact-match:has(.sequence-cell .card:hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .compact-match:has(.sequence-cell .card.is-relation-hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .compact-columns:has(.stack-column .card:hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .compact-columns:has(.stack-column .card.is-relation-hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .stack-column:has(.card:hover),
        .results-window.is-account-create-active .compact-board .stack-column:has(.card.is-relation-hover),
        .results-window.is-account-create-active .compact-board .compact-placed-row > .sequence-cell:has(.card:hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .compact-placed-row > .sequence-cell:has(.card.is-relation-hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .compact-match > .sequence-cell:has(.card:hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .compact-match > .sequence-cell:has(.card.is-relation-hover:not(.business-reference)),
        .results-window.is-account-create-active .compact-board .entity-card-shell:has(> .card:hover),
        .results-window.is-account-create-active .compact-board .entity-card-shell:has(> .card.is-relation-hover) {
            z-index: 1;
        }

.compact-board .business-reference:hover,
        .compact-board .board-list-business-reference:hover {
            z-index: var(--stack-hover-z);
            transform: var(--stack-hover-lift);
            box-shadow: var(--stack-hover-shadow);
        }

.compact-board .business-reference.is-relation-hover:not(:hover),
        .compact-board .board-list-business-reference.is-relation-hover:not(:hover) {
            transform: none;
            box-shadow: none;
        }

.compact-board .compact-placed-row > .sequence-cell > .card.business-reference.is-relation-hover:not(:hover),
        .compact-board .compact-placed-row > .sequence-cell > .card.board-list-business-reference.is-relation-hover:not(:hover),
        .compact-board .compact-match > .sequence-cell > .card.business-reference.is-relation-hover:not(:hover),
        .compact-board .compact-match > .sequence-cell > .card.board-list-business-reference.is-relation-hover:not(:hover) {
            transform: none;
            box-shadow: none;
        }

.compact-board .card.has-placed-dropdown.is-dropdown-child-hover:not(.is-relation-hover),
        .compact-board .hidden-brand-card.has-merchant-reveal.is-dropdown-child-hover:not(.is-relation-hover),
        .compact-board .card.stack-card.is-dropdown-child-hover:not(.is-relation-hover) {
            z-index: 1 !important;
            transform: none !important;
            box-shadow: none !important;
        }

.compact-board .card.has-placed-dropdown.is-dropdown-child-hover > .placed-dropdown:not(.compact-extracted-stack),
        .compact-board .hidden-brand-card.has-merchant-reveal.is-dropdown-child-hover > .hidden-brand-merchant-panel {
            z-index: 80;
        }

.results-window.is-locate-active .placed-dropdown .merchant-card.merchant-focus,
        .results-window.is-locate-active .hidden-brand-merchant-panel .merchant-card.merchant-focus,
        .results-window.is-locate-active .compact-board .placed-dropdown .merchant-card.merchant-focus,
        .results-window.is-locate-active .compact-board .hidden-brand-merchant-panel .merchant-card.merchant-focus,
        .results-window.is-locate-active .placed-dropdown .brand-focus,
        .results-window.is-locate-active .placed-dropdown .hidden-brand-card.brand-focus,
        .results-window.is-locate-active .compact-board .placed-dropdown .brand-focus,
        .results-window.is-locate-active .compact-board .placed-dropdown .hidden-brand-card.brand-focus {
            border-color: rgba(220, 38, 38, 0.58) transparent transparent;
            background:
                linear-gradient(180deg, rgba(255, 235, 238, 0.96) 0, rgba(255, 255, 255, 0.99) 20px, #ffffff 100%);
            box-shadow: var(--locate-shadow);
        }

/*
         * Expanded view — unified 16px rhythm (rows + child/sub-child stacks).
         * +N connectors live inside each stack column; M horizontal lines use a row layer.
         */

/* Expanded M>+N — 16px gaps only; keep absolute panel width/layout unchanged */

/* Expand All — relation color only; no lift or shadow */

/*
 * Create panel + List All Businesses: list-mode business overlay keeps absolute
 * layout for row alignment but must scroll under sticky toolbar / headers / panel
 * (same z-layer as entity/brand/merchant). List-mode host z-index 6/8 otherwise
 * wins over the create panel slot (248) in the cascade.
 */
.results-window.is-account-create-active.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child.is-business-stack-host,
        .results-window.is-account-create-active.is-board-list-businesses-active .board-view--expanded.sequence-grid .sequence-cell:first-child.is-business-stack-host {
            z-index: 0;
        }

.results-window.is-account-create-active.is-board-list-businesses-active .board-view--compact .sequence-cell:first-child.is-business-stack-host > .business-stack-column.stack-column,
        .results-window.is-account-create-active.is-board-list-businesses-active .board-view--expanded.sequence-grid .sequence-cell:first-child.is-business-stack-host > .business-stack-column.stack-column {
            z-index: 0;
        }

.results-window.is-account-create-active.is-board-list-businesses-active .board-view--compact .business-stack-column.stack-column:has(.card:hover),
        .results-window.is-account-create-active.is-board-list-businesses-active .board-view--compact .business-stack-column.stack-column:has(.card.is-relation-hover),
        .results-window.is-account-create-active.is-board-list-businesses-active .board-view--expanded.sequence-grid .business-stack-column.stack-column:has(.card:hover),
        .results-window.is-account-create-active.is-board-list-businesses-active .board-view--expanded.sequence-grid .business-stack-column.stack-column:has(.card.is-relation-hover) {
            z-index: 0;
        }
