/* The free-access banner (2.17).
   Loaded only for somebody who cannot search yet, with ytt-card.js.

   It sits in the theme's content column and lays itself out by its own width,
   not the window's: a container query decides between the two halves and the
   stacked layout, so a page with a sidebar gets what fits. The script widens it
   edge to edge only on a page it has measured to have no sidebar (.is-bleed).

   Contrast, measured at the lightest point of the gradient (#12436b):
   white 10.3:1 · sub-line (white .86) 8.1 · labels (white .78) 7.0 ·
   gold text #f0c75e 6.4 · plain gold #d4a637 4.57, so it is used for
   borders, glyphs and text on the darker panels only (demo 8.2, result
   card 6.6) · chip outline 4.57 (3:1 needed) · button white on #c2410c 5.2,
   on #9a3412 7.3 · marked phrase #03111f on gold 8.4. Nothing is under 10px,
   and nothing is under 11px on a phone. */

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

.ytt-banner {
	--ytt-gold: #d4a637;
	--ytt-gold-text: #f0c75e;
	--ytt-ink: #ffffff;
	--ytt-sub: rgba(255, 255, 255, 0.86);
	--ytt-label: rgba(255, 255, 255, 0.78);
	--ytt-font: Arial, Helvetica, sans-serif;
	container-type: inline-size;
	container-name: ytt-banner;
	position: relative;
	overflow: hidden;
	margin: 0 0 1.6em;
	border: 1px solid rgba(212, 166, 55, 0.68);
	border-radius: 8px;
	color: var(--ytt-ink);
	font-family: var(--ytt-font);
	font-style: normal;
	text-align: left;
	background:
		radial-gradient(ellipse at 72% 45%, rgba(24, 82, 128, 0.62) 0%, rgba(8, 39, 69, 0.48) 32%, rgba(4, 24, 44, 0.15) 58%, rgba(3, 17, 31, 0) 74%),
		linear-gradient(115deg, #03111f 0%, #061b31 40%, #092a48 70%, #041522 100%);
	background-color: #061b31;
	box-shadow: 0 12px 38px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

/* Edge to edge, set by the script on a page with no sidebar: the width and
   the offset are measured, so there is no viewport-width trick and no stray
   sideways scrollbar. */
.ytt-banner.is-bleed {
	border-right: 0;
	border-left: 0;
	border-radius: 0;
}

.ytt-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.19;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 42px 42px;
}

/* the gold sweep along the top edge: transform only, so nothing reflows */
.ytt-banner-sweep {
	position: absolute;
	z-index: 3;
	top: 0;
	left: 0;
	width: 26%;
	height: 2px;
	pointer-events: none;
	background: linear-gradient(90deg, transparent, rgba(212, 166, 55, 0.25), #ffd870, rgba(212, 166, 55, 0.32), transparent);
	filter: drop-shadow(0 0 6px rgba(255, 209, 91, 0.75));
	transform: translateX(-110%);
	animation: yttSweep 6s linear infinite;
}

@keyframes yttSweep {
	0% { transform: translateX(-110%); opacity: 0; }
	8% { opacity: 1; }
	82% { opacity: 1; }
	100% { transform: translateX(400%); opacity: 0; }
}

/* ------------------------------------------------------------ layout -- */
.ytt-banner-inner {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
	gap: 36px;
	align-items: center;
	width: min(1180px, calc(100% - 56px));
	margin: 0 auto;
	padding: 34px 0 32px;
}

.ytt-banner--solo .ytt-banner-inner {
	grid-template-columns: minmax(0, 1fr);
}

.ytt-banner-copy {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
}

/* Side by side, the chips run under both halves; stacked, they fall in
   straight after the reassurance because that is where they are in the markup. */
.ytt-banner-inner > .ytt-showcase {
	grid-column: 2;
	grid-row: 1;
}

.ytt-banner-inner > .ytt-banner-topics {
	grid-column: 1 / -1;
	grid-row: 2;
}

/* ------------------------------------------------ the label over it all -- */
.ytt-banner .ytt-banner-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 28px;
	margin: 0 0 14px;
	padding: 5px 10px 5px 8px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.23);
	color: #fff;
	font-family: var(--ytt-font);
	font-size: 10px;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.ytt-banner-label strong {
	color: var(--ytt-gold-text);
	font-weight: 900;
}

/* The play glyph: plain gold, never YouTube's red box. */
.ytt-play {
	display: block;
	flex: 0 0 auto;
	width: 11px;
	height: 13px;
	fill: var(--ytt-gold);
}

/* --------------------------------------------------------- the headline -- */
.ytt-banner .ytt-banner-head {
	margin: 0;
	padding: 0;
	color: #fff;
	font-family: var(--ytt-font);
	font-size: clamp(28px, 3.3cqi, 44px);
	font-weight: 900;
	line-height: 1.04;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	text-shadow: 0 4px 18px rgba(0, 0, 0, 0.52);
	text-wrap: balance;
}

.ytt-banner .ytt-banner-head span {
	display: block;
	margin-top: 4px;
	color: #fff;
}

.ytt-banner .ytt-banner-sub {
	max-width: 640px;
	margin: 16px 0 0;
	color: var(--ytt-sub);
	font-family: var(--ytt-font);
	font-size: 16px;
	line-height: 1.52;
}

.ytt-banner-sub strong {
	color: #fff;
	font-weight: 800;
}

/* ------------------------------------------------------------ the stats -- */
.ytt-banner .ytt-banner-stats {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 0;
	margin: 22px 0 22px;
	padding: 0;
	list-style: none;
}

.ytt-banner-stats li {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ytt-banner-stats li + li {
	position: relative;
	margin-left: 15px;
	padding-left: 18px;
}

/* the gold dot between the numbers: decoration drawn by CSS, not read out */
.ytt-banner-stats li + li::before {
	content: "";
	position: absolute;
	top: 11px;
	left: 0;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--ytt-gold);
}

.ytt-banner-stat-n {
	color: #fff;
	font-size: 27px;
	font-weight: 900;
	line-height: 1;
}

.ytt-banner-stat-l {
	margin-top: 6px;
	color: var(--ytt-label);
	font-size: 10px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 1.1px;
	text-transform: uppercase;
}

/* "plus 38 more by title": the rest of the public channel, found by title
   only — a quieter second line, so the big number is only ever the
   searchable one (2.17) */
.ytt-banner-stat-more {
	margin-top: 3px;
	color: var(--ytt-label);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
}

/* ----------------------------------------------------------- the button -- */
.ytt-banner a.ytt-banner-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 13px;
	min-height: 56px;
	padding: 0 26px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 4px;
	background: linear-gradient(180deg, #c2410c 0%, #b23a0a 58%, #9a3412 100%);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
	color: #fff;
	font-family: var(--ytt-font);
	font-size: 14px;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: 0.6px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ytt-banner a.ytt-banner-cta:hover,
.ytt-banner a.ytt-banner-cta:focus-visible {
	color: #fff;
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 11px 28px rgba(0, 0, 0, 0.31), 0 0 20px rgba(194, 65, 12, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ytt-banner a:focus-visible,
.ytt-banner button:focus-visible {
	outline: 3px solid #ffd66a;
	outline-offset: 3px;
}

.ytt-banner-cta b {
	font-size: 21px;
	font-weight: 900;
	line-height: 1;
}

/* ------------------------------------------------------ the reassurance -- */
.ytt-banner .ytt-banner-note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin: 11px 0 0;
	color: var(--ytt-label);
	font-family: var(--ytt-font);
	font-size: 10px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 1.1px;
	text-transform: uppercase;
}

.ytt-banner-note i,
.ytt-showcase-foot i {
	color: var(--ytt-gold);
	font-style: normal;
}

/* ------------------------------------------------------- the topic chips -- */
.ytt-banner-topics {
	min-width: 0;
	margin: -6px 0 0;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ytt-banner .ytt-banner-topics-label {
	margin: 0 0 8px;
	color: var(--ytt-label);
	font-family: var(--ytt-font);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.4px;
}

/* One row. Where the column is too narrow for all of them it scrolls
   sideways rather than wrapping, and the script fades the edge that has more. */
.ytt-banner-chips {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	overflow-x: auto;
	padding: 3px 3px 6px;
	margin: -3px -3px 0;
	scrollbar-width: thin;
	scrollbar-color: rgba(212, 166, 55, 0.5) transparent;
}

.ytt-banner-chips.is-scrollable {
	-webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
	mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.ytt-banner-chips.is-scrollable.is-end {
	-webkit-mask-image: none;
	mask-image: none;
}

.ytt-banner a.ytt-banner-chip {
	flex: 0 0 auto;
	display: inline-block;
	padding: 6px 13px;
	border: 1px solid var(--ytt-gold);
	border-radius: 999px;
	background: rgba(212, 166, 55, 0.06);
	color: var(--ytt-gold-text);
	font-family: var(--ytt-font);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	white-space: nowrap;
	text-decoration: none;
}

.ytt-banner a.ytt-banner-chip:hover,
.ytt-banner a.ytt-banner-chip:focus-visible {
	background: var(--ytt-gold);
	color: #03111f;
	text-decoration: none;
}

/* ------------------------------------------------------- the demo panel -- */
/* A fixed height, and every row inside it a fixed height: the script changes
   words, never boxes, so the page cannot move while it runs. */
.ytt-showcase {
	container-type: inline-size;
	container-name: ytt-showcase;
	display: grid;
	grid-template-rows: 36px 56px 34px 1fr 30px;
	width: 100%;
	height: 384px;
	min-height: 384px;
	max-height: 384px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.17);
	border-top-color: rgba(212, 166, 55, 0.62);
	border-radius: 6px;
	background: rgba(1, 10, 20, 0.8);
	box-shadow: 0 18px 46px rgba(0, 0, 0, 0.37), inset 0 0 40px rgba(18, 74, 117, 0.11);
	-webkit-backdrop-filter: blur(7px);
	backdrop-filter: blur(7px);
	contain: layout paint;
	font-family: var(--ytt-font);
}

.ytt-showcase-top {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	padding: 0 8px 0 12px;
	overflow: hidden;
	border-bottom: 1px solid rgba(255, 255, 255, 0.09);
	color: var(--ytt-label);
	font-size: 10px;
	font-weight: 900;
	line-height: 1;
	letter-spacing: 1px;
	text-transform: uppercase;
	white-space: nowrap;
}

.ytt-showcase-title {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ytt-showcase-live {
	margin-left: auto;
	color: var(--ytt-gold);
}

/* 24px square: the smallest a target may be (WCAG 2.5.8) */
.ytt-banner button.ytt-showcase-pause {
	display: inline-flex;
	flex: 0 0 24px;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 4px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.ytt-banner button.ytt-showcase-pause[hidden] {
	display: none;
}

.ytt-banner button.ytt-showcase-pause:hover {
	border-color: var(--ytt-gold);
}

/* pause bars, or a play triangle once paused */
.ytt-showcase-pause span {
	display: block;
	width: 8px;
	height: 10px;
	border-right: 3px solid currentColor;
	border-left: 3px solid currentColor;
}

.ytt-showcase-pause[aria-pressed="true"] span {
	width: 0;
	height: 0;
	margin-left: 2px;
	border-top: 5px solid transparent;
	border-right: 0;
	border-bottom: 5px solid transparent;
	border-left: 8px solid currentColor;
}

/* what a screen reader gets instead of the moving parts */
.ytt-banner .ytt-showcase-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ytt-showcase-search {
	display: flex;
	align-items: center;
	min-width: 0;
	padding: 0 15px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(3, 20, 36, 0.82);
}

.ytt-showcase-mag {
	flex: 0 0 21px;
	width: 21px;
	height: 21px;
	margin-right: 11px;
	fill: none;
	stroke: var(--ytt-gold);
	stroke-width: 2;
	stroke-linecap: round;
}

.ytt-showcase-q {
	display: block;
	min-width: 0;
	overflow: hidden;
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ytt-showcase-cursor {
	flex: 0 0 2px;
	width: 2px;
	height: 20px;
	margin-left: 3px;
	background: var(--ytt-gold);
	animation: yttCursor 1s step-end infinite;
}

@keyframes yttCursor {
	0%, 46% { opacity: 1; }
	47%, 100% { opacity: 0; }
}

.ytt-showcase-status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 14px;
	overflow: hidden;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	background: rgba(0, 0, 0, 0.13);
	color: rgba(255, 255, 255, 0.74);
	font-size: 10px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	white-space: nowrap;
}

.ytt-showcase-status span:first-child {
	color: #fff;
}

.ytt-showcase-results {
	display: grid;
	grid-template-rows: 1fr 1fr;
	gap: 8px;
	min-height: 0;
	padding: 10px 11px;
	overflow: hidden;
	transition: opacity 0.2s ease;
}

/* while the next phrase is being typed: dimmed, never resized */
.ytt-showcase.is-typing .ytt-showcase-results {
	opacity: 0.35;
}

.ytt-showcase-hit {
	min-height: 0;
	padding: 9px 12px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-left: 2px solid rgba(212, 166, 55, 0.67);
	background: linear-gradient(100deg, rgba(16, 55, 86, 0.58), rgba(4, 21, 37, 0.65));
}

.ytt-banner .ytt-showcase-hit p {
	margin: 0;
	padding: 0;
	font-family: var(--ytt-font);
}

.ytt-banner .ytt-showcase-hit-type {
	height: 12px;
	overflow: hidden;
	color: var(--ytt-gold);
	font-size: 10px;
	font-weight: 900;
	line-height: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ytt-banner .ytt-showcase-hit-title {
	height: 20px;
	margin-top: 4px;
	overflow: hidden;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	line-height: 20px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ytt-banner .ytt-showcase-hit-snip {
	display: -webkit-box;
	height: 36px;
	margin-top: 3px;
	overflow: hidden;
	color: rgba(255, 255, 255, 0.82);
	font-size: 12px;
	line-height: 18px;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ytt-showcase-hit-snip mark {
	padding: 0 2px;
	border-radius: 2px;
	background: var(--ytt-gold);
	color: #03111f;
	font-weight: 700;
}

.ytt-banner .ytt-showcase-foot {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin: 0;
	padding: 0 8px;
	overflow: hidden;
	border-top: 1px solid rgba(255, 255, 255, 0.075);
	color: rgba(255, 255, 255, 0.7);
	font-size: 10px;
	font-weight: 900;
	line-height: 1;
	letter-spacing: 0.75px;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ------------------------------------------ a narrow column: stacked -- */
@container ytt-banner (max-width: 820px) {
	.ytt-banner-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 26px;
		width: min(760px, calc(100% - 40px));
		padding: 30px 0;
	}

	.ytt-banner-copy,
	.ytt-banner-topics {
		text-align: center;
	}

	.ytt-banner-copy,
	.ytt-banner-inner > .ytt-showcase,
	.ytt-banner-inner > .ytt-banner-topics {
		grid-column: 1;
		grid-row: auto;
	}

	.ytt-banner-inner > .ytt-banner-topics {
		margin-top: -8px;
		padding-top: 0;
		border-top: 0;
	}

	.ytt-banner .ytt-banner-head {
		font-size: clamp(26px, 6.2cqi, 44px);
	}

	.ytt-banner .ytt-banner-sub {
		margin-right: auto;
		margin-left: auto;
	}

	.ytt-banner .ytt-banner-stats,
	.ytt-banner .ytt-banner-note {
		justify-content: center;
	}

	/* centred while it fits, and still scrollable from its first chip when not */
	.ytt-banner-chips > :first-child { margin-left: auto; }
	.ytt-banner-chips > :last-child { margin-right: auto; }

	.ytt-showcase {
		max-width: 600px;
		margin: 0 auto;
	}
}

/* ------------------------------------------------------ phone widths -- */
@container ytt-banner (max-width: 560px) {
	.ytt-banner-inner {
		width: calc(100% - 28px);
		padding: 24px 0 22px;
		gap: 22px;
	}

	.ytt-banner-wide {
		display: none;
	}

	.ytt-banner .ytt-banner-label {
		margin-bottom: 12px;
		font-size: 11px;
		letter-spacing: 0.8px;
	}

	.ytt-banner .ytt-banner-head {
		font-size: clamp(25px, 8.2cqi, 34px);
		letter-spacing: -0.01em;
	}

	.ytt-banner .ytt-banner-sub {
		margin-top: 12px;
		font-size: 14px;
		line-height: 1.47;
	}

	/* three equal columns, the labels free to take two lines */
	.ytt-banner .ytt-banner-stats {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
		margin: 18px 0;
	}

	.ytt-banner-stats li,
	.ytt-banner-stats li + li {
		align-items: center;
		margin-left: 0;
		padding-left: 0;
		text-align: center;
	}

	.ytt-banner-stats li + li::before {
		display: none;
	}

	.ytt-banner-stat-n {
		font-size: 23px;
	}

	.ytt-banner-stat-l,
	.ytt-banner .ytt-banner-note,
	.ytt-banner .ytt-banner-topics-label {
		font-size: 11px;
		letter-spacing: 0.6px;
	}

	.ytt-banner a.ytt-banner-cta {
		width: 100%;
		min-height: 54px;
		padding: 0 14px;
		font-size: 13px;
		letter-spacing: 0.4px;
	}

	.ytt-banner .ytt-banner-note {
		gap: 6px;
	}

}

/* ------------------------------------- the demo panel when it is narrow -- */
@container ytt-showcase (max-width: 420px) {
	.ytt-showcase .ytt-banner-wide { display: none; }
}

@container ytt-showcase (max-width: 380px) {
	.ytt-showcase-top,
	.ytt-showcase-status,
	.ytt-banner .ytt-showcase-foot,
	.ytt-banner .ytt-showcase-hit-type {
		font-size: 11px;
		letter-spacing: 0.5px;
	}

	.ytt-banner .ytt-showcase-hit-type {
		height: 13px;
		line-height: 13px;
	}

	.ytt-showcase-top { padding-left: 10px; }
	.ytt-showcase-status { padding: 0 11px; }

	/* the searchable count stays, tighter; the footer's copy of it goes */
	.ytt-showcase-status { gap: 8px; letter-spacing: 0.3px; }
	.ytt-showcase-foot-n,
	.ytt-showcase-foot i {
		display: none;
	}

	.ytt-showcase-q { font-size: 16px; }
	.ytt-banner .ytt-showcase-hit-snip { font-size: 12px; }
}

@container ytt-showcase (max-width: 340px) {
	.ytt-showcase-live { display: none; }
	.ytt-banner button.ytt-showcase-pause { margin-left: auto; }
}

/* A browser without container queries still gets a readable phone layout. */
@supports not (container-type: inline-size) {
	@media (max-width: 782px) {
		.ytt-banner-inner { grid-template-columns: minmax(0, 1fr); width: calc(100% - 28px); }
		.ytt-banner-copy,
		.ytt-banner-inner > .ytt-showcase,
		.ytt-banner-inner > .ytt-banner-topics { grid-column: 1; grid-row: auto; }
		.ytt-banner .ytt-banner-stats { flex-wrap: wrap; }
		.ytt-banner a.ytt-banner-cta { width: 100%; }
	}
}

/* ---------------------------------------------------- reduced motion -- */
@media (prefers-reduced-motion: reduce) {
	.ytt-banner-sweep {
		animation: none;
		opacity: 0.4;
		transform: translateX(150%);
	}

	.ytt-showcase-cursor {
		animation: none;
		opacity: 1;
	}

	.ytt-banner a.ytt-banner-cta,
	.ytt-showcase-results {
		transition: none;
	}

	.ytt-banner a.ytt-banner-cta:hover,
	.ytt-banner a.ytt-banner-cta:focus-visible {
		transform: none;
	}
}
