.stat-board-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.statboard-title {
    margin-bottom: 8px;
}

.statboard-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--infradac-green-dark);
}

body.dark-mode .statboard-title h3 {
    color: var(--infradac-gold);
}

.stat-board-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.stat-carousel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--infradac-border);
    background: var(--infradac-surface);
    align-items: stretch;
}

.stat-item {
    min-width: 220px;
    min-inline-size: 0;
    flex: 1 1 calc((100% - 48px) / 4);
    max-width: calc((100% - 48px) / 4);
}

.stat-item.highlighted {
    border-color: color-mix(in srgb, var(--infradac-gold) 54%, var(--infradac-border));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--infradac-gold) 24%, transparent);
}

body.dark-mode .stat-item.highlighted,
html.dark-mode .stat-item.highlighted {
    border-color: color-mix(in srgb, var(--infradac-green) 76%, white);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--infradac-green) 50%, transparent),
        0 0 0 1px color-mix(in srgb, var(--infradac-green) 22%, transparent);
}

@media (max-width: 1100px) {
    .stat-item {
        flex-basis: calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
    }
}

@media (max-width: 640px) {
    .stat-board-wrapper,
    .stat-board-container {
        min-width: 0;
    }

    .statboard-title h3 {
        font-size: 1rem;
        line-height: 1.25;
    }

    .stat-carousel {
        padding: 12px;
        border-radius: 14px;
    }

    .stat-item {
        flex-basis: 100%;
        max-width: 100%;
        min-width: 0;
    }
}
