/* Salary USD Power Lens */
.spl-wrap {
    position: relative;
    margin: 0 0 var(--card-gap, 20px);
    border-radius: 16px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

[data-theme="light"] .spl-wrap {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.spl-wrap--compact {
    margin-bottom: 14px;
}

.spl-inner {
    position: relative;
    padding: 22px 20px 20px;
}

.spl-glow {
    display: none;
}

.spl-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.spl-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(62, 255, 160, 0.12);
    padding: 4px 8px;
    border-radius: 6px;
}

.spl-title {
    font-family: var(--font, 'Inter', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-0);
    margin: 6px 0 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.spl-sub {
    font-size: 11px;
    color: var(--text-3);
    margin: 4px 0 0;
    line-height: 1.4;
}

.spl-salary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.spl-salary-field {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.spl-salary-row label {
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
}

.spl-salary-input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    font-variant-numeric: tabular-nums;
}

[data-theme="light"] .spl-salary-input {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

.spl-compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.spl-year-box {
    min-width: 0;
    text-align: center;
    padding: 12px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.spl-year-box--then {
    border-color: rgba(120, 180, 255, 0.25);
}

.spl-year-box--now {
    border-color: rgba(62, 255, 160, 0.35);
    box-shadow: 0 0 24px rgba(62, 255, 160, 0.08);
}

.spl-year-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-3);
    text-transform: uppercase;
}

.spl-usd {
    font-family: var(--font, 'Inter', system-ui, sans-serif);
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 700;
    color: var(--text-0);
    line-height: 1.15;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.spl-wrap--compact .spl-usd {
    font-size: 22px;
}

.spl-usd--accent {
    color: var(--accent);
}

.spl-rate-hint {
    font-size: 10px;
    color: var(--text-3);
    margin-top: 4px;
}

.spl-arrow {
    font-size: 20px;
    color: var(--text-3);
    opacity: 0.7;
}

.spl-meter {
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.spl-meter-top {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 6px;
}

.spl-meter-top strong {
    color: var(--text-0);
    font-weight: 600;
}

.spl-meter-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.spl-meter-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(62, 255, 160, 0.55), var(--accent));
    transition: width 0.5s ease;
}

.spl-insight {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-2);
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.spl-insight strong {
    color: var(--accent);
    font-weight: 600;
}

.spl-years {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    position: relative;
    z-index: 1;
}

.spl-years::-webkit-scrollbar {
    display: none;
}

.spl-year-chip {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    transition: all 0.2s;
}

.spl-year-chip.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(62, 255, 160, 0.1);
}

.spl-loading {
    padding: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
}

.spl-skeleton {
    height: 120px;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: spl-shimmer 1.2s infinite;
}

/* Background refresh — keep slider mounted; subtle dim only */
.spl-wrap--fetching .spl-compare--dim,
.spl-wrap--fetching .spl-meter.spl-compare--dim,
.spl-wrap--fetching .spl-insight.spl-compare--dim {
    opacity: 0.72;
    transition: opacity 0.2s ease;
}

.spl-wrap--fetching .spl-salary-field {
    opacity: 1;
}

@keyframes spl-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Portrait mobile: stack compare + readable numbers (no Syne stretch) */
@media (max-width: 520px) {
    .spl-wrap {
        margin-bottom: 10px;
    }

    .spl-inner {
        padding: 16px 14px 14px;
        overflow: hidden;
    }

    .spl-head {
        margin-bottom: 14px;
    }

    .spl-title {
        font-size: 14px;
        line-height: 1.35;
    }

    .spl-sub {
        font-size: 11px;
        line-height: 1.45;
    }

    .spl-salary-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-bottom: 14px;
    }

    .spl-salary-row label {
        white-space: normal;
    }

    .spl-compare {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-bottom: 12px;
    }

    .spl-arrow {
        align-self: center;
        transform: rotate(90deg);
        font-size: 16px;
        line-height: 1;
        margin: 0;
        opacity: 0.5;
    }

    .spl-year-box {
        padding: 14px 12px;
    }

    .spl-usd {
        font-size: clamp(18px, 6.5vw, 24px);
        font-weight: 700;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .spl-usd::-webkit-scrollbar {
        display: none;
    }

    .spl-wrap--compact .spl-usd {
        font-size: clamp(17px, 6vw, 22px);
    }

    .spl-meter {
        margin-bottom: 12px;
    }

    .spl-meter-top {
        flex-wrap: wrap;
        gap: 4px 8px;
        font-size: 10px;
        line-height: 1.35;
    }

    .spl-meter-top span:first-child {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .spl-insight {
        font-size: 11px;
        line-height: 1.55;
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    .spl-insight strong {
        font-weight: 600;
    }

    .spl-years {
        gap: 5px;
        padding-bottom: 2px;
    }

    .spl-year-chip {
        font-size: 10px;
        padding: 5px 9px;
    }
}
