/*
 * Video screen (tv) (design 3), 8.11.2026. Replaces the reel with arrows and the cyan progress bar.
 * One large screen that plays inline + a list of videos with name, context and (when verified) a result.
 * Desktop: screen beside the list and sticky while the list scrolls. Phone: screen on top, list below,
 * first four rows and a "more" button. JS: assets/js/tv-v3.js.
 */
html body.tomaso-v3 .v3 .v3-tv {
	display: grid;
	grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
	gap: clamp(28px, 4vw, 64px);
	align-items: start;
}

/* the screen */
html body.tomaso-v3 .v3 .v3-tv-screen {
	position: sticky;
	top: calc(var(--v3-h, 84px) + 72px);
	margin: 0;
}
html body.tomaso-v3 .v3 .v3-tv-media {
	position: relative;
	aspect-ratio: 9 / 16;
	max-height: min(76vh, 720px);
	margin-inline: auto;
	overflow: hidden;
	border: 1px solid var(--v3-line);
	border-radius: 22px;
	background: #000;
}
html body.tomaso-v3 .v3 .v3-tv-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s var(--v3-ease);
}
html body.tomaso-v3 .v3 .v3-tv-media::after {
	content: "";
	position: absolute;
	inset: 45% 0 0;
	background: linear-gradient(180deg, transparent, rgba(5, 5, 26, .92));
	pointer-events: none;
}
html body.tomaso-v3 .v3 .v3-tv-play {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
html body.tomaso-v3 .v3 .v3-tv-play span {
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	background: var(--v3-cyan);
	color: #05051a;
	box-shadow: 0 0 0 10px rgba(56, 196, 218, .18);
	transition: transform .3s var(--v3-ease), box-shadow .3s var(--v3-ease);
}
html body.tomaso-v3 .v3 .v3-tv-play svg {
	width: 34px;
	height: 34px;
	margin-inline-start: 5px;
}
html body.tomaso-v3 .v3 .v3-tv-play:hover span,
html body.tomaso-v3 .v3 .v3-tv-play:focus-visible span {
	transform: scale(1.06);
	box-shadow: 0 0 0 16px rgba(56, 196, 218, .16);
}
html body.tomaso-v3 .v3 .v3-tv-play:hover + img,
html body.tomaso-v3 .v3 .v3-tv-media:hover img {
	transform: scale(1.03);
}
html body.tomaso-v3 .v3 .v3-tv-now {
	position: absolute;
	inset: auto 0 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 22px 24px 24px;
	pointer-events: none;
}
html body.tomaso-v3 .v3 .v3-tv-now b {
	color: #fff;
	font: 700 22px/1.25 var(--v3-body);
}
html body.tomaso-v3 .v3 .v3-tv-now span {
	color: rgba(255, 255, 255, .82);
	font: 500 15px/1.5 var(--v3-body);
}
html body.tomaso-v3 .v3 .v3-tv-media iframe {
	position: absolute;
	inset: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	border: 0;
}
html body.tomaso-v3 .v3 .v3-tv-screen.is-playing .v3-tv-play,
html body.tomaso-v3 .v3 .v3-tv-screen.is-playing .v3-tv-now {
	display: none;
}

/* the list */
html body.tomaso-v3 .v3 .v3-tv-list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--v3-line);
}
html body.tomaso-v3 .v3 .v3-tv-list li {
	margin: 0;
	border-bottom: 1px solid var(--v3-line);
}
html body.tomaso-v3 .v3 .v3-tv-row {
	display: grid;
	grid-template-columns: 62px minmax(0, 1fr) auto;
	gap: 18px;
	align-items: center;
	width: 100%;
	min-height: 64px;
	margin: 0;
	padding: 16px 14px;
	border: 0;
	border-radius: 14px;
	background: transparent;
	color: #fff;
	text-align: start;
	cursor: pointer;
	transition: background-color .25s var(--v3-ease);
}
html body.tomaso-v3 .v3 .v3-tv-row:hover {
	background: rgba(255, 255, 255, .04);
}
html body.tomaso-v3 .v3 .v3-tv-row:focus-visible {
	outline: 2px solid var(--v3-cyan);
	outline-offset: -2px;
}
html body.tomaso-v3 .v3 .v3-tv-row.is-on {
	background: rgba(56, 196, 218, .08);
}
html body.tomaso-v3 .v3 .v3-tv-thumb {
	position: relative;
	display: block;
	width: 62px;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 9px;
	background: #000;
}
html body.tomaso-v3 .v3 .v3-tv-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
html body.tomaso-v3 .v3 .v3-tv-row.is-on .v3-tv-thumb {
	box-shadow: 0 0 0 2px var(--v3-cyan);
}
html body.tomaso-v3 .v3 .v3-tv-text {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}
html body.tomaso-v3 .v3 .v3-tv-text b {
	color: #fff;
	font: 700 19px/1.3 var(--v3-body);
	transition: color .25s;
}
html body.tomaso-v3 .v3 .v3-tv-row.is-on .v3-tv-text b {
	color: var(--v3-cyan);
}
html body.tomaso-v3 .v3 .v3-tv-text span {
	color: var(--v3-mute);
	font: 500 15.5px/1.5 var(--v3-body);
}
html body.tomaso-v3 .v3 .v3-tv-text em {
	align-self: flex-start;
	margin-top: 4px;
	padding: 4px 11px;
	border: 1px solid rgba(56, 196, 218, .4);
	border-radius: 999px;
	color: var(--v3-cyan);
	font: 700 13.5px/1.35 var(--v3-body);
	font-style: normal;
}
html body.tomaso-v3 .v3 .v3-tv-dur {
	color: var(--v3-faint);
	font: 600 14px/1 var(--v3-body);
	font-variant-numeric: tabular-nums;
}
html body.tomaso-v3 .v3 .v3-tv-more {
	display: none;
}

@media (max-width: 1024px) {
	html body.tomaso-v3 .v3 .v3-tv {
		grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
		gap: 28px;
	}
}

@media (max-width: 767px) {
	html body.tomaso-v3 .v3 .v3-tv {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}
	html body.tomaso-v3 .v3 .v3-tv-screen {
		position: relative;
		top: auto;
	}
	html body.tomaso-v3 .v3 .v3-tv-media {
		width: min(100%, calc(68svh * 9 / 16));
		max-height: none;
		border-radius: 18px;
	}
	html body.tomaso-v3 .v3 .v3-tv-play span {
		width: 68px;
		height: 68px;
	}
	html body.tomaso-v3 .v3 .v3-tv-play svg {
		width: 28px;
		height: 28px;
	}
	html body.tomaso-v3 .v3 .v3-tv-now {
		padding: 18px 18px 18px;
	}
	html body.tomaso-v3 .v3 .v3-tv-now b {
		font-size: 19px;
	}
	html body.tomaso-v3 .v3 .v3-tv-now span {
		font-size: 14px;
	}
	html body.tomaso-v3 .v3 .v3-tv-row {
		grid-template-columns: 50px minmax(0, 1fr) auto;
		gap: 14px;
		padding: 13px 8px;
	}
	html body.tomaso-v3 .v3 .v3-tv-thumb {
		width: 50px;
		border-radius: 8px;
	}
	html body.tomaso-v3 .v3 .v3-tv-text b {
		font-size: 17px;
	}
	html body.tomaso-v3 .v3 .v3-tv-text span {
		font-size: 14.5px;
	}
	html body.tomaso-v3 .v3 .v3-tv-text em {
		font-size: 13px;
	}
	html body.tomaso-v3 .v3 .v3-tv:not(.is-open) .v3-tv-list li:nth-child(n+5) {
		display: none;
	}
	html body.tomaso-v3 .v3 .v3-tv-more {
		display: block;
		width: 100%;
		min-height: 48px;
		margin: 6px 0 0;
		padding: 12px 20px;
		border: 1px solid var(--v3-line);
		border-radius: 999px;
		background: transparent;
		color: #fff;
		font: 700 16px/1.3 var(--v3-body);
		cursor: pointer;
	}
	html body.tomaso-v3 .v3 .v3-tv-more[hidden] {
		display: none;
	}
}

/* 9.11.2026: phone layer for stages marked data-tv-inplace (tv-v3.js). The page underneath never moves. */
html.v3-tv-lock,
html.v3-tv-lock body {
	overflow: hidden;
}
.v3-tv-pop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 64px 16px 24px;
	background: rgba(3, 3, 16, .94);
	overscroll-behavior: contain;
}
.v3-tv-pop-box {
	position: relative;
	width: min(100%, calc((100svh - 100px) * 9 / 16));
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 18px;
	background: #000;
}
.v3-tv-pop-box iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.v3-tv-pop-x {
	position: absolute;
	top: 12px;
	left: 12px;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font: 400 30px/1 Arial, sans-serif;
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	html body.tomaso-v3 .v3 .v3-tv-media img,
	html body.tomaso-v3 .v3 .v3-tv-play span {
		transition: none;
	}
}
