.rank-comparison {
    margin: 0 0 25px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid color-mix(in srgb, var(--brand-primary) 30%, var(--line));
    border-radius: 22px;
    background: linear-gradient(140deg, rgba(25, 33, 56, .94), rgba(10, 16, 29, .97));
    box-shadow: 0 18px 48px rgba(0, 0, 0, .17);
}

.product-detail-shell > .container > .rank-comparison {
    margin-top: 52px;
}

.rank-comparison-heading h3 {
    margin: 6px 0 4px;
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    letter-spacing: -.035em;
}

.rank-comparison-heading p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: .82rem;
}

.rank-comparison-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    scrollbar-color: var(--brand-primary) #101827;
}

.rank-comparison-scroll:focus-visible {
    outline: 2px solid var(--brand-secondary);
    outline-offset: 3px;
}

.rank-comparison-table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: center;
    font-size: .86rem;
}

.rank-comparison-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rank-comparison-table th,
.rank-comparison-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
}

.rank-comparison-table tr:last-child th,
.rank-comparison-table tr:last-child td {
    border-bottom: 0;
}

.rank-comparison-table thead th {
    color: #d9e6f8;
    background: rgba(39, 51, 78, .75);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .035em;
}

.rank-comparison-table thead th:first-child,
.rank-comparison-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 190px;
    text-align: left;
}

.rank-comparison-table tbody th {
    background: #141d30;
    color: #e2e8f0;
    font-weight: 750;
}

.rank-comparison-feature {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 7px;
}

.rank-luminas-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    object-fit: contain;
}

.rank-comparison-table td small {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.76;
}

.rank-luminas-perk {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 16px;
    padding: 7px 11px;
    border: 1px solid color-mix(in srgb, var(--brand-secondary) 35%, var(--line));
    border-radius: 11px;
    background: rgba(18, 31, 50, .86);
    color: #e8f7ff;
    font-size: .82rem;
}

.rank-luminas-perk img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.rank-comparison-feature > span:first-child {
    padding-top: 3px;
}

.rank-comparison-help {
    display: inline-flex;
    align-items: center;
}

.rank-comparison-help button {
    width: 21px;
    height: 21px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--brand-secondary) 55%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand-secondary) 16%, #152238);
    color: var(--brand-secondary);
    font-size: .7rem;
    font-weight: 900;
    line-height: 1;
    cursor: help;
}

.rank-comparison-help button:focus-visible {
    outline: 2px solid var(--brand-secondary);
    outline-offset: 2px;
}

.rank-comparison-popover {
    position: fixed;
    z-index: 1000;
    width: max-content;
    max-width: min(320px, calc(100vw - 24px));
    padding: 12px 15px;
    border: 1px solid color-mix(in srgb, var(--brand-secondary) 35%, var(--line));
    border-radius: 14px;
    background: #1a2940;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .4);
    color: #dcebf5;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    pointer-events: none;
}

.rank-comparison-popover[hidden] {
    display: none;
}

.rank-comparison-popover::after {
    content: '';
    position: absolute;
    left: calc(var(--rank-arrow-left, 50%) - 6px);
    bottom: -7px;
    width: 12px;
    height: 12px;
    border-right: 1px solid color-mix(in srgb, var(--brand-secondary) 35%, var(--line));
    border-bottom: 1px solid color-mix(in srgb, var(--brand-secondary) 35%, var(--line));
    background: #1a2940;
    transform: rotate(45deg);
}

.rank-comparison-popover.is-below::after {
    top: -7px;
    bottom: auto;
    border: 0;
    border-left: 1px solid color-mix(in srgb, var(--brand-secondary) 35%, var(--line));
    border-top: 1px solid color-mix(in srgb, var(--brand-secondary) 35%, var(--line));
}

.rank-comparison-table tbody td {
    color: #cbd5e1;
    background: rgba(15, 23, 42, .52);
}

.rank-comparison-table .is-selected {
    color: #fff;
    background: color-mix(in srgb, var(--brand-primary) 34%, #151e32);
    box-shadow: inset 2px 0 0 var(--brand-secondary), inset -2px 0 0 var(--brand-secondary);
}

@media (max-width: 760px) {
    .rank-comparison-table {
        min-width: 640px;
        font-size: .78rem;
    }

    .rank-comparison-table thead th:first-child,
    .rank-comparison-table tbody th {
        min-width: 150px;
    }
}
