/* ============================================================
   Publisher matrix — economicScaleBias (X) vs socialScaleBias (Y),
   both 1-10. Plain CSS/JS scatter plot, no charting library, same
   approach as the homepage spectrum tracks (absolute-positioned
   markers over a percentage grid).
   ============================================================ */

.matrix-card {
    padding: 32px;
}

.matrix {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 44px 36px 50px;
}

.matrix__grid {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background-color: var(--color-surface);
    background-image:
        repeating-linear-gradient(var(--color-border) 0, var(--color-border) 1px, transparent 1px, transparent 11.111%),
        repeating-linear-gradient(90deg, var(--color-border) 0, var(--color-border) 1px, transparent 1px, transparent 11.111%);
}

.matrix__crosshair {
    position: absolute;
    background: var(--color-text-secondary);
    opacity: 0.5;
}

.matrix__crosshair--h {
    left: 0;
    right: 0;
    top: 50%;
    height: 1.5px;
    transform: translateY(-50%);
}

.matrix__crosshair--v {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1.5px;
    transform: translateX(-50%);
}

.matrix__axis-label {
    position: absolute;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.matrix__axis-label--top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.matrix__axis-label--bottom {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.matrix__axis-label--left {
    left: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
}

.matrix__axis-label--right {
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center;
}

.matrix__marker {
    position: absolute;
    width: 56px;
    height: 56px;
    transform: translate(-50%, 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-hover);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, border-color 0.15s ease, z-index 0s;
    z-index: 1;
}

.matrix__marker:hover,
.matrix__marker:focus-visible {
    transform: translate(-50%, 50%) scale(1.25);
    border-color: var(--color-teal);
    z-index: 10;
}

.matrix__marker img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 4px;
}

.matrix__marker-fallback {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

@media (max-width: 640px) {
    .matrix__axis-label {
        font-size: 0.74rem;
    }

    .matrix__marker {
        width: 40px;
        height: 40px;
    }

    .matrix__marker img {
        width: 26px;
        height: 26px;
    }
}
