/* ---- Phase G6a: Home v5 (the old homepage, kept and polished). Everything is scoped to body.daf-home5. ---- */

/* Hero: the same H1, intro and chips as the old page, with one slim search field above the chips. */
body.daf-home5 .daf-hero5 {
	max-width: 860px;
	margin: 8px auto 26px;
	text-align: center;
}
body.daf-home5 .daf-hero5 h1 {
	margin: 0 0 10px;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 42px;
	line-height: 1.15;
	color: var(--daf-ink);
}
body.daf-home5 .daf-hero5__intro {
	max-width: 66ch;
	margin: 0 auto 20px;
	font-size: 17px;
	line-height: 1.6;
	color: var(--daf-muted);
}
body.daf-home5 .daf-search5 {
	position: relative;
	max-width: 560px;
	height: 48px;
	margin: 0 auto 16px;
	background: #fff;
	border: 1px solid var(--daf-line);
	border-radius: 999px;
	box-sizing: border-box;
}
body.daf-home5 .daf-search5__icon {
	position: absolute;
	left: 17px;
	top: 14px;
	width: 20px;
	height: 20px;
	color: var(--daf-muted);
	pointer-events: none;
}
body.daf-home5 .daf-search5__input {
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: 0 58px 0 46px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	font-size: 16px;
	color: var(--daf-ink);
}
body.daf-home5 .daf-search5__input:focus {
	outline: 3px solid var(--daf-saffron);
	outline-offset: 0;
}
body.daf-home5 .daf-search5__input::-webkit-search-cancel-button {
	display: none;
}
body.daf-home5 .daf-search5__btn {
	position: absolute;
	right: 5px;
	top: 5px;
	width: 38px;
	height: 38px;
	padding: 0;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--daf-ink);
	color: #fff;
	cursor: pointer;
}
body.daf-home5 .daf-search5__btn svg {
	width: 18px;
	height: 18px;
}
body.daf-home5 .daf-search5__btn:hover {
	background: var(--daf-coral-dark);
}
body.daf-home5 .daf-hero5__tools {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
body.daf-home5 .daf-hero5__tools .daf-chip {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--daf-line);
	border-radius: 999px;
	background: #fff;
	color: var(--daf-ink);
	font-size: 14px;
	text-decoration: none;
}
body.daf-home5 .daf-hero5__tools .daf-chip:hover {
	border-color: var(--daf-coral-dark);
	color: var(--daf-coral-dark);
}

/* Top grid: every card image is 16:9 with 10px corners, titles are at most two lines. */
body.daf-home5 .daf-top5 .td_module_flex .td-image-wrap {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 0;
}
body.daf-home5 .daf-top5 .td_module_flex .td-image-wrap .entry-thumb {
	display: block;
	width: 100%;
	height: 100%;
	padding-bottom: 0 !important;
	background-size: cover;
	background-position: center;
}
body.daf-home5 .daf-top5 .td_module_flex .td-module-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Most popular sidebar: 64x40 thumbnails, coral rank, two-line titles. */
body.daf-home5 .daf-pop5 {
	margin: 0 0 24px;
}
body.daf-home5 .daf-pop5__head {
	margin: 0 0 10px;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 24px;
	color: var(--daf-ink);
}
body.daf-home5 .daf-pop5__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
body.daf-home5 .daf-pop5__list li {
	border-bottom: 1px solid var(--daf-line);
}
body.daf-home5 .daf-pop5__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	color: var(--daf-text);
	text-decoration: none;
}
body.daf-home5 .daf-pop5__rank {
	flex: 0 0 22px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 15px;
	font-weight: 700;
	color: var(--daf-coral-dark);
}
body.daf-home5 .daf-pop5__img {
	flex: 0 0 64px;
	width: 64px;
	height: 40px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--daf-paper);
}
body.daf-home5 .daf-pop5__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
body.daf-home5 .daf-pop5__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 17px;
	line-height: 1.25;
	color: var(--daf-ink);
}
body.daf-home5 .daf-pop5 .daf-ad {
	min-height: 280px;
	margin: 24px 0 0;
}

/* Strip headings: "Movie fonts" / "Game fonts" with "See all" on the right. */
body.daf-home5 .daf-strip5__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 14px;
}
body.daf-home5 .daf-strip5__head h2 {
	margin: 0;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 28px;
	color: var(--daf-ink);
}
body.daf-home5 .daf-strip5__all {
	font-weight: 700;
	color: var(--daf-coral-dark);
	text-decoration: none;
	white-space: nowrap;
}

/* Free font tools row: real screenshots, not glyph tiles. */
body.daf-home5 .daf-tools5 {
	max-width: 1140px;
	margin: 40px auto 0;
	padding: 0 20px;
}
body.daf-home5 .daf-tools5 .daf-strip5__head h2 {
	font-size: 30px;
}
body.daf-home5 .daf-tools5__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}
body.daf-home5 .daf-tool5 {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--daf-line);
	border-radius: 12px;
	background: #fff;
	box-shadow: var(--daf-shadow);
	color: var(--daf-text);
	text-decoration: none !important;
}
body.daf-home5 .daf-tool5__shot {
	display: block;
	background: var(--daf-paper);
	border-bottom: 1px solid var(--daf-line);
}
body.daf-home5 .daf-tool5__shot img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	object-position: left top;
}
body.daf-home5 .daf-tool5__name {
	padding: 12px 14px 0;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 20px;
	line-height: 1.2;
	color: var(--daf-ink);
}
body.daf-home5 .daf-tool5__text {
	padding: 6px 14px 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--daf-muted);
}
body.daf-home5 .daf-tool5__cta {
	margin-top: auto;
	padding: 12px 14px 14px;
	font-weight: 700;
	color: var(--daf-coral-dark);
}

/* List rows: image right at 4:3, category pill, serif title, 20-word excerpt, coral Read more. */
body.daf-home5 .daf-rows5 {
	display: grid;
	margin: 0;
}
body.daf-home5 .daf-row5 {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 240px;
	gap: 20px;
	align-items: start;
	padding: 20px 0;
	border-bottom: 1px solid var(--daf-line);
}
body.daf-home5 .daf-row5__img {
	order: 2;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 10px;
	background: var(--daf-paper);
}
body.daf-home5 .daf-row5__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
body.daf-home5 .daf-row5__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}
body.daf-home5 .daf-row5__cat {
	align-self: flex-start;
	padding: 2px 10px;
	border: 1px solid var(--daf-ink);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--daf-ink);
}
body.daf-home5 .daf-row5__title {
	margin: 0;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 22px;
	line-height: 1.2;
	color: var(--daf-ink);
}
body.daf-home5 .daf-row5__title a {
	color: inherit;
	text-decoration: none;
}
body.daf-home5 .daf-row5__ex {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--daf-text);
}
body.daf-home5 .daf-row5__more {
	align-self: flex-start;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--daf-coral-dark);
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}
body.daf-home5 .daf-row5__more:hover {
	background: var(--daf-ink);
}
body.daf-home5 .daf-row5__ad {
	margin: 24px 0;
}

/* Browse by style: eight tiles with a real background image and a dark gradient. */
body.daf-home5 .daf-browse5 {
	max-width: 1140px;
	margin: 44px auto 40px;
	padding: 0 20px;
}
body.daf-home5 .daf-browse5 h2 {
	margin: 0 0 16px;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 30px;
	color: var(--daf-ink);
}
body.daf-home5 .daf-browse5__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}
body.daf-home5 .daf-style5 {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 150px;
	padding: 14px;
	overflow: hidden;
	border-radius: 12px;
	background: var(--daf-ink) center / cover no-repeat;
	color: #fff !important;
	text-decoration: none !important;
}
body.daf-home5 .daf-style5__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 40, 75, .15), rgba(20, 40, 75, .88));
}
body.daf-home5 .daf-style5__name {
	position: relative;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 26px;
	line-height: 1.1;
	color: #fff;
}
body.daf-home5 .daf-style5__count {
	position: relative;
	font-size: 13px;
	opacity: .92;
}

/* Phone: the strips scroll sideways, the tool cards sit two to a row, rows put the image on top. */
@media (max-width: 1023px) {
	body.daf-home5 .daf-tools5__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	body.daf-home5 .daf-browse5__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (max-width: 767px) {
	body.daf-home5 .daf-hero5 h1 {
		font-size: 30px;
	}
	body.daf-home5 .daf-hero5__intro {
		font-size: 15px;
	}
	body.daf-home5 .daf-strip5 .td_block_inner {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}
	body.daf-home5 .daf-strip5 .td_module_flex {
		flex: 0 0 46% !important;
		max-width: 46% !important;
		scroll-snap-align: start;
	}
	body.daf-home5 .daf-strip5__head h2 {
		font-size: 24px;
	}
	body.daf-home5 .daf-row5 {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}
	body.daf-home5 .daf-row5__img {
		order: 0;
	}
	body.daf-home5 .daf-browse5__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	body.daf-home5 .daf-style5 {
		min-height: 120px;
	}
	body.daf-home5 .daf-style5__name {
		font-size: 22px;
	}
}
@media (max-width: 419px) {
	body.daf-home5 .daf-tools5__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Strips of view-ranked posts (daf_strip_posts). */
body.daf-home5 .daf-strips5 {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
}
body.daf-home5 .daf-strip-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	color: var(--daf-ink);
	text-decoration: none !important;
}
body.daf-home5 .daf-strip-card__img {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 10px;
	background: var(--daf-paper);
}
body.daf-home5 .daf-strip-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
body.daf-home5 .daf-strip-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 17px;
	line-height: 1.25;
}

/* Side column beside the list: free tool links, then the sticky ad. */
body.daf-home5 .daf-side5 {
	position: sticky;
	top: 80px;
}
body.daf-home5 .daf-side5__head {
	margin: 0 0 10px;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 24px;
	color: var(--daf-ink);
}
body.daf-home5 .daf-side5__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
body.daf-home5 .daf-side5__list li {
	border-bottom: 1px solid var(--daf-line);
}
body.daf-home5 .daf-side5__list a {
	display: block;
	padding: 9px 0;
	font-weight: 600;
	color: var(--daf-coral-dark);
	text-decoration: none;
}
body.daf-home5 .daf-side5__ad {
	margin-top: 24px;
}
body.daf-home5 .daf-side5__ad .daf-ad,
body.daf-home5 .daf-pop5 .daf-ad {
	min-height: 280px;
	margin: 0;
}

/* Ad between list rows: reserved height, 24px above and below, no extra space. */
body.daf-home5 .daf-row5__ad {
	margin: 24px 0;
}
body.daf-home5 .daf-row5__ad .daf-ad {
	min-height: 250px;
	margin: 0;
}

/* Phone: the six chips are one horizontal scroll row with a fade on the right. */
@media (max-width: 767px) {
	body.daf-home5 .daf-hero5__tools {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		margin: 0 -16px;
		padding: 0 16px 4px;
		-webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
		mask-image: linear-gradient(to right, #000 88%, transparent);
	}
	body.daf-home5 .daf-hero5__tools .daf-chip {
		flex: 0 0 auto;
		white-space: nowrap;
		scroll-snap-align: start;
	}
	body.daf-home5 .daf-strips5 {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}
	body.daf-home5 .daf-strip-card {
		flex: 0 0 46%;
		scroll-snap-align: start;
	}
}

/* Phase G6b-fix: strips. Images always visible; strips line up with the content column; right-edge fade on phone. */
body.daf-home5 .daf-strip-card img {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
}
body.daf-home5 .daf-strip5__head,
body.daf-home5 .daf-strips5-wrap {
	box-sizing: border-box;
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}
body.daf-home5 .daf-strips5-wrap {
	position: relative;
}
body.daf-home5 .daf-strips5 {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
}
@media (max-width: 767px) {
	body.daf-home5 .daf-strips5 {
		display: flex;
		overflow-x: auto;
		scroll-padding-left: 16px;
	}
	body.daf-home5 .daf-strip5__head,
	body.daf-home5 .daf-strips5-wrap {
		padding-left: 16px;
		padding-right: 16px;
	}
	body.daf-home5 .daf-strips5-wrap::after {
		content: "";
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: 40px;
		background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff);
		pointer-events: none;
	}
}

/* Top grid (1.10.4): one box. The theme's own card (.td-module-container) is the rounded 12px card; the module
   wrapper has no border, radius or padding of its own, and the image has square corners inside the clipped card. */
.daf-top5 .td_module_flex.td_module_wrap {
	border: 0;
	border-radius: 0;
	padding: 0;
	overflow: visible;
	box-shadow: none;
}
.daf-top5 .td_module_flex .td-module-container {
	border-radius: 12px;
	overflow: hidden;
}
.daf-top5 .td_module_flex .td-image-container,
.daf-top5 .td_module_flex .td-module-thumb,
.daf-top5 .td_module_flex .td-image-wrap,
.daf-top5 .td_module_flex .entry-thumb {
	border-radius: 0;
}

/* Free tools row (1.11.0): a live text sample on paper, 120px tall, in the card's one box. */
body.daf-home5 .daf-tool5__sample {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 120px;
	padding: 12px 14px;
	overflow: hidden;
	background: var(--daf-paper);
	border-bottom: 1px solid var(--daf-line);
}
