/* MariaStacks Album Page – Phase 3 Personal Match */

.mstax-match-section {
    background: #070707;
    color: #fff;
    padding: clamp(3rem, 6vw, 6rem) 0;
}

.mstax-match-shell {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.mstax-match-heading-row,
.mstax-match-main,
.mstax-match-preview-copy {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: clamp(1.5rem, 4vw, 4rem);
}

.mstax-match-eyebrow,
.mstax-match-explanation-label,
.mstax-match-preview-label {
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mstax-match-eyebrow {
    opacity: 0.56;
    margin-bottom: 0.65rem;
}

.mstax-match-title {
    margin: 0;
    color: inherit;
    font-size: clamp(1.55rem, 2.5vw, 2.4rem);
    line-height: 1.08;
    font-weight: 500;
}

.mstax-match-plan-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.mstax-match-main {
    margin-top: clamp(2rem, 4vw, 3.5rem);
}

.mstax-match-score-block {
    flex: 0 0 min(240px, 25%);
    padding-top: 1.8rem;
}

.mstax-match-score {
    display: flex;
    align-items: flex-start;
    line-height: 0.86;
    font-variant-numeric: tabular-nums;
}

.mstax-match-score-value {
    font-size: clamp(4.5rem, 9vw, 8.5rem);
    font-weight: 500;
    letter-spacing: -0.07em;
}

.mstax-match-score-unit {
    margin: 0.4rem 0 0 0.55rem;
    font-size: clamp(1.1rem, 2vw, 1.75rem);
    opacity: 0.58;
}

.mstax-match-score-label {
    margin-top: 1rem;
    font-size: 0.84rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.62;
}

.mstax-match-chart-column {
    flex: 1 1 auto;
    min-width: 0;
}

.mstax-match-range-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
}

.mstax-match-range {
    color: inherit;
    text-decoration: none;
    padding: 0.34rem 0.58rem;
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1;
    letter-spacing: 0.04em;
    opacity: 0.46;
    transition: opacity 160ms ease, background-color 160ms ease;
}

.mstax-match-range:hover,
.mstax-match-range.is-active {
    opacity: 1;
}

.mstax-match-range.is-active {
    background: rgba(255,255,255,0.11);
}

.mstax-match-range.is-disabled {
    cursor: default;
}

.mstax-match-chart {
    position: relative;
    min-height: 260px;
    padding: 0.6rem 0 1.8rem;
}

.mstax-match-chart svg {
    display: block;
    width: 100%;
    height: 220px;
    overflow: visible;
}

.mstax-match-grid {
    stroke: rgba(255,255,255,0.10);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.mstax-match-grid.is-center {
    stroke: rgba(255,255,255,0.18);
}

.mstax-match-line {
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mstax-match-chart.is-preview .mstax-match-line {
    opacity: 0.55;
    stroke-dasharray: 7 7;
}

.mstax-match-preview-label {
    position: absolute;
    top: 1.2rem;
    right: 0.5rem;
    z-index: 2;
    opacity: 0.38;
}

.mstax-match-chart-dates {
    display: flex;
    justify-content: space-between;
    margin-top: -0.55rem;
    padding: 0 0.25rem;
    font-size: 0.68rem;
    opacity: 0.4;
}

.mstax-match-preview-copy,
.mstax-match-explanation,
.mstax-match-unavailable {
    margin-top: clamp(1.5rem, 3vw, 2.75rem);
    padding-top: clamp(1.5rem, 3vw, 2.5rem);
    border-top: 1px solid rgba(255,255,255,0.16);
}

.mstax-match-preview-copy strong,
.mstax-match-unavailable strong {
    display: block;
    margin-bottom: 0.55rem;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    font-weight: 500;
}

.mstax-match-preview-copy p,
.mstax-match-explanation p,
.mstax-match-unavailable p {
    max-width: 760px;
    margin: 0;
    font-size: clamp(0.95rem, 1.25vw, 1.08rem);
    line-height: 1.62;
    color: rgba(255,255,255,0.72);
}

.mstax-match-explanation-label {
    margin-bottom: 0.8rem;
    opacity: 0.58;
}

.mstax-match-explanation p + p {
    margin-top: 0.75rem;
}

.mstax-match-explanation .mstax-match-note {
    color: rgba(255,255,255,0.52);
}

.mstax-match-explanation .mstax-match-change {
    color: rgba(255,255,255,0.88);
}

.mstax-match-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255,255,255,0.30);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 160ms ease, color 160ms ease;
}

.mstax-match-cta:hover {
    background: #fff;
    color: #070707;
}

@media (max-width: 820px) {
    .mstax-match-shell {
        width: min(100% - 32px, 720px);
    }

    .mstax-match-main {
        display: block;
    }

    .mstax-match-score-block {
        padding-top: 0;
        margin-bottom: 1.75rem;
    }

    .mstax-match-score-value {
        font-size: clamp(4.5rem, 24vw, 7rem);
    }

    .mstax-match-range-row {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.35rem;
        scrollbar-width: none;
    }

    .mstax-match-range-row::-webkit-scrollbar {
        display: none;
    }

    .mstax-match-range {
        flex: 0 0 auto;
    }

    .mstax-match-preview-copy {
        display: block;
    }

    .mstax-match-cta {
        margin-top: 1.2rem;
    }
}

@media (max-width: 480px) {
    .mstax-match-section {
        padding: 3rem 0;
    }

    .mstax-match-shell {
        width: calc(100% - 24px);
    }

    .mstax-match-heading-row {
        gap: 1rem;
    }

    .mstax-match-title {
        font-size: 1.55rem;
    }

    .mstax-match-chart {
        min-height: 220px;
    }

    .mstax-match-chart svg {
        height: 185px;
    }
}
