/* Stats tab — ecosystem-wide numbers. Section-grouped grid of stat cards.
   Lives outside the marketplace-stats classes because those are sized for
   a 4-up row inside the marketplace toolbar context — the Stats tab needs
   bigger cards with optional sublabels, multiple sections, and full-width
   responsive behavior. */

.stats-section {
    margin-bottom: 32px;
}

.stats-section:last-of-type {
    margin-bottom: 24px;
}

.stats-section-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--text-main);
    margin: 0 0 12px;
    text-transform: uppercase;
    opacity: 0.85;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.stats-card {
    background: var(--bg-card);
    border: 1px solid rgba(127, 234, 245, 0.10);
    border-radius: 14px;
    padding: 16px 18px;
    transition: border-color 0.15s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 116px;
}

.stats-card:hover {
    border-color: rgba(127, 234, 245, 0.32);
}

.stats-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stats-card-icon {
    font-size: 16px;
    line-height: 1;
}

.stats-card-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.stats-card-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-card-value {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.5vw, 36px);
    color: var(--text-main);
    line-height: 1.05;
    background: linear-gradient(135deg, #fff 0%, #b3f2fa 60%, #2dd4e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-card-sub {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
    margin-top: auto;
}

.stats-card-sub [data-stat-aux] {
    color: var(--text-main);
    font-weight: 600;
}

.stats-footnote {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    opacity: 0.7;
}

@media (max-width: 720px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .stats-card {
        padding: 12px 14px;
        min-height: 96px;
        gap: 6px;
    }
    .stats-card-head {
        font-size: 10px;
    }
}
