.consistency-stats .stat-value {
    font-size: 24px;
}

.toggle-group {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.toggle-group .btn {
    border-color: transparent;
}

.toggle-group .btn.is-active {
    background: #0f172a;
    color: #ffffff;
}

.heatmap-card {
    margin-bottom: 18px;
    overflow-x: auto;
}

.heatmap-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.heatmap-year {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    min-width: 48px;
    text-align: center;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: 80px repeat(31, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 0 16px;
    width: 100%;
}

.heatmap-label {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

.heatmap-cell {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.heatmap-cell.is-empty {
    background: #f1f5f9;
    border-color: #e2e8f0;
    cursor: default;
}

.heatmap-cell.level-1 {
    background: #d1ffee;
    border-color: #b3ffe5;
}

.heatmap-cell.level-2 {
    background: #b3ffe5;
    border-color: #7dffcf;
}

.heatmap-cell.level-3 {
    background: #7dffcf;
    border-color: #33ffb0;
}

.heatmap-cell.level-4 {
    background: #33ffb0;
    border-color: #00ff99;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.legend-chip {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
}

.legend-chip.level-1 {
    background: #d1ffee;
    border-color: #b3ffe5;
}

.legend-chip.level-2 {
    background: #b3ffe5;
    border-color: #7dffcf;
}

.legend-chip.level-3 {
    background: #7dffcf;
    border-color: #33ffb0;
}

.legend-chip.level-4 {
    background: #33ffb0;
    border-color: #00ff99;
}

.chip-neutral {
    background: #e2e8f0;
    color: #475569;
    border-color: #e2e8f0;
}

.breakdown-grid .stat-card.compact {
    padding: 14px;
}

.heatmap-tooltip {
    position: fixed;
    z-index: 20;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    color: #0f172a;
    pointer-events: none;
    min-width: 160px;
}

.heatmap-tooltip p {
    margin: 4px 0;
}

body.dark .toggle-group {
    background: #0f1318;
    border-color: #1f2937;
}

body.dark .toggle-group .btn.is-active {
    background: #ffffff;
    color: #0f172a;
}

body.dark .heatmap-year {
    color: #f8fafc;
}

body.dark .heatmap-cell {
    background: #0f1318;
    border-color: #1f2937;
}

body.dark .heatmap-cell.is-empty {
    background: #0f1318;
    border-color: #1f2937;
}

body.dark .heatmap-cell.level-1 {
    background: rgba(0, 255, 153, 0.2);
    border-color: rgba(0, 255, 153, 0.35);
}

body.dark .heatmap-cell.level-2 {
    background: rgba(0, 255, 153, 0.35);
    border-color: rgba(0, 255, 153, 0.5);
}

body.dark .heatmap-cell.level-3 {
    background: rgba(0, 255, 153, 0.5);
    border-color: rgba(0, 255, 153, 0.65);
}

body.dark .heatmap-cell.level-4 {
    background: rgba(0, 255, 153, 0.75);
    border-color: rgba(0, 255, 153, 0.85);
}

body.dark .heatmap-tooltip {
    background: #0f1318;
    border-color: #1f2937;
    color: #e2e8f0;
}

body.dark .chip-neutral {
    background: #1f2937;
    color: #cbd5f5;
    border-color: #1f2937;
}

