#viz-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #eee;
    gap: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#viz-title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-family: inherit; 
    font-size: clamp(14px, 1.2vw, 20px);
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
}


#viz-title a {
    display: inline-flex;
    vertical-align: middle;
}

#legend-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.legend-item {
    display: flex;        
    align-items: center;
    font-size: clamp(10px, 0.8vw, 12px);
    white-space: nowrap;
    font-family: inherit;
}

.color-swatch {
    width: 12px;
    height: 12px;
    margin-right: 5px;
    flex-shrink: 0;
    border-radius: 2px;
}

.legend-count {
    font-weight: normal;
    font-size: 11px;
    color: #666;
    margin-left: 3px;
}