/**
 * TutsVela Theme: blog, archive, search, author, Team, Careers and article presentation (V4 boards).
 * Kadence-first: cards, query layouts, images, typography, colours and spacing are Kadence settings (Query Loop (Adv)
 * cards, Advanced Text and Image, Dynamic List, Row Layout and Section). This file holds only what Kadence and core
 * blocks cannot express; each section says why. Colours are palette slots; component settings (reveal, lift, reading
 * bar) come from TutsVela › Settings › Custom components as CSS custom properties.
 * Record: docs/v4/custom-code-audit.md.
 */

:root {
	--tv-card-radius: 20px;
	--tv-lift-distance: 4px;
	--tv-reveal-distance: 32px;
}

/* B1. Category chips (V4 .chips/.chip). The core Categories block prints a plain list; this turns it and the "All"
 * link into pills, and marks the current category (core adds .current-cat) the way V4 marks aria-pressed. */
.tv-cat-chips {
	gap: 8px;
}

.tv-cat-chips p,
.tv-cat-chips ul {
	margin: 0;
	padding: 0;
}

/* The list's items join the "All" link in the Group's centred flex row, so the chips wrap together like V4 .chips.
 * Modern browsers keep list semantics with display: contents. */
.tv-cat-chips ul {
	display: contents;
	list-style: none;
}

.tv-cat-chips li {
	margin: 0;
}

.tv-cat-chips .cat-item-none {
	display: none;
}

.tv-cat-chips a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--global-palette7);
	border-radius: 999px;
	background: var(--global-palette9);
	color: var(--global-palette10);
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color .15s, border-color .15s, color .15s;
}

.tv-cat-chips a:hover {
	border-color: var(--global-palette6);
	background: var(--global-palette8);
}

.tv-cat-chips a[aria-current="page"],
.tv-cat-chips .current-cat > a {
	background: var(--global-palette3);
	border-color: var(--global-palette3);
	color: var(--global-palette9);
}

.tv-post-excerpt,
.tv-post-excerpt p {
	margin: 0;
	color: var(--global-palette5);
	font-size: 15.5px;
	line-height: 1.55;
}

/* Links only: a sentence with an inline link keeps body text; a block that is only a link looks the same. */
.tv-textlink a,
a.tv-textlink {
	font-weight: 700;
	color: var(--global-palette3);
	text-decoration: none;
}

/* B3. Pagination (V4 .pag with ghost buttons). Core pagination prints plain links. */
.tv-pagination {
	margin-top: 40px;
	gap: 8px;
	align-items: center;
}

.tv-pagination a,
.tv-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--global-palette7);
	border-radius: 999px;
	color: var(--global-palette3);
	font-weight: 600;
	text-decoration: none;
}

.tv-pagination a:hover {
	background: var(--global-palette8);
}

.tv-pagination .page-numbers.current {
	background: var(--global-palette3);
	border-color: var(--global-palette3);
	color: var(--global-palette9);
}

.tv-pagination .page-numbers.dots {
	border: 0;
}

/* B5. Article hero background (V4 .hero-pg .bgfx: dot grid fading out, centred glow). */
.tv-bg-article {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.tv-bg-article::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image: radial-gradient(var(--tv-grid-dot) 1.2px, transparent 1.2px);
	background-size: 22px 22px;
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
	mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

.tv-bg-article::after {
	content: "";
	position: absolute;
	z-index: -1;
	pointer-events: none;
	width: 520px;
	height: 400px;
	left: 50%;
	top: -220px;
	transform: translateX(-50%);
	border-radius: 50%;
	background: var(--tv-glow);
	filter: blur(80px);
}

/* B6. Article header and cover (V4 .art-head 740px, .art-wide 1040px, 24px radius with the large shadow). */
.tv-art-head {
	max-width: 740px;
	margin-inline: auto;
}

/* The header is centred like the tutorial header (owner, 21 Nov 2026); text and row alignment are Kadence settings on
 * Element 1805 (Article header: centre on desktop and tablet, left on phones). The earlier left offset was removed. */

.tv-art-cover {
	max-width: 1040px;
	margin-inline: auto;
}

.tv-art-cover img {
	width: 100%;
	height: auto;
	border-radius: 24px;
	box-shadow: 0 2px 4px rgba(20, 20, 20, .04), 0 24px 60px -16px rgba(20, 20, 20, .22);
}

/* B7. Article contents (Kadence Table of Contents "In this article", class tv-toc). The layout is Kadence: the body
 * Row Layout holds the article (73%) and a sticky contents column (27%); below 1025 px the row stacks with the contents
 * first, collapsed. Kadence sets the toggle, start state, colours, border and scroll spy. CSS adds only what it has
 * no setting for: the list icon before the title, V4's left rule on entries with the active marker, H3 indent, and a
 * height cap with inner scrolling for long lists on desktop. */
.tv-toc .kb-table-of-contents-title-wrap {
	cursor: pointer;
	min-height: 28px;
}

.tv-toc .kb-table-of-contents-title::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-right: 10px;
	vertical-align: -2px;
	background: var(--global-palette1);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='9' y1='6' x2='21' y2='6'/%3E%3Cline x1='9' y1='12' x2='21' y2='12'/%3E%3Cline x1='9' y1='18' x2='21' y2='18'/%3E%3Cline x1='4' y1='6' x2='4.01' y2='6'/%3E%3Cline x1='4' y1='12' x2='4.01' y2='12'/%3E%3Cline x1='4' y1='18' x2='4.01' y2='18'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='9' y1='6' x2='21' y2='6'/%3E%3Cline x1='9' y1='12' x2='21' y2='12'/%3E%3Cline x1='9' y1='18' x2='21' y2='18'/%3E%3Cline x1='4' y1='6' x2='4.01' y2='6'/%3E%3Cline x1='4' y1='12' x2='4.01' y2='12'/%3E%3Cline x1='4' y1='18' x2='4.01' y2='18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tv-toc .kb-table-of-content-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tv-toc .kb-table-of-content-list li {
	margin: 0;
}

.tv-toc .kb-table-of-contents__entry {
	display: block;
	padding: 6px 0 6px 12px;
	border-left: 2px solid var(--global-palette7);
	color: var(--global-palette5);
	text-decoration: none;
}

.tv-toc .kb-table-of-contents__entry:hover {
	color: var(--global-palette3);
	border-left-color: var(--global-palette3);
}

/* Kadence's scroll spy puts .active on the list item (V4 .toc a[aria-current]: ink, bold, orange rule). */
.tv-toc .kb-table-of-content-list li.active > .kb-table-of-contents__entry {
	color: var(--global-palette3);
	border-left-color: var(--global-palette1);
	font-weight: 700;
}

.tv-toc .kb-table-of-content-list ul {
	margin: 0;
	padding: 0 0 0 14px;
	list-style: none;
}

@media (min-width: 1025px) {
	.tv-toc .kb-table-of-content-list {
		max-height: calc(100vh - 200px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

/* B8. Article body rhythm (V4 .prose at 19px / 1.7). Targets the blocks an article can contain, so no article needs
 * its own CSS. Headings keep the Kadence typography and only get spacing and scroll offset. */
.tv-prose {
	font-size: 19px;
	line-height: 1.7;
}

.tv-prose :is(h2,
h3,
h4) {
	scroll-margin-top: 110px;
}

.tv-prose h2 {
	margin: 1.8em 0 .55em;
}

.tv-prose h3 {
	margin: 1.5em 0 .45em;
}

.tv-prose h4 {
	margin: 1.3em 0 .4em;
}

.tv-prose li::marker {
	color: var(--global-palette10);
}

.tv-prose :not(pre) > code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .88em;
	background: var(--global-palette8);
	border: 1px solid var(--global-palette7);
	padding: 1px 6px;
	border-radius: 4px;
}

.tv-prose pre,
.tv-prose .wp-block-code {
	background: var(--global-palette8);
	border: 1px solid var(--global-palette7);
	border-radius: 14px;
	padding: 16px 18px;
	font-size: 15px;
	line-height: 1.6;
	overflow-x: auto;
	color: var(--global-palette3);
}

.tv-prose blockquote,
.tv-prose .wp-block-quote {
	margin: 0 0 1.2em;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--global-palette1);
}

.tv-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15.5px;
}

.tv-prose :is(.wp-block-table,
.kb-table-container) {
	overflow-x: auto;
	border: 1px solid var(--global-palette7);
	border-radius: 14px;
}

.tv-prose th,
.tv-prose td {
	text-align: left;
	vertical-align: top;
}

.tv-prose figcaption,
.tv-prose .kb-image-caption {
	font-size: 15px;
	color: var(--global-palette5);
	text-align: center;
	margin-top: 10px;
}

.tv-prose img {
	height: auto;
	max-width: 100%;
}

.tv-prose :is(iframe,
video) {
	max-width: 100%;
}

/* B10. Reading progress (V4 .rprog: 3px brand bar at the top that fills while reading). CSS scroll timeline only;
 * browsers without it show no bar. Off with reduced motion. */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: scroll()) {
		.tv-article::before {
			content: "";
			position: fixed;
			left: 0;
			right: 0;
			top: 0;
			height: 3px;
			z-index: 100000;
			background: var(--global-palette1);
			transform-origin: 0 50%;
			pointer-events: none;
			animation: tv-progress linear both;
			animation-timeline: scroll(root);
		}

		@keyframes tv-progress {
			from {
				transform: scaleX(0);
			}
			to {
				transform: scaleX(1);
			}
		}
}
}

/* B11. Author box (V4 AuthorBox: grid of avatar and text, 4px brand top border). Avatar from Kadence dynamic image. */
.tv-author-box img {
	border-radius: 50%;
	object-fit: cover;
	object-position: center 20%;
}

.tv-author-links a {
	color: var(--global-palette5);
	font-size: 15px;
}

/* B12. Search results rows (V4 System .list .item-row) and the 404 number. */
.tv-search-list .wp-block-post-template {
	display: grid;
	gap: 0;
	border-top: 1px solid var(--global-palette7);
}

.tv-search-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(90px, 130px) minmax(0, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 18px 8px;
	border-bottom: 1px solid var(--global-palette7);
}

.tv-search-row > * {
	margin: 0;
}

.tv-search-row .tv-search-type {
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--global-palette10);
}

.tv-search-row .wp-block-post-title {
	font-size: 18px;
	line-height: 1.3;
}

.tv-search-row .wp-block-post-title a {
	color: var(--global-palette3);
	text-decoration: none;
}

.tv-search-row .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.tv-search-row:hover {
	background: var(--global-palette8);
}

.tv-search-row:focus-within {
	outline: 2px solid var(--global-palette1);
	outline-offset: -2px;
}

@media (max-width: 600px) {
	.tv-search-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 4px;
	}
}

.tv-big-num {
	font-size: clamp(110px, 15vw, 220px);
	font-weight: 700;
	line-height: .9;
	letter-spacing: -.05em;
	color: var(--global-palette7);
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.tv-cat-chips a {
		transition: none;
	}
}

/* B13. Article header details: breadcrumb trail from a link and the category (V4 .crumbs), byline layout, spacing. */
.tv-crumbs-row.tv-crumbs-center {
	justify-content: center;
}

.tv-crumbs-row {
	gap: 6px;
	align-items: center;
	font-size: 14px;
	color: var(--global-palette5);
}

.tv-crumbs-row > * {
	margin: 0 !important;
}

.tv-crumb a {
	color: var(--global-palette5);
	text-decoration: none;
}

.tv-crumb a:hover {
	color: var(--global-palette10);
	text-decoration: underline;
}

.tv-crumb-term::before {
	content: "/";
	margin-right: 6px;
	color: var(--global-palette6);
}




.tv-sec-head {
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 24px;
}

.tv-sec-head > * {
	margin: 0;
}

/* B15. Archive and author headers (V4 .phead and .au-top). */
.tv-archive-title {
	margin: 16px 0 12px;
}

.tv-author-portrait img {
	display: block;
	width: 100%;
	max-width: 340px;
	height: auto;
	aspect-ratio: 4 / 4.5;
	object-fit: cover;
	object-position: center 18%;
	border-radius: 24px;
	padding: 8px;
	background: linear-gradient(160deg, color-mix(in srgb, var(--global-palette1) 70%, transparent), transparent 60%);
	box-sizing: border-box;
}

/* Block class needed: the Style Library heading preset sets background and padding at the same specificity, later. */
.wp-block-kadence-advancedheading.tv-pill-label {
	display: inline-flex;
	padding: 4px 11px;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--global-palette1) 30%, transparent);
	background: color-mix(in srgb, var(--global-palette1) 12%, transparent);
	color: var(--global-palette10);
	font-size: 13px;
	font-weight: 600;
}

/* Dark pill on the orange "Now" card (V4 .pill.ink). Fixed ink and white: the card is orange in both palettes, and
 * palette 3 turns white in dark mode (brand rule: dark text on orange). */
.wp-block-kadence-advancedheading.tv-pill-label.tv-pill-dark {
	background: #1A1A1A;
	border-color: #1A1A1A;
	color: #FFFFFF;
}

/* B16. Search form, result type labels and 404 links (V4 System board). The type label is generated from the post
 * type class WordPress puts on each result, so no field is needed. */
.tv-search-form {
	max-width: 760px;
}

.tv-search-form .wp-block-search__input {
	min-height: 54px;
	padding: 0 18px;
	font-size: 18px;
	border: 1px solid var(--global-palette6);
	border-radius: 999px;
	background: var(--global-palette9);
	color: var(--global-palette3);
}

.tv-search-form .wp-block-search__button {
	min-height: 54px;
	padding: 0 24px;
	margin-left: 8px;
	border: 0;
	border-radius: 999px;
	background: var(--global-palette3);
	color: var(--global-palette9);
	font-weight: 700;
}

.tv-search-404 {
	max-width: 520px;
	margin-top: 24px;
}

.tv-search-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--global-palette5);
	margin: 0 0 16px;
}

.tv-search-type::before {
	content: "Page";
}

.type-post .tv-search-type::before {
	content: "Article";
}

.tv-search-type {
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--global-palette10);
}

.tv-search-text > * {
	margin: 0 0 4px;
}

.tv-search-arrow {
	color: var(--global-palette5);
}

.tv-404-links {
	gap: 20px;
	margin-top: 20px;
}

.tv-404-links > * {
	margin: 0;
}

.tv-chips-tight a {
	min-height: 36px;
	font-size: 14px;
}

/* B17. Kadence is a classic theme, so a Group block wraps its children in .wp-block-group__inner-container. For the
 * card and row groups above, that wrapper is made transparent to layout so the card's own grid or flex applies. */
.tv-search-row > .wp-block-group__inner-container {
	display: contents;
}

.type-page .tv-search-text .tv-post-excerpt {
	display: none;
}

.tv-textlink a,
a.tv-textlink {
	border-bottom: 2px solid var(--global-palette1);
	padding-bottom: 2px;
}

/* Advanced Text puts the class on a link that wraps a block paragraph: inline-block gives the underline a box. */
a.tv-textlink {
	display: inline-block;
}

.tv-textlink a:hover,
a.tv-textlink:hover {
	color: var(--global-palette10);
}

.tv-group-head {
	text-transform: uppercase;
	letter-spacing: .1em;
}

/* B19. Site map columns (V4 System sitemap: heading with a 2px rule, plain link list). */
.tv-map-head {
	padding-bottom: 8px;
	border-bottom: 2px solid var(--global-palette3);
}

.tv-map-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
	font-size: 16px;
}

.tv-map-list li {
	margin: 0;
}

.tv-map-list .cat-item-none {
	color: var(--global-palette5);
}

/* B20. Visual sprint corrections (V4 comparison 20 Nov 2026). */
/* Portrait frame (V4 .stage-frame): gradient rim, 32px outer and 24px inner radius. Kadence's image preset tokens set
 * radius, padding and background on .wp-block-kadence-image img, so the frame needs the block class in the selector. */
.wp-block-kadence-image.tv-author-portrait {
	display: block;
	max-width: 340px;
	padding: 8px;
	border-radius: 32px;
	background: linear-gradient(160deg, color-mix(in srgb, var(--global-palette1) 75%, transparent), color-mix(in srgb, var(--global-palette1) 0%, transparent) 60%), var(--global-palette9);
	box-shadow: 0 2px 4px rgba(20, 20, 20, .04), 0 24px 60px -16px rgba(20, 20, 20, .22);
}

.wp-block-kadence-image.tv-author-portrait img {
	width: 100%;
	max-width: none;
	padding: 0;
	background: none;
	border-radius: 24px;
	aspect-ratio: 4 / 4.5;
	object-fit: cover;
	object-position: center 18%;
}

/* Article headings at the V4 prose sizes (.prose h2 clamp(25px, 2.6vw, 32px), h3 21px), smaller than page headings. */
.tv-prose h2 {
	font-size: clamp(25px, 2.6vw, 32px);
	line-height: 1.2;
}

.tv-prose h3 {
	font-size: 21px;
	line-height: 1.3;
}

.tv-prose h4 {
	font-size: 18px;
}

/* B21. Team and Careers (V4 Team and Careers boards). */
.wp-block-kadence-image.tv-team-photo img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 14px;
	padding: 0;
}

.tv-team-area {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--global-palette5);
}

.wp-block-kadence-image.tv-founder-photo,
.wp-block-kadence-image.tv-founder-photo img {
	height: 100%;
	margin: 0;
}

.wp-block-kadence-image.tv-founder-photo img {
	width: 100%;
	min-height: 320px;
	object-fit: cover;
	object-position: center 20%;
	border-radius: 0;
	padding: 0;
}

/* Dark call-to-action card (V4 .cta-dark): a fixed dark surface in both palettes, like the footer, with the brand glow.
 * Text colours are fixed light values because the surface does not change with the Color Switch. */
.tv-dark-card > .kt-inside-inner-col {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: #161616 !important;
	border-color: #2F2F2F !important;
	color: #E9EAEA;
}

.tv-dark-card > .kt-inside-inner-col::after {
	content: "";
	position: absolute;
	z-index: -1;
	width: 520px;
	height: 420px;
	right: -140px;
	top: -200px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--global-palette1) 34%, transparent);
	filter: blur(90px);
	pointer-events: none;
}

/* Brand mark watermark on dark cards that have free space on the right (owner, 21 Nov 2026), the same TutsVela mark the
 * V4 "Why" band and closing band use. Opt-in: add the class tv-mark to the dark card Section (Advanced > Additional
 * CSS class). Kadence Sections take one background image layer, which the glow already needs, so the mark is drawn here. */
.tv-dark-card.tv-mark > .kt-inside-inner-col::before {
	content: "";
	position: absolute;
	z-index: -1;
	right: -30px;
	bottom: -70px;
	width: 440px;
	aspect-ratio: 246 / 193;
	opacity: .08;
	pointer-events: none;
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 246 193'%3E%3Cpath fill='%23FFFFFF' d='M88.7 45C98.2 47.5 106.4 53.8 111.4 62.4L134.3 102.1L82.3 102.1L49.4 45L0 45L0 0L139.6 0L139.6 45Z'/%3E%3Cpath fill='%23FFFFFF' d='M245.2 0L134.3 192.1L108.3 147.1L134.3 102.1L193.2 0Z'/%3E%3C/svg%3E");
}

@media (max-width: 767px) {
	.tv-dark-card.tv-mark > .kt-inside-inner-col::before {
		width: 240px;
		right: -50px;
		bottom: -50px;
		opacity: .06;
	}
}

.tv-dark-card :is(h2,
h3) {
	color: #FFFFFF;
	max-width: 16ch;
}

.tv-dark-card .tv-on-dark-muted,
.tv-dark-card .tv-secno {
	color: #B5B9B9;
}

.tv-dark-card a:not(.kb-button) {
	color: #FF9A80;
}

.tv-check-list .kt-svg-icon-list-single svg {
	color: var(--global-palette1);
}

/* Check icons in the Careers list. (The dark full-width button is set on the block: Ghost preset, palette3.) */
.tv-check-list .kt-svg-icon-list-item-wrap {
	align-items: flex-start;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--global-palette5);
}

.tv-check-list strong {
	color: var(--global-palette3);
}

.tv-check-list .kt-svg-icon-list-single {
	color: var(--global-palette1);
	margin-top: 3px;
}

/* B22. Author box (V4 AuthorBox "full": 96px photo, label, name, role, bio, profile link and profile links). */
.wp-block-kadence-image.tv-author-avatar img {
	width: 96px;
	height: 96px;
	padding: 0;
	border-radius: 50%;
	object-fit: cover;
	object-position: center 20%;
}

.tv-author-name {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--global-palette3);
	text-decoration: none;
}

.tv-author-links {
	gap: 8px 18px;
	align-items: baseline;
}

.tv-author-links > * {
	margin: 0;
}

/* Author box grid (V4: 96px photo column, text column; photo above text below 560px). */
.tv-author-box .kt-row-column-wrap {
	grid-template-columns: 96px minmax(0, 1fr) !important;
	gap: 16px 24px;
	align-items: start;
}

@media (max-width: 560px) {
	.tv-author-box .kt-row-column-wrap {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

.tv-author-box .wp-block-kadence-image.tv-author-avatar {
	margin: 0;
	width: 96px;
}

/* B23. Author page header details (V4 Author: grey topic pills, Contact as a text link). */
.tv-pills {
	gap: 8px;
	margin-top: 16px;
}

.tv-pills > * {
	margin: 0;
}

.tv-pill {
	display: inline-flex;
	padding: 4px 11px;
	border-radius: 999px;
	border: 1px solid var(--global-palette7);
	background: var(--global-palette8);
	color: var(--global-palette3);
	font-size: 13px;
	font-weight: 600;
}

/* Site map: the heading rule is set on the blocks (border bottom 2px palette 3, padding 8px); lists sit flush (V4). */

ul.tv-map-list,
.tv-map-list ul {
	padding-left: 0;
	margin-left: 0;
	list-style: none;
}

/* B24. 404 (V4 System 404: the TutsVela mark over the faded number) and search controls (V4 .input and .btn-dark).
 * The mark is drawn with two CSS masks so the ink part follows palette 3 and the stroke follows palette 1 in both modes. */
.wp-block-kadence-advancedheading.tv-big-num {
	position: relative;
}

.tv-big-num::before,
.tv-big-num::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	/* Capped at the desktop proportion (0.77 of the numeral): when Kadence stacks the row on tablet the column is
	 * full width, and 46% alone made the mark grow over the links above it. */
	width: min(46%, 0.77em);
	aspect-ratio: 246 / 193;
	transform: translate(-50%, -50%);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 246 193'%3E%3Cpath d='M88.7 45C98.2 47.5 106.4 53.8 111.4 62.4L134.3 102.1L82.3 102.1L49.4 45L0 45L0 0L139.6 0L139.6 45Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 246 193'%3E%3Cpath d='M88.7 45C98.2 47.5 106.4 53.8 111.4 62.4L134.3 102.1L82.3 102.1L49.4 45L0 45L0 0L139.6 0L139.6 45Z'/%3E%3C/svg%3E") center / contain no-repeat;
	background: var(--global-palette3);
}

.tv-big-num::after {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 246 193'%3E%3Cpath d='M245.2 0L134.3 192.1L108.3 147.1L134.3 102.1L193.2 0Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 246 193'%3E%3Cpath d='M245.2 0L134.3 192.1L108.3 147.1L134.3 102.1L193.2 0Z'/%3E%3C/svg%3E");
	background: var(--global-palette1);
}

/* V4 .split keeps two columns down to 961 px and stacks at 960 px. Kadence has one tablet layout for 768 to 1024 px
 * (set to stacked, which matches V4 from 768 to 960), so only the 961 to 1024 px band needs this rule. Columns copy
 * the desktop Kadence layout (left golden, 2fr 1fr). */
@media (min-width: 961px) and (max-width: 1024px) {
	.tv-404-row.kb-row-layout-wrap > .kt-row-column-wrap {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	}
}

/* V4 .eyebrow: the small slanted brand bar before the label. A decorative pseudo-element is not a Kadence setting;
 * the label's colour, weight, size and tracking are set on the Advanced Text block. */
.tv-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.tv-eyebrow::before {
	content: "";
	flex: none;
	width: 8px;
	height: 16px;
	background: var(--global-palette1);
	transform: skewX(-30deg);
}

.tv-search-form .wp-block-search__inside-wrapper {
	gap: 8px;
}

.tv-search-form input.wp-block-search__input {
	border-radius: 12px;
}

.tv-search-form button.wp-block-search__button,
.tv-search-form .wp-block-search__button.wp-element-button {
	margin-left: 0;
	border-radius: 12px;
	background: var(--global-palette3);
	color: var(--global-palette9);
	border: 0;
}

/* Founder card: the photo follows the card corners. */
.wp-block-kadence-column:has(.tv-founder-photo) > .kt-inside-inner-col {
	overflow: hidden;
}

/* Placeholder portraits are drawn on a light grid; in the dark palette they are dimmed so they sit like the V4 dark
 * "portrait to come" tiles instead of glowing. Only the placeholder files are affected, never real photos. */
body.color-switch-dark .tv-team-photo img[src*="team-portrait-placeholder"] {
	filter: brightness(.32) saturate(.8) contrast(1.15);
}

/* Q1. Kadence Query Loop (Adv) gaps (Kadence-first rebuild). Cards, images, typography, spacing, borders and hover
 * shadow are set in Kadence (query card settings, Advanced Image, Advanced Text, Dynamic List). Three details have no
 * Kadence control:
 * - V4 grids use auto-fit (a single card fills the row; two cards share it); Kadence query columns are fixed counts.
 * - Pill corners for the Dynamic List category links (the block has colours and padding, but no radius).
 * - V4 hover lift (translateY); Kadence query cards have hover border and shadow, not movement. */
.tv-autofit .kb-query-grid-wrap {
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)) !important;
}

.tv-term-pills a,
.tv-term-pills.kb-dynamic-list .kb-dynamic-list-item {
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

/* Dynamic List "pill" style sets the item background only; it has no item padding or border control. V4 .pill.brand:
 * 4px 11px padding and a hairline tinted from the brand colour. */
.tv-term-pills.kb-dynamic-list .kb-dynamic-list-item {
	padding: 4px 11px;
	border: 1px solid color-mix(in srgb, var(--global-palette1) 30%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
	.kb-query-item {
		transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, border-color .25s;
	}

	.kb-query-item:hover,
.kb-query-item:focus-within {
		transform: translateY(calc(-1 * var(--tv-lift-distance, 4px)));
	}
}

/* Q2. Article header details that Kadence image and Dynamic List settings do not cover: a round 44px byline photo
 * (Kadence image tokens set radius and padding on the img, so the block class is needed) and the category link in
 * the breadcrumb (Dynamic List renders a list; this makes it read as one crumb). */
.wp-block-kadence-image.tv-byline-avatar,
.wp-block-kadence-image.tv-byline-avatar img {
	width: 44px;
	height: 44px;
	margin: 0;
}
.wp-block-kadence-image.tv-byline-avatar img {
	border-radius: 50%;
	padding: 0;
	object-fit: cover;
	object-position: center 20%;
}
.tv-crumb-terms,
.tv-crumb-terms a {
	font-size: 14px;
}
.tv-crumb-terms .kb-dynamic-list-item {
	padding: 0;
}

/* B25. Services (single service Element, V4 Services board).
 * 1. Equal-height cards in a Kadence Repeater: the Repeater has no "stretch rows" control and the Section height
 *    setting cannot reach the generated list item, so the card fills its grid cell here (class on the Repeater).
 * 2. Package features: TutsVela Core builds the list from the Features field (one line per item); the V4 check
 *    marks are a pseudo-element, which no block setting can add. The check follows palette 1. */
.tv-equal-rows > ul > li,
.tv-equal-rows > ul > li > .wp-block-kadence-column {
	height: 100%;
}

.tv-equal-rows > ul > li > .wp-block-kadence-column > .kt-inside-inner-col {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.tv-equal-rows > ul > li > .wp-block-kadence-column > .kt-inside-inner-col > .wp-block-kadence-advancedbtn {
	margin-top: auto;
	padding-top: 20px;
}

/* The column is a flex column here, so the badge would stretch to the card width. */
.tv-equal-rows .tv-pill-label {
	align-self: flex-start;
}

.tv-pkg-list .tv-pkg-features {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 1.5;
	color: var(--global-palette4);
}

.tv-pkg-features li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.tv-pkg-features li::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	margin-top: 3px;
	background: var(--global-palette1);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* B26. Tutorials (Elements "Tutorials Archive", "Tutorial Topic and Series Archive", query card "Tutorial card").
 * Kadence sets the card content, colours, spacing and the filter blocks. CSS covers only what has no setting:
 * 1. The length badge over the thumbnail (V4 tile: play icon and length bottom left on the image). The badge is a
 *    fixed dark chip with white text because it sits on a photo, not on a palette surface.
 * 2. One link per card: the title link covers the whole card (earlier owner-approved card behaviour).
 * 3. Titles clamped to two lines so rows stay even (earlier owner-approved; the full title stays in the HTML).
 * 4. The search field takes the free width in the filter row; level and sort keep their natural width. */
.tv-thumb > .kt-inside-inner-col {
	position: relative;
}

.wp-block-kadence-advancedheading.tv-thumb-badge {
	position: absolute;
	left: 12px;
	bottom: 12px;
	margin: 0;
}

.kb-query-item:has(.tv-card-link) {
	position: relative;
}

/* Kadence prints the block's class on the link itself (a.tv-card-link) when the heading has a link, so both forms are
 * matched (fixed 21 Nov 2026: only the descendant form was matched, so cards were not clickable outside the title). */
a.tv-card-link::after,
.tv-card-link a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

a.tv-card-link:focus-visible,
.tv-card-link a:focus-visible {
	outline: none;
}

.kb-query-item:has(a.tv-card-link:focus-visible),
.kb-query-item:has(.tv-card-link a:focus-visible) {
	outline: 3px solid var(--global-palette1);
	outline-offset: 4px;
	border-radius: 18px;
}

.tv-clamp-2 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

/* Search grows to fill the row beside the level and sort selects (Kadence Section flex items have no grow or basis
 * setting). Only while the Section runs horizontally: on phones it stacks vertically (kb-section-sm-dir-vertical),
 * where a 280px basis would become a 280px height and leave a gap under the search box (fixed 21 Nov 2026). */
.tv-filter-row:not(.kb-section-sm-dir-vertical) > .kt-inside-inner-col > .tv-fsearch {
	flex: 1 1 280px;
}

@media (min-width: 768px) {
	.tv-filter-row > .kt-inside-inner-col > .tv-fsearch {
		flex: 1 1 280px;
	}
}

.tv-filter-row > .kt-inside-inner-col > .tv-fselect {
	flex: 0 0 auto;
}

/* The search icon inside the Kadence "Filter - Search" block is a plain <button>, so it picks up the Customizer's
 * global button shadow (an orange glow meant for call-to-action buttons). The block has no button style controls
 * (block.json: margin, padding, placeholder only), so the shadow is removed here for this icon button only. The
 * filter chips use their own Kadence hover shadow setting instead (Query 2130 and 2176). */
.tv-fsearch .kb-filter-search-btn,
.tv-fsearch .kb-filter-search-btn:hover,
.tv-fsearch .kb-filter-search-btn:focus {
	box-shadow: none;
}

/* B27. Downloads (Elements "Downloads Archive" and "Single Download", query card "Download card").
 * Kadence sets the frame colour, border, radius and padding. The V4 preview frame (.vis.dots) carries a 22px dot grid;
 * Kadence Section backgrounds take a colour, image or gradient but no background-size, so the repeating dot pattern
 * is the one thing set here. The dot colour is the theme's grid token, which follows light and dark. */
.tv-vis-dots {
	background-image: radial-gradient(var(--tv-grid-dot) 1px, transparent 1.4px);
	background-size: 22px 22px;
}

/* B28. Recommended Tools (page "recommended-tools").
 * The "Collaboration partner" label uses the V4 warning status colours (.tag-warn: --warn on --warn-bg). Status
 * colours are fixed semantic values that change between light and dark (docs/v4/color-system.md) and have no
 * Kadence palette slot, so the class sets them for both modes. The 1px border is the block's own Kadence border
 * setting in currentColor (Kadence resets borders on Advanced Text, so a CSS border here never showed).
 * Labels (.tv-tag, V4 .tag/.pick) keep their width in a flex row: Kadence has no white-space or flex-shrink
 * setting, and without it "Collaboration partner" breaks inside the pill in the narrow legend card. */
.tv-tag {
	white-space: nowrap;
	flex: none;
	width: fit-content;
}

.tv-tag-warn {
	color: #8A5A00;
	background: #FFF7E0;
}

body.color-switch-dark .tv-tag-warn {
	color: #E8B54A;
	background: #33290F;
}
