/* Proof: what lands on disk after Stop, and how it opens in an editor */

.proof {
	/* The recorder pill's material. Same values as .dock in styles.css. */
	--ink: #f5f5f7;
	--ink2: rgba(245, 245, 247, 0.66);
	--ink3: rgba(245, 245, 247, 0.62);
	--glass: linear-gradient(180deg, rgba(66, 66, 72, 0.52), rgba(28, 28, 32, 0.64));
	--glass-ring: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
	--glass-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 6px 14px -4px rgba(0, 0, 0, 0.35), 0 22px 50px -10px rgba(0, 0, 0, 0.5), 0 50px 100px -30px rgba(0, 0, 0, 0.45);
	--hair: rgba(255, 255, 255, 0.07);

	/* Two quiet source hues: picture and sound */
	--c-video: #a7b3c4;
	--c-audio: #d9a066;
	--th: 116px;
	position: relative;
	isolation: isolate;
	overflow-x: clip;
	padding-top: clamp(56px, 7vw, 104px) !important;
	padding-bottom: clamp(48px, 7vw, 96px) !important;
}

/* Ember carries on from the hero so the scroll never passes through a black band */
.proof::before {
	content: "";
	position: absolute;
	z-index: -2;
	inset: 0 0 auto;
	height: calc(100% - 200px);
	pointer-events: none;
	background:
		radial-gradient(60% 34% at 24% 26%, rgba(184, 64, 31, 0.22), rgba(184, 64, 31, 0) 100%),
		radial-gradient(50% 30% at 70% 44%, rgba(240, 162, 74, 0.08), rgba(240, 162, 74, 0) 100%);
	-webkit-mask-image: linear-gradient(180deg, transparent 0, #000 260px);
	mask-image: linear-gradient(180deg, transparent 0, #000 260px);
}

.proof-head {
	max-width: 700px;
	margin-bottom: clamp(36px, 5vw, 64px);
}

.kicker {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	font: 500 12px/1 var(--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.kicker kbd {
	letter-spacing: 0;
	text-transform: none;
	font-size: 11px;
}

.proof-lede {
	margin: 0 0 14px;
	font-size: clamp(16px, 1.5vw, 18px);
	line-height: 1.55;
	max-width: 620px;
}

.proof-origin {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 12px;
	margin: 0;
	font: 400 13px/1.4 var(--mono);
	color: var(--dim);
}

.linkish {
	padding: 12px 0;
	margin: 0;
	border: 0;
	background: none;
	font: inherit;
	color: var(--text);
	text-decoration: underline;
	text-decoration-color: var(--line-strong);
	text-underline-offset: 4px;
	cursor: pointer;
	transition: text-decoration-color var(--fast) ease;
}

.linkish:hover {
	text-decoration-color: var(--amber);
}

/* The desk: no box. Two glass windows over ember light that fades into the page. */

.desk {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(20px, 3vw, 40px);
	align-items: start;
	color: var(--ink);
}

/* The hero's ember plate, masked to an ellipse that reaches zero well inside its own box */
.desk::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -16% calc(-1 * var(--gutter));
	background:
		radial-gradient(30% 38% at 62% 48%, rgba(240, 162, 74, 0.55), rgba(240, 162, 74, 0) 100%),
		radial-gradient(40% 50% at 32% 58%, rgba(184, 64, 31, 0.7), rgba(184, 64, 31, 0) 100%),
		radial-gradient(30% 40% at 86% 44%, rgba(232, 87, 79, 0.32), rgba(232, 87, 79, 0) 100%),
		url("/hero-poster.webp") 72% 58% / cover no-repeat;
	-webkit-mask-image: radial-gradient(closest-side, #000 42%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0) 94%);
	mask-image: radial-gradient(closest-side, #000 42%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0) 94%);
	pointer-events: none;
}

.desk-col {
	min-width: 0;
	display: grid;
	gap: 14px;
}

.tag {
	margin: 0 0 0 4px;
	font: 500 11px/1 var(--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

/* Windows: the pill's glass at window scale */

.win {
	position: relative;
	min-width: 0;
	border-radius: 18px;
	overflow: hidden;
	background: var(--glass);
	backdrop-filter: blur(30px) saturate(1.8) brightness(0.92);
	-webkit-backdrop-filter: blur(30px) saturate(1.8) brightness(0.92);
	box-shadow: var(--glass-shadow);
}

.win::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	border-radius: inherit;
	box-shadow: var(--glass-ring);
	background: radial-gradient(120% 40% at 50% -12%, rgba(255, 255, 255, 0.07), transparent 70%);
	pointer-events: none;
}

.win-bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 16px;
	border-bottom: 1px solid var(--hair);
}

.lights {
	position: absolute;
	left: 16px;
	display: flex;
	gap: 8px;
}

.lights i {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}

.win-title {
	display: flex;
	align-items: center;
	gap: 7px;
	max-width: calc(100% - 120px);
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 13px;
	font-weight: 500;
	color: var(--ink2);
}

.win-title svg {
	width: 15px;
	height: 15px;
	flex: none;
	color: var(--ink3);
}

.win-title b {
	font: 500 12px/1 var(--mono);
	color: var(--ink);
}

.win-foot {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	height: 34px;
	align-items: center;
	padding: 0 16px;
	border-top: 1px solid var(--hair);
	font: 400 11px/1 var(--mono);
	color: var(--ink3);
	font-variant-numeric: tabular-nums;
}

/* Finder-like list */

.finder-scroll {
	overflow: visible;
}

.flist {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-variant-numeric: tabular-nums;
}

.flist th {
	position: sticky;
	top: 0;
	z-index: 2;
	height: 30px;
	padding: 0 16px;
	border-bottom: 1px solid var(--hair);
	text-align: left;
	font: 500 11px/1 var(--ui);
	color: var(--ink3);
	transition: background-color var(--fast) ease;
}

.flist td {
	height: 30px;
	padding: 0 16px;
	font: 400 12px/1 var(--mono);
	color: var(--ink2);
	white-space: nowrap;
	transition: background-color var(--fast) ease;
}

.flist tr.t-1 td {
	background: rgba(255, 255, 255, 0.025);
}

.flist tr.is-first td {
	box-shadow: inset 0 1px 0 var(--hair);
}

.flist tbody tr:first-child td {
	box-shadow: none;
}

.c-len,
.c-size,
th.c-len,
th.c-size {
	text-align: right !important;
}

.c-len,
.c-size {
	color: var(--ink3) !important;
}

.c-name .nm {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.c-name svg {
	width: 15px;
	height: 15px;
	flex: none;
	color: var(--c, var(--ink3));
	opacity: 0.9;
}

.swatch {
	display: none;
}

.fname {
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
}

.s-screen,
.c-screen,
.s-camera,
.c-camera {
	--c: var(--c-video);
}
.s-mic,
.c-mic,
.s-system,
.c-system {
	--c: var(--c-audio);
}
.s-otio {
	--c: var(--ink3);
}

.desk[data-hl="1"] tr[data-take="1"] td,
.desk[data-hl="2"] tr[data-take="2"] td,
.desk[data-hl="3"] tr[data-take="3"] td,
.desk[data-hl="4"] tr[data-take="4"] td,
.desk[data-hl="5"] tr[data-take="5"] td,
.desk[data-hl="6"] tr[data-take="6"] td,
.desk[data-hl="7"] tr[data-take="7"] td,
.desk[data-hl="8"] tr[data-take="8"] td,
.desk[data-hl="otio"] tr[data-take="otio"] td {
	background: rgba(255, 255, 255, 0.07);
}

.flist tr[data-k] {
	cursor: default;
}

/* Timeline: every source on its own track */

.nle-body {
	position: relative;
	padding: 14px 16px 44px;
	min-height: 280px;
}

.nle-grid {
	display: grid;
	grid-template-columns: var(--th) minmax(0, 1fr);
	row-gap: 6px;
	align-items: stretch;
}

.ruler {
	position: relative;
	height: 26px;
	border-bottom: 1px solid var(--hair);
	overflow: hidden;
}

.tick {
	position: absolute;
	top: 0;
	bottom: 0;
	padding: 7px 0 0 6px;
	font: 400 11px/1 var(--mono);
	color: var(--ink3);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.tick i {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 1px;
	height: 8px;
	background: rgba(255, 255, 255, 0.2);
}

.th {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-right: 10px;
	min-width: 0;
	font-size: 12px;
	color: var(--ink2);
}

.th-name {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.th-tag {
	flex: none;
	min-width: 20px;
	font: 500 11px/1 var(--mono);
	color: var(--ink3);
}

.lane {
	position: relative;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.03);
}

.lane-video {
	height: 48px;
}

.lane-audio {
	height: 42px;
}

.lane.is-empty {
	background: rgba(255, 255, 255, 0.015);
	box-shadow: inset 0 0 0 1px var(--hair);
}

.lane-off {
	position: absolute;
	z-index: 4;
	left: 10px;
	top: 50%;
	translate: 0 -50%;
	padding: 3px 6px;
	border-radius: 4px;
	background: rgba(24, 22, 23, 0.92);
	font: 400 11px/1 var(--mono);
	color: var(--ink3);
}

.clip {
	--l: 0%;
	position: absolute;
	top: 2px;
	bottom: 2px;
	left: calc(var(--l) + 1px);
	width: calc(var(--w) - 2px);
	container-type: inline-size;
	overflow: hidden;
	border-radius: 6px;
	background: color-mix(in srgb, var(--c) 15%, rgba(255, 255, 255, 0.02));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent);
	transition: box-shadow var(--fast) ease, background-color var(--fast) ease;
}

.clip-name {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	height: 20px;
	padding: 0 8px;
	font: 400 11px/1 var(--mono);
	color: rgba(245, 245, 247, 0.86);
	white-space: nowrap;
	overflow: hidden;
}

.clip-name .cn-long {
	overflow: hidden;
	text-overflow: ellipsis;
}

.clip-name .cn-short {
	display: none;
	font-weight: 400;
}

@container (max-width: 110px) {
	.clip-name .cn-long {
		display: none;
	}
	.clip-name .cn-short {
		display: inline;
	}
}

@container (max-width: 26px) {
	.clip-name {
		padding: 0 3px;
	}
}

.wave {
	position: absolute;
	left: 6px;
	right: 6px;
	top: 19px;
	bottom: 4px;
	width: calc(100% - 12px);
	height: calc(100% - 23px);
	fill: var(--c);
	opacity: 0.6;
}

.desk[data-hl="1"] .clip[data-take="1"],
.desk[data-hl="2"] .clip[data-take="2"],
.desk[data-hl="3"] .clip[data-take="3"],
.desk[data-hl="4"] .clip[data-take="4"],
.desk[data-hl="5"] .clip[data-take="5"],
.desk[data-hl="6"] .clip[data-take="6"],
.desk[data-hl="7"] .clip[data-take="7"],
.desk[data-hl="8"] .clip[data-take="8"] {
	background-color: color-mix(in srgb, var(--c) 26%, rgba(255, 255, 255, 0.04));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent);
}

/* Overlay: removed-take seams and the playhead */

.nle-ov {
	position: absolute;
	top: 14px;
	bottom: 44px;
	left: calc(16px + var(--th));
	right: 16px;
	pointer-events: none;
}

.rm {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 0;
}

.rm-line {
	position: absolute;
	left: 0;
	top: 26px;
	bottom: -6px;
	border-left: 1px dashed rgba(232, 87, 79, 0.8);
}

.rm-tag {
	position: absolute;
	left: 0;
	top: calc(100% + 8px);
	z-index: 3;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 22px;
	padding: 0 10px 0 8px;
	border-radius: 11px;
	background: rgba(232, 87, 79, 0.12);
	box-shadow: inset 0 0 0 1px rgba(232, 87, 79, 0.28);
	font: 400 11px/1 var(--mono);
	color: #f0a7a1;
	white-space: nowrap;
}

.rm-tag svg {
	width: 13px;
	height: 13px;
	flex: none;
}

.rm-tag em {
	margin-left: 6px;
	font-style: normal;
	color: var(--ink3);
	font-variant-numeric: tabular-nums;
}

.rm.is-left .rm-tag {
	transform: translateX(-2px);
}

.rm.is-right .rm-tag {
	transform: translateX(calc(-100% + 2px));
}

.ph {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 0;
	opacity: 0;
	transition: opacity var(--fast) ease;
}

.ph.on {
	opacity: 1;
}

.ph::before {
	content: "";
	position: absolute;
	left: 0;
	top: 24px;
	bottom: 0;
	border-left: 1px solid rgba(255, 255, 255, 0.7);
}

.ph-tag {
	position: absolute;
	left: 0;
	top: 2px;
	z-index: 4;
	transform: translateX(-50%);
	padding: 4px 6px;
	border-radius: 6px;
	background: var(--ink);
	color: #0d0d10;
	font: 500 11px/1 var(--mono);
	font-variant-numeric: tabular-nums;
}

.ph.flip .ph-tag {
	transform: translateX(calc(-100% + 2px));
}

.proof-note {
	margin: clamp(28px, 4vw, 44px) 0 0;
	font-size: 14px;
	color: var(--muted);
}

.proof-note b {
	color: var(--text);
	font-weight: 500;
}

/* Fresh takes arrive: opacity and transform only */

.desk.is-fresh .flist tbody tr {
	animation: row-in 420ms var(--ease-out) both;
	animation-delay: calc(var(--i, 0) * 24ms);
}

.desk.is-fresh .clip {
	animation: clip-in 480ms var(--ease-out) both;
	animation-delay: calc(var(--i, 0) * 80ms + 100ms);
}

@keyframes row-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
}

@keyframes clip-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
}

@media (max-width: 1000px) {
	.desk {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}
	.desk::before {
		inset: -8% calc(-1 * var(--gutter));
		background:
			radial-gradient(46% 22% at 56% 72%, rgba(240, 162, 74, 0.42), rgba(240, 162, 74, 0) 100%),
			radial-gradient(56% 26% at 40% 30%, rgba(184, 64, 31, 0.62), rgba(184, 64, 31, 0) 100%),
			radial-gradient(40% 20% at 80% 56%, rgba(232, 87, 79, 0.26), rgba(232, 87, 79, 0) 100%),
			url("/hero-poster.webp") 72% 58% / cover no-repeat;
	}
}

@media (max-width: 560px) {
	.proof {
		--th: 28px;
	}
	.win {
		border-radius: 16px;
	}
	.th-name {
		display: none;
	}
	.th {
		padding-right: 4px;
	}
	.c-len,
	th.c-len {
		display: none;
	}
	.flist td,
	.flist th {
		padding: 0 12px;
	}
	.c-name .nm {
		gap: 8px;
	}
	.win-bar {
		padding: 0 12px;
	}
	.lights {
		left: 14px;
		gap: 7px;
	}
	.lights i {
		width: 11px;
		height: 11px;
	}
	.win-title {
		font-size: 12px;
		max-width: calc(100% - 104px);
	}
	.win-pre {
		display: none;
	}
	.win-foot {
		padding: 0 12px;
	}
	.nle-body {
		padding: 12px 12px 44px;
	}
	.nle-ov {
		left: calc(12px + var(--th));
		right: 12px;
		top: 12px;
		bottom: 44px;
	}
	.tick {
		padding-left: 4px;
	}
	.clip-name {
		padding: 0 6px;
	}
	.rm-text em {
		display: none;
	}
}
