body.hod-timeline-lab-page,
.hod-history-preview {
	--hod-navy: #082a3b;
	--hod-orange: #ff7a45;
	--hod-paper: #f7f4ed;
	--hod-white: #fff;
	--hod-radius: 18px;
}

body.hod-timeline-lab-page {
	min-width: 320px;
	margin: 0;
	background: var(--hod-paper);
	color: var(--hod-navy);
}

.hod-lab-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 4rem;
	padding: 0.6rem clamp(1rem, 4vw, 3rem);
	border-top: 6px solid var(--hod-orange);
	border-bottom: 1px solid var(--hod-navy);
	background: rgba(247, 244, 237, 0.96);
}

.hod-lab-brand {
	display: block;
	width: clamp(10rem, 18vw, 13.5rem);
	line-height: 0;
}

.hod-lab-brand img {
	display: block;
	width: 100%;
	height: auto;
}

.hod-lab-header p {
	margin: 0;
	font-family: var(--wp--preset--font-family--utility);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.hod-lab-main {
	min-height: calc(100vh - 5rem);
	padding: clamp(1rem, 3vw, 2.25rem) 0;
}

.hod-history-preview {
	width: min(72.5rem, calc(100% - 1.5rem));
	margin-inline: auto;
}

.hod-main-content .hod-history-preview {
	margin-block: clamp(1rem, 2vw, 1.75rem);
}

[data-hod-swipe].is-dragging {
	cursor: grabbing;
}

[data-hod-swipe]:focus-visible {
	outline: 3px solid #ffcb3d;
	outline-offset: 4px;
}

.hod-history-scrubber:focus-visible {
	outline: 3px solid #ffcb3d;
	outline-offset: 4px;
}

.hod-history-stage {
	display: grid;
	gap: clamp(0.45rem, 1vw, 0.7rem);
}

.hod-history-media {
	position: relative;
	aspect-ratio: 1;
	min-width: 0;
	overflow: hidden;
	border-radius: calc(var(--hod-radius) * 0.8);
	background: var(--hod-navy);
	box-shadow: 0 1rem 2.6rem rgba(8, 42, 59, 0.16);
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
}

.hod-history-image-track {
	display: flex;
	width: 100%;
	height: 100%;
	will-change: transform;
}

.hod-history-image {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	margin: 0;
	overflow: hidden;
	background: var(--hod-navy);
}

.hod-history-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	user-select: none;
}

.hod-history-image-controls {
	position: absolute;
	inset: 50% 0.65rem auto;
	display: flex;
	justify-content: space-between;
	pointer-events: none;
	transform: translateY(-50%);
}

.hod-history-image-controls button {
	display: grid;
	width: 2.6rem;
	height: 2.6rem;
	padding: 0;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.82);
	border-radius: 50%;
	background: rgba(8, 42, 59, 0.88);
	color: #fff;
	font: 800 1.25rem/1 var(--wp--preset--font-family--utility);
	opacity: 0;
	pointer-events: auto;
	cursor: pointer;
	transform: translateX(-0.35rem);
	transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.hod-history-image-controls button:last-child {
	transform: translateX(0.35rem);
}

.hod-history-media:hover .hod-history-image-controls button,
.hod-history-media:focus-within .hod-history-image-controls button,
.hod-history-image-controls button:focus-visible {
	opacity: 1;
	transform: translateX(0);
}

.hod-history-image-controls button:hover,
.hod-history-image-controls button:focus-visible {
	background: var(--hod-orange);
}

.hod-history-image-controls button:disabled {
	opacity: 0;
	pointer-events: none;
}

.hod-history-copy {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
	min-height: 0;
}

.hod-history-date-viewport,
.hod-history-text-viewport {
	position: relative;
	min-width: 0;
	overflow: hidden;
	cursor: grab;
	touch-action: pan-y;
}

.hod-history-date-viewport {
	flex: 0 0 3.8rem;
	height: 3.8rem;
	border-radius: calc(var(--hod-radius) * 0.55);
	background: var(--hod-navy);
	color: var(--hod-white);
}

.hod-history-date-track,
.hod-history-text-track {
	display: flex;
	width: 100%;
	height: 100%;
	will-change: transform;
}

.hod-history-date {
	display: flex;
	flex: 0 0 100%;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	box-sizing: border-box;
	padding: 0.45rem clamp(1rem, 3vw, 1.35rem);
	font-family: var(--wp--preset--font-family--utility);
	text-transform: uppercase;
}

.hod-history-date span {
	color: var(--hod-orange);
	font-size: clamp(1.05rem, 2.6vw, 1.35rem);
	font-weight: 900;
	letter-spacing: 0.05em;
}

.hod-history-date strong {
	color: var(--hod-white);
	font-size: clamp(1.8rem, 5vw, 2.65rem);
	font-weight: 900;
	line-height: 1;
}

.hod-history-scrubber {
	position: relative;
	box-sizing: border-box;
	flex: 0 0 15px;
	width: 100%;
	height: 15px;
	border: 1px solid rgba(8, 42, 59, 0.3);
	border-radius: 2px;
	background: rgba(8, 42, 59, 0.15);
	cursor: grab;
	touch-action: none;
	user-select: none;
}

.hod-history-scrubber::before {
	position: absolute;
	inset: -8px 0;
	content: "";
}

.hod-history-scrubber.is-dragging {
	cursor: grabbing;
}

.hod-history-scrubber-progress {
	position: absolute;
	inset: 0;
	background: rgba(240, 90, 40, 0.34);
	border-radius: 1px;
	transform: scaleX(0);
	transform-origin: left center;
	will-change: transform;
}

.hod-history-scrubber-thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: clamp(2.75rem, 13%, 4rem);
	height: 100%;
	border-radius: 1px;
	background: var(--hod-orange);
	box-shadow: 0 0 0 1px rgba(8, 42, 59, 0.25);
	will-change: transform;
}

.hod-history-years {
	display: grid;
	grid-template-columns: repeat(11, minmax(0, 1fr));
	gap: 0.2rem;
	width: 100%;
}

.hod-history-years button {
	min-width: 0;
	min-height: 2rem;
	padding: 0.35rem 0.05rem;
	border: 0;
	border-radius: 0.25rem;
	background: transparent;
	color: var(--hod-navy);
	font: 800 clamp(0.9rem, 1.5vw, 1.06rem)/1 var(--wp--preset--font-family--utility);
	cursor: pointer;
	transition: background 160ms ease, color 160ms ease;
}

.hod-history-years button:hover,
.hod-history-years button:focus-visible {
	background: rgba(8, 42, 59, 0.1);
}

.hod-history-years button[aria-current="true"] {
	background: var(--hod-navy);
	color: #fff;
}

.hod-history-text-viewport {
	flex: 0 0 auto;
	height: 10rem;
	min-height: 4.5rem;
	max-height: 17.5rem;
	border-radius: calc(var(--hod-radius) * 0.72);
	background: var(--hod-white);
	box-shadow: 0 0.7rem 1.8rem rgba(8, 42, 59, 0.1);
	transition: height 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hod-history-quote {
	flex: 0 0 100%;
	box-sizing: border-box;
	height: 100%;
	margin: 0;
	overflow-y: auto;
	padding: clamp(0.85rem, 2.4vw, 1rem);
	overscroll-behavior: contain;
}

.hod-history-quote p {
	margin: 0;
	color: #202327;
	font-family: var(--wp--preset--font-family--body);
	font-size: clamp(1.15rem, 2vw, 1.25rem);
	line-height: 1.45;
}

@media (min-width: 46rem) {
	.hod-history-stage {
		grid-template-columns: clamp(25rem, 31.25vw, 30rem) minmax(0, 1fr);
		height: clamp(25rem, 31.25vw, 30rem);
		align-items: stretch;
	}

	.hod-history-media {
		height: 100%;
		aspect-ratio: 1;
	}

	.hod-history-copy {
		align-self: stretch;
		justify-content: flex-end;
		box-sizing: border-box;
		height: 100%;
		padding-bottom: 25px;
	}

	.hod-history-text-viewport {
		max-height: 13.5rem;
	}

	.hod-history-date-viewport {
		flex-basis: 4.25rem;
		height: 4.25rem;
	}

	.hod-history-date span {
		font-size: clamp(1.31rem, 3.25vw, 1.69rem);
	}

	.hod-history-date strong {
		font-size: clamp(2.25rem, 6.25vw, 3.31rem);
	}

	.hod-history-years button {
		min-height: 2.5rem;
	}
}

@media (min-width: 46rem) and (max-width: 70rem) {
	.hod-history-text-viewport {
		max-height: 11.5rem;
	}

	.hod-history-years {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

@media (max-width: 45.99rem) {
	.hod-history-copy {
		display: contents;
	}

	.hod-history-media {
		order: 1;
	}

	.hod-history-text-viewport {
		order: 2;
		height: 8rem;
		max-height: 11.5rem;
	}

	.hod-history-date-viewport {
		order: 3;
		height: 3.45rem;
	}

	.hod-history-scrubber {
		order: 4;
	}

	.hod-history-years {
		order: 5;
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 0.15rem 0.3rem;
	}

	.hod-history-years button {
		min-height: 2.2rem;
		font-size: 0.9rem;
	}

	body.hod-mobile-b .hod-history-date-viewport {
		order: 2;
	}

	body.hod-mobile-b .hod-history-text-viewport {
		order: 3;
	}

	body.hod-mobile-c .hod-history-stage {
		grid-template-areas:
			"text"
			"visual";
	}

	body.hod-mobile-c .hod-history-media {
		grid-area: visual;
	}

	body.hod-mobile-c .hod-history-text-viewport {
		grid-area: text;
	}

	body.hod-mobile-c .hod-history-date-viewport {
		z-index: 2;
		grid-area: visual;
		align-self: end;
		margin: 0.65rem;
		background: rgba(8, 42, 59, 0.92);
		box-shadow: 0 0.4rem 1rem rgba(8, 42, 59, 0.2);
		backdrop-filter: blur(6px);
	}
}

@media (hover: none), (pointer: coarse) {
	.hod-history-image-controls button:not(:disabled) {
		opacity: 0.82;
		transform: translateX(0);
	}
}

@media (max-width: 42rem) {
	.hod-lab-header p {
		display: none;
	}

	.hod-lab-main {
		padding-top: 1rem;
	}

	.hod-history-preview {
		width: min(100% - 1rem, 35rem);
	}

	.hod-main-content .hod-history-preview {
		margin-block: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hod-history-text-viewport {
		transition: none;
	}

	.hod-history-image-track,
	.hod-history-date-track,
	.hod-history-text-track {
		scroll-behavior: auto;
	}
}
