.gtw {
	--gtw-label-w: 20%;
	--gtw-bar-h: 32px;
	--gtw-year-color: #0b4bd1;
	--gtw-text: #0b1b3a;
	--gtw-muted: #4a5578;
	--gtw-line: #dfe3ea;
	--gtw-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	width: 100%;
	box-sizing: border-box;
	color: var(--gtw-text);
}

.gtw *,
.gtw *::before,
.gtw *::after {
	box-sizing: border-box;
}

/* Header with years */
.gtw-head,
.gtw-row {
	display: flex;
	align-items: center;
	width: 100%;
}

.gtw-label-col {
	flex: 0 0 var(--gtw-label-w);
	max-width: var(--gtw-label-w);
	padding-right: 16px;
	font-size: 16px;
	line-height: 1.3;
}

.gtw-track {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.gtw-years {
	display: flex;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--gtw-line);
}

.gtw-year {
	flex: 1 1 0;
	font-family: var(--gtw-mono);
	font-size: 14px;
	letter-spacing: 0.02em;
	color: var(--gtw-year-color);
}

/* Rows */
.gtw-row {
	padding: 9px 0;
}

.gtw-row:first-of-type {
	padding-top: 18px;
}

.gtw-row .gtw-track {
	height: var(--gtw-bar-h);
}

.gtw-bar {
	position: absolute;
	top: 0;
	height: 100%;
	display: flex;
	align-items: center;
	min-width: 6px;
	padding: 0 14px;
	border-radius: 8px;
	overflow: hidden;
}

.gtw-bar span {
	font-family: var(--gtw-mono);
	font-size: 12px;
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Legend */
.gtw-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 32px;
	margin-top: 28px;
	padding-left: var(--gtw-label-w);
	font-size: 15px;
	color: var(--gtw-muted);
}

.gtw-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.gtw-swatch {
	display: inline-block;
	width: 16px;
	height: 16px;
	border-radius: 4px;
	flex: 0 0 auto;
}

/* Mobile: stack label above bar */
@media (max-width: 640px) {
	.gtw-head .gtw-label-col {
		display: none;
	}

	.gtw-row {
		flex-direction: column;
		align-items: stretch;
		padding: 10px 0;
	}

	.gtw-row:first-of-type {
		padding-top: 16px;
	}

	.gtw-row .gtw-label-col {
		flex: none;
		max-width: none;
		padding: 0 0 6px;
		font-size: 15px;
	}

	.gtw-legend {
		padding-left: 0;
	}
}
