/* Trifecta Performance Metrics — card row + stacked ratio bar. */

.tf-perf-metrics {
	margin: 20px 0 24px;
}

.tf-perf-metrics__cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-top: 1px solid #e5e7eb;
	border-bottom: 1px solid #e5e7eb;
}

.tf-perf-card {
	padding: 16px 18px;
	border-right: 1px solid #e5e7eb;
	min-width: 0;
}

.tf-perf-card:last-child {
	border-right: 0;
}

.tf-perf-card__label {
	text-transform: uppercase;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.6px;
	color: #6b7280;
	margin-bottom: 6px;
}

.tf-perf-card__value {
	display: flex;
	align-items: baseline;
	gap: 4px;
	line-height: 1;
	margin-bottom: 8px;
	color: #111827;
}

.tf-perf-card__number {
	font-size: 26px;
	font-weight: 700;
}

.tf-perf-card__unit {
	font-size: 13px;
	font-weight: 500;
	color: #6b7280;
}

.tf-perf-card__badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tf-perf-card__badge::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

.tf-perf-card__badge--good     { color: #16a34a; }
.tf-perf-card__badge--moderate { color: #ea580c; }
.tf-perf-card__badge--caution  { color: #dc2626; }

/* Energy distribution bar */

.tf-perf-ratio {
	padding: 16px 0 4px;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 0;
}

.tf-perf-ratio__label {
	text-transform: uppercase;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.6px;
	color: #6b7280;
	margin-bottom: 10px;
}

.tf-perf-ratio__bar {
	display: flex;
	height: 10px;
	background: #e5e7eb;
	border-radius: 5px;
	overflow: hidden;
	margin-bottom: 10px;
}

.tf-perf-ratio__seg {
	display: block;
	height: 100%;
}

.tf-perf-ratio__seg--protein { background: #111827; }
.tf-perf-ratio__seg--carbs   { background: #f97316; }
.tf-perf-ratio__seg--fat     { background: #9ca3af; }

.tf-perf-ratio__legend {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	font-size: 13px;
	color: #1f2937;
}

.tf-perf-ratio__legend li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tf-perf-ratio__dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	flex-shrink: 0;
}

.tf-perf-ratio__dot--protein { background: #111827; }
.tf-perf-ratio__dot--carbs   { background: #f97316; }
.tf-perf-ratio__dot--fat     { background: #9ca3af; }

@media (max-width: 575px) {
	.tf-perf-metrics__cards {
		grid-template-columns: 1fr;
	}
	.tf-perf-card {
		border-right: 0;
		border-bottom: 1px solid #e5e7eb;
		padding: 14px 4px;
	}
	.tf-perf-card:last-child {
		border-bottom: 0;
	}
	.tf-perf-ratio {
		padding-left: 0;
		padding-right: 0;
	}
	.tf-perf-ratio__legend {
		gap: 6px 14px;
		font-size: 12px;
	}
}
