/*
 * Taradiddle — main stylesheet
 *
 * Design system tokens live in theme.json (generates CSS custom properties for
 * Gutenberg). This file covers everything outside the block editor:
 * layout, header, nav, footer, components, and utility classes.
 */

/* ─── Brand custom properties ────────────────────────────────────────────────
   Raw vars for use in non-Gutenberg contexts (PHP templates, components).
   Mirror the theme.json palette slugs.
   ──────────────────────────────────────────────────────────────────────────── */
:root {
	--td-ink:            #260F1D;
	--td-primary:        #806CAC;
	--td-primary-hover:  #6a5a91;
	--td-accent:         #EEB05C;
	--td-accent-hover:   #ce8016;
	--td-cream:          #DDD0CE;
	--td-white:          #FFFFFF;
	--td-heritage-green: #746C31;
	--td-heritage-red:   #E3312E;

	--td-radius-pill:    100px;
	--td-radius-card:    8px;
	--td-transition:     0.2s ease;

	/* Layout */
	--td-content-width:  800px;
	--td-wide-width:     1200px;
	--td-container-pad:  clamp(1rem, 4vw, 2rem);

	/* Header */
	--td-header-height: 64px;
}

/* ─── Reset / base ───────────────────────────────────────────────────────────*/
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	overflow-x: clip;
}

body {
	margin: 0;
	background-color: var(--td-white);
	color: var(--td-ink);
	font-family: Catamaran, system-ui, -apple-system, sans-serif;
	font-size: clamp(1rem, 0.925rem + 0.375vw, 1.125rem);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

img,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ─── Focus ring ─────────────────────────────────────────────────────────────*/
:focus-visible {
	outline: 2px solid var(--td-accent);
	outline-offset: 3px;
	border-radius: 2px;
}

:focus:not(:focus-visible) {
	outline: none;
}

/* ─── Skip link ──────────────────────────────────────────────────────────────*/
.skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 9999;
	padding: 0.5rem 1.25rem;
	background: var(--td-accent);
	color: var(--td-ink);
	font-weight: 700;
	border-radius: 0 0 var(--td-radius-card) var(--td-radius-card);
	text-decoration: none;
	transition: top 0.15s ease;
}

.skip-link:focus {
	top: 0;
}

/* ─── Screen reader text ─────────────────────────────────────────────────────*/
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	width: auto;
	position: static;
	margin: 0;
}

/* ─── Typography ─────────────────────────────────────────────────────────────*/
h1, h2, h3, h4, h5, h6 {
	font-optical-sizing: auto;
	text-wrap: balance;
	margin-top: 0;
}

p, li, blockquote, figcaption {
	text-wrap: pretty;
}

a {
	color: var(--td-primary);
	text-decoration: none;
	transition: color var(--td-transition);
}

a:hover {
	color: var(--td-primary-hover);
	text-decoration: underline;
}

/* ─── Layout containers ──────────────────────────────────────────────────────
   .container      — content width (800px), centred, padded
   .container--wide — wide width (1200px), centred, padded
   ──────────────────────────────────────────────────────────────────────────── */
.container {
	max-width: calc( var(--td-content-width) + var(--td-container-pad) * 2 );
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--td-container-pad);
	padding-right: var(--td-container-pad);
}

.container--wide {
	max-width: calc( var(--td-wide-width) + var(--td-container-pad) * 2 );
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--td-container-pad);
	padding-right: var(--td-container-pad);
}

/* ─── Gutenberg block alignment in classic theme ─────────────────────────────
   Wide/full-width blocks need to escape the .container.
   .container is 800px max; .alignwide goes 1200px; .alignfull goes 100vw.
   The breakout relies on html/body overflow-x: clip (set above) rather than
   clipping on .entry-content itself — that was blocking alignfull/alignwide.
   ──────────────────────────────────────────────────────────────────────────── */
.entry-content > * {
	max-width: var(--td-content-width);
	margin-left: auto;
	margin-right: auto;
}

.entry-content > .alignwide {
	max-width: var(--td-wide-width);
	width: calc( 100vw - var(--td-container-pad) * 2 );
	margin-left: auto;
	margin-right: auto;
}

.entry-content > .alignfull {
	max-width: none;
	width: 100vw;
	margin-left: calc( 50% - 50vw );
	margin-right: calc( 50% - 50vw );
}

/* front-page.php: no container — blocks manage their own widths.
   Reset any inherited max-width so the hero cover fills edge to edge. */
.site-main--front-page .entry-content > * {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

.site-main--front-page .entry-content > .alignfull {
	width: 100%;
	margin-left: 0;
	margin-right: 0;
}

/* ─── Site header ────────────────────────────────────────────────────────────*/
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--td-white);
	border-bottom: 1px solid var(--td-cream);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-top: 0.875rem;
	padding-bottom: 0.875rem;
}

/* Branding */
.site-header__branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

.site-header__branding .custom-logo {
	max-height: 48px;
	width: auto;
}

.site-header__title {
	font-size: clamp(1.125rem, 1rem + 0.625vw, 1.375rem);
	font-weight: 800;
	color: var(--td-ink);
	text-decoration: none;
	line-height: 1.2;
}

.site-header__title:hover {
	color: var(--td-primary);
	text-decoration: none;
}

/* Guardian Whiskers lockup line */
.site-header__org-lockup {
	padding-bottom: 0.375rem;
	text-align: center;
}

.site-header__org-lockup p {
	margin: 0;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-style: italic;
	color: var(--td-primary);
}

.site-header__org-lockup a {
	font-weight: 500;
	color: var(--td-primary);
}

.site-header__org-lockup a:hover {
	color: var(--td-primary-hover);
}

/* ─── Primary navigation ─────────────────────────────────────────────────────*/
.site-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.site-nav__list .menu-item a {
	display: block;
	padding: 0.4rem 0.75rem;
	border-radius: var(--td-radius-card);
	color: var(--td-ink);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--base, 1rem);
	text-decoration: none;
	transition: background-color var(--td-transition), color var(--td-transition);
}

.site-nav__list .menu-item a:hover {
	background-color: color-mix(in srgb, var(--td-primary) 10%, transparent);
	color: var(--td-primary);
	text-decoration: none;
}

.site-nav__list .current-menu-item > a,
.site-nav__list .current-menu-ancestor > a {
	color: var(--td-primary);
	font-weight: 700;
}

/* Hamburger toggle button */
.site-nav__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	border-radius: var(--td-radius-card);
	transition: background-color var(--td-transition);
	flex-shrink: 0;
}

.site-nav__toggle:hover {
	background-color: color-mix(in srgb, var(--td-primary) 10%, transparent);
}

.site-nav__toggle-bar {
	display: block;
	width: 22px;
	height: 2px;
	background-color: var(--td-ink);
	border-radius: 2px;
	transition: transform var(--td-transition), opacity var(--td-transition);
}

/* Animate bars to X when open */
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(2) {
	opacity: 0;
}
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 768px) {
	.site-nav__toggle {
		display: flex;
	}

	.site-nav {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(280px, 80vw);
		background-color: var(--td-ink);
		transform: translateX(100%);
		transition: transform 0.3s ease;
		z-index: 200;
		overflow-y: auto;
		padding: 5rem 1.5rem 2rem;
	}

	.site-nav.is-open {
		transform: translateX(0);
	}

	.site-nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}

	.site-nav__list .menu-item {
		width: 100%;
	}

	.site-nav__list .menu-item a {
		color: var(--td-cream);
		font-size: 1.125rem;
		padding: 0.5rem 0.75rem;
		width: 100%;
	}

	.site-nav__list .menu-item a:hover {
		background-color: color-mix(in srgb, var(--td-white) 12%, transparent);
		color: var(--td-accent);
	}

	.site-nav__list .current-menu-item > a {
		color: var(--td-accent);
	}

	/* Dim overlay behind mobile nav */
	.nav-open::before {
		content: '';
		position: fixed;
		inset: 0;
		background-color: rgba(38, 15, 29, 0.65);
		z-index: 199;
	}
}

/* Desktop: toggle hidden */
@media (min-width: 769px) {
	.site-nav__toggle {
		display: none !important;
	}
}

/* ─── Main content area ──────────────────────────────────────────────────────*/
.site-main {
	padding-top: clamp(2rem, 5vw, 4rem);
	padding-bottom: clamp(3rem, 8vw, 6rem);
	background: linear-gradient(135deg,
color-mix(in srgb, var(--td-primary) 12%, transparent),
color-mix(in srgb, var(--td-accent) 14%, transparent));
}

.site-main--front-page {
	padding-top: 0;
	padding-bottom: 0;
}

/* ─── Archive header ─────────────────────────────────────────────────────────*/
.archive-header {
	margin-bottom: 2.5rem;
}

.archive-title {
	margin-bottom: 0.5rem;
}

.archive-description p:last-child {
	margin-bottom: 0;
}

/* ─── Entry card (archive/index listings) ────────────────────────────────────*/
.post-feed {
	display: grid;
	gap: 2.5rem;
}

.entry-card {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid var(--td-cream);
}

.entry-card:last-child {
	border-bottom: none;
}

.entry-card__thumbnail {
	display: block;
	border-radius: var(--td-radius-card);
	overflow: hidden;
	aspect-ratio: 16/9;
}

.entry-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.entry-card__thumbnail:hover img {
	transform: scale(1.02);
}

.entry-card__title {
	font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
	font-weight: 700;
	margin: 0 0 0.5rem;
	line-height: 1.25;
}

.entry-card__title a {
	color: var(--td-ink);
	text-decoration: none;
}

.entry-card__title a:hover {
	color: var(--td-primary);
}

.entry-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: var(--td-primary);
	font-weight: 500;
}

.entry-card__excerpt p {
	margin: 0;
}

/* ─── Single entry ───────────────────────────────────────────────────────────*/
.entry-header {
	margin-bottom: 1.5rem;
}

.entry-title {
	margin-bottom: 0.5rem;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: var(--td-primary);
	font-weight: 500;
}

.entry-thumbnail {
	margin: 0 0 2rem;
	border-radius: var(--td-radius-card);
	overflow: hidden;
}

.entry-thumbnail img {
	width: 100%;
}

.entry-thumbnail figcaption {
	padding: 0.5rem 0;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: color-mix(in srgb, var(--td-ink) 60%, transparent);
	font-style: italic;
}

.entry-footer {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--td-cream);
}

.entry-tags a {
	display: inline-block;
	padding: 0.2em 0.75em;
	margin: 0 0.25rem 0.25rem 0;
	border-radius: var(--td-radius-pill);
	background-color: color-mix(in srgb, var(--td-primary) 12%, transparent);
	color: var(--td-primary);
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-weight: 500;
	text-decoration: none;
	transition: background-color var(--td-transition);
}

.entry-tags a:hover {
	background-color: var(--td-primary);
	color: var(--td-white);
}

/* ─── Pagination ─────────────────────────────────────────────────────────────*/
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 3rem;
}

.nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.5rem;
	border-radius: var(--td-radius-card);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: var(--td-ink);
	text-decoration: none;
	transition: background-color var(--td-transition), color var(--td-transition);
}

.nav-links .page-numbers:hover {
	background-color: color-mix(in srgb, var(--td-primary) 10%, transparent);
	color: var(--td-primary);
}

.nav-links .page-numbers.current {
	background-color: var(--td-primary);
	color: var(--td-white);
	font-weight: 700;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────
   Gutenberg button block styles are handled by theme.json.
   .button is for non-block HTML (404 page, etc.).
   ──────────────────────────────────────────────────────────────────────────── */
.button,
.wp-element-button,
.wp-block-button__link {
	display: inline-block;
	padding: 0.65em 1.5em;
	border-radius: var(--td-radius-pill);
	background-color: var(--td-primary);
	color: var(--td-white);
	font-family: inherit;
	font-weight: 700;
	font-size: inherit;
	line-height: 1.5;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background-color var(--td-transition), color var(--td-transition);
}

.button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover {
	background-color: var(--td-primary-hover);
	color: var(--td-white);
	text-decoration: none;
}

/* Accent / yellow button */
.wp-block-button.is-style-accent .wp-block-button__link {
	background-color: var(--td-accent);
	color: var(--td-ink);
}

.wp-block-button.is-style-accent .wp-block-button__link:hover {
	background-color: var(--td-accent-hover);
	color: var(--td-ink);
}

/* Ink / dark button */
.wp-block-button.is-style-ink .wp-block-button__link {
	background-color: var(--td-ink);
	color: var(--td-cream);
}

.wp-block-button.is-style-ink .wp-block-button__link:hover {
	background-color: #3d1a2e;
}

/* Outline button */
.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	border: 2px solid var(--td-primary);
	color: var(--td-primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--td-primary);
	color: var(--td-white);
}

/* ─── Search form ────────────────────────────────────────────────────────────*/
.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 480px;
	margin: 1.5rem 0;
}

.search-form .search-field {
	flex: 1;
	padding: 0.6rem 1rem;
	border: 2px solid var(--td-cream);
	border-radius: var(--td-radius-pill);
	font-family: inherit;
	font-size: inherit;
	transition: border-color var(--td-transition);
}

.search-form .search-field:focus {
	border-color: var(--td-primary);
	outline: none;
}

.search-form .search-submit {
	padding: 0.6rem 1.25rem;
	border-radius: var(--td-radius-pill);
	background-color: var(--td-primary);
	color: var(--td-white);
	font-family: inherit;
	font-weight: 700;
	border: none;
	cursor: pointer;
	transition: background-color var(--td-transition);
}

.search-form .search-submit:hover {
	background-color: var(--td-primary-hover);
}

/* ─── Error 404 ──────────────────────────────────────────────────────────────*/
.error-404 {
	text-align: center;
	max-width: 520px;
	margin: 0 auto;
	padding: 4rem 0;
}

.error-404 .search-form {
	margin: 1.5rem auto;
	justify-content: center;
}

.error-404 .button {
	margin-top: 1.5rem;
}

/* ─── No results ─────────────────────────────────────────────────────────────*/
.no-results {
	padding: 3rem 0;
}

/* ─── Site footer ────────────────────────────────────────────────────────────*/
.site-footer {
	background-color: var(--td-ink);
	color: var(--td-cream);
	margin-top: auto;
}

.site-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	padding-top: 3rem;
	padding-bottom: 2.5rem;
	text-align: center;
}

/* Footer nav */
.site-footer__nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem 1rem;
}

.site-footer__nav-list .menu-item a {
	color: var(--td-cream);
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-weight: 500;
	text-decoration: none;
	transition: color var(--td-transition);
}

.site-footer__nav-list .menu-item a:hover {
	color: var(--td-accent);
	text-decoration: underline;
}

/* Social icons */
.site-footer__social {
	display: flex;
	gap: 1rem;
	align-items: center;
}

.site-footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: var(--td-cream);
	transition: color var(--td-transition), background-color var(--td-transition);
}

.site-footer__social-link:hover {
	color: var(--td-accent);
	background-color: color-mix(in srgb, var(--td-white) 8%, transparent);
	text-decoration: none;
}

/* Copyright */
.site-footer__copyright {
	margin: 0;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: color-mix(in srgb, var(--td-cream) 70%, transparent);
}

.site-footer__copyright a {
	color: var(--td-cream);
	font-weight: 500;
}

.site-footer__copyright a:hover {
	color: var(--td-accent);
	text-decoration: underline;
}

/* ─── Sponsor logo grid ──────────────────────────────────────────────────────*/
.td-sponsor-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	align-items: center;
	justify-content: center;
	padding: 2rem 0;
}

.td-sponsor-grid figure {
	margin: 0;
	display: flex;
	align-items: center;
}

.td-sponsor-grid img {
	max-height: 56px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
	filter: grayscale(0.15);
	transition: filter var(--td-transition);
}

.td-sponsor-grid img:hover {
	filter: grayscale(0);
}

.td-sponsor {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
}

.td-sponsor__since {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--td-ink) 55%, transparent);
}

/* ─── Age category badges ─────────────────────────────────────────────────────*/
.td-badge {
	display: inline-block;
	padding: 0.2em 0.75em;
	border-radius: var(--td-radius-pill);
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
}

.td-badge--abecedarians {
	background-color: var(--td-accent);
	color: var(--td-ink);
}

.td-badge--juventus {
	background-color: var(--td-primary);
	color: var(--td-white);
}

.td-badge--doyens {
	background-color: var(--td-ink);
	color: var(--td-cream);
	border: 1px solid color-mix(in srgb, var(--td-cream) 30%, transparent);
}

/* ─── Prize tiers ─────────────────────────────────────────────────────────────*/
.td-prize-first  { color: var(--td-accent);         font-weight: 700; }
.td-prize-second { color: var(--td-primary);        font-weight: 700; }
.td-prize-third  { color: var(--td-heritage-green); font-weight: 700; }

/* ─── Story byline ───────────────────────────────────────────────────────────*/
.td-story-byline {
	display: flex;
	flex-wrap: wrap;
	column-gap: 1rem;
	row-gap: 0.25rem;
	align-items: baseline;
	color: var(--td-primary);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
}

.td-story-byline .td-story-byline__school {
	font-style: italic;
}

/* ─── Section utilities (for block editor usage) ─────────────────────────────*/
.td-section--ink {
	background-color: var(--td-ink);
	color: var(--td-cream);
}

.td-section--ink a   { color: var(--td-accent); }
.td-section--ink a:hover { color: var(--td-accent-hover); }

.td-section--cream   { background-color: var(--td-cream); color: var(--td-ink); }
.td-section--primary { background-color: var(--td-primary); color: var(--td-white); }

/* ─── Hero animated logo ─────────────────────────────────────────────────────
   The Taradiddle-Logo-Animated.svg has CSS @keyframes embedded that trigger on
   :hover of the SVG root. Inline rendering (via taradiddle_inline_svg helper)
   preserves the hover interaction.
   ──────────────────────────────────────────────────────────────────────────── */
.td-hero-logo {
	max-width: 1200px;
	margin: 0 auto;
}

/* Target both <object> (current embed) and inline <svg> (fallback) */
.td-hero-logo object,
.td-hero-logo svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 75vh;
	aspect-ratio: 991 / 251;
	cursor: default;
}

/* Dim the logo slightly at rest; lift on hover as an affordance that
   the animation is triggered by pointer. */
.td-hero-logo object {
	transition: filter 0.3s ease;
}

.td-hero-logo:hover object {
	filter: drop-shadow(0 4px 16px rgba(38, 15, 29, 0.15));
}

/* ─── Peepers (animated eyes) — JS-driven via assets/js/peepers.js ──────────
   Each <g class="eye"> has white outer circle + dark pupil offset.
   peepers.js applies SVG transform="rotate(deg cx cy)" where (cx,cy) is the
   white circle's centre — giving precise rotation without transform-origin quirks.
   ──────────────────────────────────────────────────────────────────────────── */
.wp-block-group.td-peepers,
.td-peepers {
	display: block !important;
	max-width: 140px;
	width: 100%;
	margin: 0 auto !important;
	padding: 0 !important;
}

.td-peepers svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

/* CSS transform with fill-box origin — peepers.js sets the rotate() value.
   transform-box: fill-box makes the rotation origin each eye's own bounding-box
   centre (the white circle) instead of the SVG viewport's origin. */
.eye,
.td-eye {
	transform-box: fill-box;
	transform-origin: center center;
	transition: transform 0.1s ease-out;
	will-change: transform;
}

/* Trigger area: gets mousemove listener from peepers.js */
.td-peepers-trigger {
	cursor: default;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CPT: STORY
   Templates: single-story.php, archive-story.php, template-parts/content-story.php
   SOW #6: Improved Story Layouts — each piece presented as a literary work.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Story archive / feed container */
.story-feed {
	display: grid;
	gap: 2.5rem;
}

.story-feed--compact {
	gap: 1.5rem;
}

/* Story card (used on archives, contest pages, school pages) */
.story-card {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--td-cream);
}

.story-card:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

/* Legacy 2-column (180px thumb · text) layout retired — the modern .story-grid
   tile flips body and thumbnail into a single column flex-stack, so this rule
   was leaving body content squeezed into a 180px column on cards rendered
   outside .story-grid (e.g. school single page using .story-feed). */

.story-card__thumbnail {
	display: block;
	border-radius: var(--td-radius-card);
	overflow: hidden;
	aspect-ratio: 4/3;
}

.story-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.story-card__thumbnail:hover img {
	transform: scale(1.03);
}

.story-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.5rem;
}

.story-card__title {
	font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 0.4rem;
}

.story-card__title a {
	color: var(--td-ink);
	text-decoration: none;
}

.story-card__title a:hover {
	color: var(--td-primary);
}

.story-card__byline {
	display: flex;
	flex-wrap: wrap;
	column-gap: 0.5rem;
	row-gap: 0.2rem;
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: var(--td-primary);
	font-weight: 500;
}

.story-card__location {
	font-style: italic;
	color: color-mix(in srgb, var(--td-primary) 75%, transparent);
}

.story-card__excerpt {
	color: color-mix(in srgb, var(--td-ink) 85%, transparent);
}

.story-card__excerpt p {
	margin: 0;
}

/* Single story — the polished literary layout */
.story-single .container {
	max-width: calc( 720px + var(--td-container-pad) * 2 );
}

.story {
	display: block;
}

.story__header {
	text-align: center;
	margin-bottom: 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--td-cream);
}

.story__badges {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.story__title {
	font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 1rem;
	color: var(--td-ink);
}

.story__byline {
	font-size: var(--wp--preset--font-size--md, 1.125rem);
	color: var(--td-primary);
	margin: 0 0 0.5rem;
	font-weight: 500;
}

.story__byline .story__author {
	font-weight: 700;
	color: var(--td-ink);
}

.story__byline .story__author-age,
.story__byline .story__author-location {
	color: var(--td-primary);
}

.story__school {
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-style: italic;
	color: color-mix(in srgb, var(--td-ink) 65%, transparent);
	margin: 0;
}

.story__illustration {
	margin: 0 0 2.5rem;
	border-radius: var(--td-radius-card);
	overflow: hidden;
}

.story__illustration img {
	width: 100%;
}

.story__illustration figcaption {
	padding: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-style: italic;
	color: color-mix(in srgb, var(--td-ink) 65%, transparent);
	text-align: center;
}

/* Story body — slightly larger, more generous line-height for reading */
.story__body {
	font-size: clamp(1.0625rem, 1rem + 0.375vw, 1.25rem);
	line-height: 1.8;
	color: var(--td-ink);
}

.story__body > p:first-of-type::first-letter {
	font-size: 3.5em;
	float: left;
	line-height: 0.9;
	padding: 0.1em 0.1em 0 0;
	font-weight: 800;
	color: var(--td-primary);
}

.story__body p {
	margin-top: 0;
	margin-bottom: 1.25em;
}

.story__footer {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--td-cream);
	text-align: center;
}

.story__contest-link {
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: var(--td-primary);
	margin: 0 0 1.5rem;
}

.story__actions {
	display: flex;
	justify-content: center;
	gap: 1rem;
}

/* ─── Story badge variants (age categories + place) ───────────────────────── */
.td-badge--abecedarians { background-color: var(--td-accent); color: var(--td-ink); }
.td-badge--juventus     { background-color: var(--td-primary); color: var(--td-white); }
.td-badge--doyens       { background-color: var(--td-ink); color: var(--td-cream); }
.td-badge--place {
	background-color: transparent;
	color: var(--td-heritage-red);
	border: 1.5px solid currentColor;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CPT: CONTEST
   Templates: single-contest.php, archive-contest.php
   ═══════════════════════════════════════════════════════════════════════════ */

.contest-feed {
	display: grid;
	gap: 2.5rem;
}

.contest-card {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	padding: 1.5rem;
	background-color: color-mix(in srgb, var(--td-cream) 30%, var(--td-white));
	border-radius: var(--td-radius-card);
	transition: transform var(--td-transition), box-shadow var(--td-transition);
}

.contest-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(38, 15, 29, 0.08);
}

@media (min-width: 640px) {
	.contest-card:has(.contest-card__thumbnail) {
		grid-template-columns: 220px 1fr;
		gap: 1.5rem;
		align-items: center;
	}
}

.contest-card__thumbnail {
	display: block;
	border-radius: var(--td-radius-card);
	overflow: hidden;
	aspect-ratio: 4/3;
}

.contest-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.contest-card__number {
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--td-primary);
	margin: 0 0 0.3rem;
}

.contest-card__title {
	font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.4rem;
}

.contest-card__title a {
	color: var(--td-ink);
	text-decoration: none;
}

.contest-card__title a:hover {
	color: var(--td-primary);
}

.contest-card__prompt-animal {
	font-style: italic;
	color: color-mix(in srgb, var(--td-ink) 75%, transparent);
	margin: 0 0 0.5rem;
}

.contest-card__status {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: var(--td-radius-pill);
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 0.5rem;
}

.contest-card__status--upcoming { background-color: color-mix(in srgb, var(--td-primary) 15%, transparent); color: var(--td-primary); }
.contest-card__status--open     { background-color: var(--td-accent); color: var(--td-ink); }
.contest-card__status--judging  { background-color: color-mix(in srgb, var(--td-heritage-green) 20%, transparent); color: var(--td-heritage-green); }
.contest-card__status--closed,
.contest-card__status--archived { background-color: color-mix(in srgb, var(--td-ink) 10%, transparent); color: var(--td-ink); }

/* Single contest */
.contest__header {
	text-align: center;
	margin-bottom: 2rem;
}

.contest__eyebrow {
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--td-primary);
	margin: 0 0 0.5rem;
}

.contest__title {
	font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 1rem;
}

.contest__prompt-animal {
	font-style: italic;
	font-size: var(--wp--preset--font-size--md, 1.125rem);
	color: color-mix(in srgb, var(--td-ink) 70%, transparent);
	margin: 0 0 1.5rem;
}

.contest__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 2.5rem;
	justify-content: center;
	margin: 0;
	padding: 1rem 0 0;
	border-top: 1px solid var(--td-cream);
}

.contest__meta-item {
	margin: 0;
	text-align: center;
}

.contest__meta-item dt {
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--td-primary);
	margin-bottom: 0.25rem;
}

.contest__meta-item dd {
	margin: 0;
	font-weight: 500;
}

.contest__prompt-image {
	margin: 0 0 2rem;
	border-radius: var(--td-radius-card);
	overflow: hidden;
}

.contest__prompt-image img {
	width: 100%;
}

.contest__body {
	margin-bottom: 3rem;
}

.contest__stories {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--td-cream);
}

.contest__stories > h2 {
	text-align: center;
	margin-bottom: 2rem;
}

.contest__stories-group {
	margin-bottom: 2.5rem;
}

.contest__stories-category {
	font-size: var(--wp--preset--font-size--lg, 1.5rem);
	font-weight: 700;
	margin: 0 0 1.25rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--td-primary);
	color: var(--td-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CPT: SCHOOL
   Templates: single-school.php, archive-school.php
   SOW #5: School Network Foundation — schools can see themselves
          as part of something bigger.
   ═══════════════════════════════════════════════════════════════════════════ */

/* School list (archive) */
.school-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0;
	border-top: 1px solid var(--td-cream);
}

.school-list__item {
	border-bottom: 1px solid var(--td-cream);
}

.school-list__link {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.5rem 1.5rem;
	align-items: baseline;
	padding: 1.25rem 0.5rem;
	text-decoration: none;
	transition: background-color var(--td-transition), padding-left var(--td-transition);
	border-radius: var(--td-radius-card);
}

.school-list__link:hover {
	background-color: color-mix(in srgb, var(--td-cream) 40%, transparent);
	padding-left: 1rem;
	text-decoration: none;
}

.school-list__name {
	font-size: var(--wp--preset--font-size--md, 1.125rem);
	font-weight: 700;
	color: var(--td-ink);
}

.school-list__location {
	display: block;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: color-mix(in srgb, var(--td-ink) 60%, transparent);
	font-weight: 400;
	grid-column: 1;
}

.school-list__count {
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: var(--td-primary);
	font-weight: 500;
	white-space: nowrap;
	grid-row: 1 / 3;
	grid-column: 2;
	align-self: center;
}

/* Single school */
.school__header {
	margin-bottom: 2rem;
	text-align: center;
}

.school__title {
	font-size: clamp(1.75rem, 1.3rem + 2.25vw, 3rem);
	font-weight: 800;
	margin: 0 0 0.5rem;
}

.school__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	justify-content: center;
	margin: 0;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	color: var(--td-primary);
}

.school__type {
	text-transform: capitalize;
	font-weight: 500;
}

.school__location {
	font-weight: 500;
}

.school__website {
	font-weight: 500;
}

.school__image {
	margin: 0 0 2rem;
	border-radius: var(--td-radius-card);
	overflow: hidden;
}

.school__body {
	margin-bottom: 3rem;
}

.school__stories {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--td-cream);
}

.school__stories > h2 {
	text-align: center;
	margin-bottom: 2rem;
}

.school__no-stories {
	text-align: center;
	color: color-mix(in srgb, var(--td-ink) 60%, transparent);
	font-style: italic;
	padding: 2rem 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BLOCK PATTERN: Sponsor tier cards + age category cards
   ═══════════════════════════════════════════════════════════════════════════ */

/* Generic tier/age card — a group block with padding + radius.
   The pattern provides background colors; these rules add polish. */
.td-tier-card,
.td-age-card {
	box-shadow: 0 1px 3px rgba(38, 15, 29, 0.06);
	transition: transform var(--td-transition), box-shadow var(--td-transition);
	display: flex;
	flex-direction: column;
}

.td-tier-card:hover,
.td-age-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(38, 15, 29, 0.1);
}

/* Featured tier card — subtle accent rim */
.td-tier-card--featured {
	box-shadow: 0 4px 16px rgba(128, 108, 172, 0.25);
	position: relative;
}

.td-tier-card--featured::before {
	content: 'Most popular';
	position: absolute;
	top: -0.75rem;
	left: 50%;
	transform: translateX(-50%);
	padding: 0.25em 0.9em;
	background-color: var(--td-accent);
	color: var(--td-ink);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-radius: var(--td-radius-pill);
	white-space: nowrap;
}

.td-tier-card > .wp-block-buttons,
.td-age-card > .wp-block-buttons {
	margin-top: auto;
	padding-top: 1rem;
}

/* ─── Checkmark list (used in tier cards) ─────────────────────────────────── */
.wp-block-list.is-style-checkmark-list,
ul.is-style-checkmark-list {
	list-style: none;
	padding-left: 0;
	margin: 1rem 0;
}

.is-style-checkmark-list li {
	position: relative;
	padding-left: 1.75rem;
	margin-bottom: 0.35rem;
	line-height: 1.5;
}

.is-style-checkmark-list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.1em;
	height: 1.1em;
	background-color: var(--td-primary);
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'><path fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/></svg>");
	        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'><path fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/></svg>");
	-webkit-mask-size: contain;
	        mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	        mask-repeat: no-repeat;
	flex-shrink: 0;
}

/* Within dark-background tier cards, the checkmark needs to be light */
.td-tier-card--featured .is-style-checkmark-list li::before,
.has-ink-background-color .is-style-checkmark-list li::before,
.has-primary-background-color .is-style-checkmark-list li::before {
	background-color: var(--td-accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PATCH LAYER — targeted fixes on top of the base rules above.
   Keeps the fixes traceable as a unit. Can be merged into base rules later.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Mobile nav: fix overlay z-index, add close button ──────────────────── */
@media (max-width: 768px) {

	/* Site-header creates a stacking context at z-index:100 in the base rules.
	   That traps .site-nav inside, so even z-index:999 on the drawer would
	   still be below a body::before overlay. Raise the header's context itself
	   above the overlay so the drawer (inside) naturally stacks above it. */
	.site-header {
		z-index: 1100;
	}

	/* Nav drawer clearly above the overlay — within site-header's context. */
	.site-nav {
		z-index: 1000;
	}

	/* Overlay sits between page and nav. Body default stacking context. */
	.nav-open::before {
		z-index: 900;
	}

	/* Toggle floats above both, so user can always tap to close. */
	.site-nav__toggle {
		position: relative;
		z-index: 1200;
	}

	/* Close button inside the drawer */
	.site-nav__close {
		position: absolute;
		top: 1rem;
		right: 1rem;
		width: 40px;
		height: 40px;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		background: none;
		border: none;
		color: var(--td-cream);
		font-size: 1.75rem;
		line-height: 1;
		cursor: pointer;
		border-radius: 50%;
		transition: background-color var(--td-transition);
	}

	.site-nav__close:hover {
		background-color: color-mix(in srgb, var(--td-white) 10%, transparent);
	}
}

/* Hide close button on desktop */
@media (min-width: 769px) {
	.site-nav__close {
		display: none !important;
	}
}

/* ─── Guardian Whiskers lockup — refined ──────────────────────────────────── */
.site-header__org-lockup {
	padding: 0 0 0.5rem;
	text-align: center;
}

.site-header__org-lockup p {
	/* Reset old plain-text styling */
	display: none;
}

.site-header__org-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0.75rem;
	border-radius: var(--td-radius-pill);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--td-primary);
	text-decoration: none;
	transition: background-color var(--td-transition), color var(--td-transition);
}

.site-header__org-link:hover {
	background-color: color-mix(in srgb, var(--td-primary) 8%, transparent);
	color: var(--td-primary-hover);
	text-decoration: none;
}

.site-header__org-label {
	font-style: italic;
	opacity: 0.85;
}

.site-header__org-logo {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	color: var(--td-primary);
	transition: transform var(--td-transition);
}

.site-header__org-link:hover .site-header__org-logo {
	transform: rotate(-6deg);
}

.site-header__org-name {
	font-weight: 700;
	letter-spacing: 0.005em;
}

/* ─── Page titles: refined treatment for pages AND CPT archives ──────────
   Applies to:
     - page.php / single.php   → .entry-title, .entry-header
     - archive-*.php           → .archive-title, .archive-header
     - single-contest.php      → .contest__title, .contest__header
     - single-school.php       → .school__title, .school__header
   Design: smaller weight, tighter tracking, short accent stripe underneath.
   ───────────────────────────────────────────────────────────────────── */
.entry-title,
.archive-title {
	font-size: clamp(1.625rem, 1.3rem + 1.625vw, 2.5rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0 0 0.4rem;
	color: var(--td-ink);
}

.page-template-default h1.entry-title {
	background-image: url(/wp-content/themes/taradiddle/assets/img/hr-squiggle.svg);
	background-size: 110px;
	background-repeat: no-repeat;
	background-position: center bottom;
	padding-bottom: 1.3rem;
	text-align: center;
}

.archive-header .archive-title span {
	color: var(--td-primary);
	font-style: italic;
	font-weight: 700;
}

.archive-description {
	font-size: var(--wp--preset--font-size--md, 1.125rem);
	color: color-mix(in srgb, var(--td-ink) 65%, transparent);
	max-width: 60ch;
	margin: 0;
	line-height: 1.5;
}

.entry-header,
.archive-header {
	position: relative;
	padding-bottom: 1.25rem;
	margin-bottom: 2.5rem;
/*	border-bottom: 1px solid var(--td-cream);*/
}

/* Short accent-colored stripe sitting on top of the bottom border */
/*.entry-header::after,
.archive-header::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 48px;
	height: 3px;
	background-color: var(--td-accent);
	border-radius: 2px;
}*/

/* Small uppercase eyebrow above the title, if used */
.entry-header .entry-eyebrow,
.archive-header .archive-eyebrow {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--td-primary);
	margin: 0 0 0.5rem;
}

/* ─── Container padding for content inside full-bleed sections on mobile ── */
@media (max-width: 600px) {
	:root {
		--td-container-pad: 1rem;
	}

	/* Ensure page.php / single.php bodies have horizontal breathing room */
	.site-main > .container {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

/* ─── Age category cards — compact mobile tiles with CTAs ──────────────── */
.td-age-card {
	display: flex;
	flex-direction: column;
	text-align: center;
}

.td-age-card h3 {
	margin: 0 0 0.35rem;
}

.td-age-card p {
	margin: 0 0 0.5rem;
}

.td-age-card .wp-block-buttons {
	margin-top: auto;
	padding-top: 0.5rem;
}

.td-age-card .wp-block-button__link {
	padding: 0.5em 1em;
	font-size: 0.875rem;
}

/* Mobile: stack age cards vertically as horizontal tiles
   (mark on left, text in middle, circular arrow CTA on right). */
@media (max-width: 781px) {

	.wp-block-columns:has(.td-age-card) {
		display: flex !important;
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		gap: 0.75rem !important;
		padding: 0 1rem;
		align-items: stretch;
	}

	.wp-block-columns:has(.td-age-card) > .wp-block-column {
		flex: 1 1 auto !important;
		min-width: 0 !important;
		width: 100% !important;
		padding: 0.85rem 1rem !important;
	}

	/* Each card becomes a 3-column grid: mark | text | CTA.
	   The mark column is auto-sized so cards without a mark (Juventus)
	   collapse cleanly to text-then-CTA. */
	.td-age-card {
		display: grid !important;
		grid-template-columns: auto 1fr auto;
		align-items: center;
		gap: 0.75rem 1rem;
		text-align: left !important;
	}

	/* Mark sits in column 1, vertically centered across the text rows */
	.td-age-card__mark {
		grid-column: 1;
		grid-row: 1 / -1;
		align-self: center;
		margin: 0 !important;
		max-width: 56px !important;
	}

	.td-age-card__mark svg,
	.td-age-card__mark img {
		max-height: 48px;
	}

	/* All text content flows in column 2 */
	.td-age-card > h3,
	.td-age-card > p {
		grid-column: 2;
		margin: 0 !important;
	}

	.td-age-card h3 {
		font-size: 1.05rem;
		line-height: 1.15;
		font-weight: 800;
	}

	.td-age-card .has-sm-font-size {
		font-size: 0.7rem;
		line-height: 1.2;
	}

	/* Hide the prose description — tile must stay scannable */
	.td-age-card > p:not(.has-sm-font-size):not([style*="font-weight:700"]) {
		display: none;
	}

	.td-age-card > p[style*="font-weight:700"] {
		font-size: 0.8125rem;
		opacity: 0.85;
	}

	/* CTA block sits in column 3, vertically centered */
	.td-age-card .wp-block-buttons {
		grid-column: 3;
		grid-row: 1 / -1;
		align-self: center;
		margin: 0 !important;
		padding: 0 !important;
	}

	.td-age-card .wp-block-button {
		margin: 0 !important;
	}

	/* Circular arrow button (replaces the text "Sign up" on mobile).
	   Text remains in DOM but visually collapsed; pseudo-element draws the arrow. */
	.td-age-card .wp-block-button__link {
		width: 48px !important;
		height: 48px !important;
		min-width: 0 !important;
		min-height: 48px !important;
		padding: 0 !important;
		border-radius: 50% !important;
		position: relative;
		font-size: 0 !important;
		line-height: 0;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		white-space: nowrap;
	}

	.td-age-card .wp-block-button__link::after {
		content: "→";
		position: absolute;
		inset: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 1.5rem;
		font-weight: 700;
		line-height: 1;
	}
}

/* ─── Sponsor tier ladder: horizontal scroll-snap on mobile ──────────────── */
@media (max-width: 781px) {

	.wp-block-columns:has(.td-tier-card) {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 1rem;
		gap: 1rem !important;
		padding: 0.5rem 1rem 1.5rem;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		-webkit-overflow-scrolling: touch;
	}

	.td-tier-card {
		flex: 0 0 clamp(240px, 72vw, 280px) !important;
		scroll-snap-align: start;
		margin: 0 !important;
	}

	/* Scroll affordance: subtle gradient at the right edge on small screens */
	.wp-block-columns:has(.td-tier-card)::after {
		content: '';
		flex: 0 0 1rem;
	}
}

/* ─── Generic card breathing room on small screens ──────────────────────── */
@media (max-width: 600px) {

	/* Contest listing cards — avoid edge-to-edge */
	.contest-card {
		padding: 1.25rem !important;
	}

	/* Story cards on archive — tighten padding, keep side-by-side feel */
	.story-card {
		padding: 1rem !important;
	}

	/* Entry cards (blog archives) */
	.entry-card {
		padding: 0 0 1.5rem;
	}
}

/* ─── Hero subtitle + CTA on small screens ──────────────────────────────── */
@media (max-width: 600px) {
	.td-hero-logo {
		max-width: 92vw;
		padding: 0 1rem;
	}

	.td-hero-logo object,
	.td-hero-logo svg {
		max-height: 40vh;
	}
}

/* ─── Print ──────────────────────────────────────────────────────────────────*/
@media print {
	.site-header,
	.site-footer,
	.site-nav,
	.skip-link,
	.wp-block-buttons,
	.nav-links {
		display: none !important;
	}

	body {
		color: #000;
		font-size: 12pt;
	}

	.container {
		max-width: none;
		padding: 0;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   PATCH LAYER 2 — design polish pass.
   - Larger base type
   - Story / contest archive: card grids, max 400px featured image
   - Single story: 2-column editorial layout, smaller illustration, prompt expand
   - Single contest: stats row, prompt blockquote, story card grids
   - Hero: shorter on mobile, more program info, autoplay/tap support visual
   - Footer: eliminate trailing margin
   - Buttons: minimum width on small screens
   - Sponsor tier mobile: fix card width and "Most popular" eyebrow clipping
   - For-educators: respect container padding
   - Mobile drawer: GW lockup pinned to bottom
   - Gravity Forms: foundation styling
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Base type — bumped sizes ───────────────────────────────────────────── */
body {
	font-size: clamp(1.0625rem, 0.95rem + 0.5625vw, 1.25rem);
}

/* ─── Footer — eliminate stray space below ──────────────────────────────── */
/*html, body { background-color: var(--td-ink); }*/
/*body { display: flex; flex-direction: column; min-height: 100vh; }*/
.site-main { flex: 1 0 auto; background-color: var(--td-white); }
.site-footer { flex-shrink: 0; margin-top: 0; padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }

/* If any pattern emits trailing whitespace, clamp it down */
.site-main > *:last-child { margin-bottom: 0 !important; }

/* When the page ends in a full-width section that paints its own background,
   the .site-main container's bottom padding (and any block margin on the last
   alignfull or its wrappers) shows through as a white gap above the footer.
   Collapse the entire chain when this is the case. */
.site-main:has(.entry-content > .alignfull:last-child) {
	padding-bottom: 0;
}
.site-main:has(.entry-content > .alignfull:last-child) > .container,
.site-main:has(.entry-content > .alignfull:last-child) > .container > article,
.site-main:has(.entry-content > .alignfull:last-child) .entry-content {
	padding-bottom: 0;
	margin-bottom: 0;
}
.site-main:has(.entry-content > .alignfull:last-child) .entry-content > .alignfull:last-child {
	margin-bottom: 0 !important;
}

/* ─── Buttons — set a minimum size, never shrink ─────────────────────────── */
.button,
.wp-element-button,
.wp-block-button__link {
	min-height: 44px;
	min-width: 140px;
	text-align: center;
	font-size: clamp(0.9375rem, 0.875rem + 0.25vw, 1.0625rem);
	white-space: nowrap;
}

/* Inside age cards specifically, allow buttons to use the card's full width */
.td-age-card .wp-block-button__link {
	min-width: 0;
	width: 100%;
}

/* ─── Container helper for archive pages ─────────────────────────────────── */
.container--wide {
	max-width: calc( var(--td-wide-width) + var(--td-container-pad) * 2 );
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--td-container-pad);
	padding-right: var(--td-container-pad);
	width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STORY / CONTEST ARCHIVE — card grid layouts
   ═══════════════════════════════════════════════════════════════════════════ */

.story-archive,
.contest-archive {
	padding-top: clamp(2rem, 4vw, 3rem);
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

.story-archive__featured,
.story-archive__all {
	margin-top: clamp(2rem, 4vw, 3.5rem);
}

.story-archive__section-head {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: clamp(1.25rem, 2vw, 1.75rem);
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--td-cream);
}

.story-archive__section-head h2 {
	margin: 0;
	font-size: clamp(1.375rem, 1.15rem + 1vw, 1.875rem);
	font-weight: 800;
	color: var(--td-ink);
	letter-spacing: -0.01em;
}

.story-archive__section-head p {
	margin: 0;
	color: color-mix(in srgb, var(--td-ink) 60%, transparent);
	font-size: var(--wp--preset--font-size--sm, 0.9375rem);
}

/* ─── Story card grid (override the legacy .story-feed rules) ──────────── */
.story-grid {
	display: grid;
	gap: clamp(1.25rem, 2vw, 1.75rem);
	grid-template-columns: 1fr;
}

@media (min-width: 720px) {
	.story-grid--tiles,
	.story-grid--featured {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 980px) {
	.story-grid--tiles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.story-grid--featured {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Promote featured grid items visually */
.story-grid--featured .story-card {
	border: 1px solid var(--td-cream);
	background-color: var(--td-white);
}

/* ─── Story card — modern tile layout (replaces .story-card legacy rules) ─ */
.story-grid .story-card,
.story-archive .story-card,
.contest__stories .story-card,
.story__footer .story-card {
	display: flex;
	flex-direction: column; /* markup order: body, then thumbnail at bottom */
	grid-template-columns: none !important;
	gap: 0;
	padding: 0;
	border: 1px solid var(--td-cream);
	border-bottom: 1px solid var(--td-cream);
	border-radius: var(--td-radius-card);
	overflow: hidden;
	background-color: var(--td-white);
	transition: transform var(--td-transition), box-shadow var(--td-transition);
	height: 100%;
}

.story-grid .story-card:hover,
.story-archive .story-card:hover,
.contest__stories .story-card:hover,
.story__footer .story-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(38, 15, 29, 0.08);
}

.story-grid .story-card__thumbnail,
.story-archive .story-card__thumbnail,
.contest__stories .story-card__thumbnail,
.story__footer .story-card__thumbnail {
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16/9; /* sits below body content; shorter than the old 4/3 */
	max-height: 200px;
	overflow: hidden;
	background-color: color-mix(in srgb, var(--td-cream) 50%, transparent);
	border-radius: 0;
}

.story-grid .story-card__thumbnail img,
.story-archive .story-card__thumbnail img,
.contest__stories .story-card__thumbnail img,
.story__footer .story-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.story-card__thumbnail-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg,
		color-mix(in srgb, var(--td-primary) 12%, transparent),
		color-mix(in srgb, var(--td-accent) 14%, transparent));
}

.story-grid .story-card__body,
.story-archive .story-card__body,
.contest__stories .story-card__body,
.story__footer .story-card__body {
	padding: 1rem 1.1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	flex: 1;
}

.story-card__title {
	font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem) !important;
	margin: 0 !important;
}

.story-card__byline {
	margin: 0 !important;
	font-size: var(--wp--preset--font-size--sm, 0.9375rem) !important;
	color: var(--td-primary);
	font-weight: 500;
}

/* Bottom meta line — "Submitted Apr 2026 · Contest #9 · Otter" */
.story-card__meta {
	margin: 0 !important;
	font-size: 0.8125rem;
	color: color-mix(in srgb, var(--td-ink) 55%, transparent);
	line-height: 1.4;
	margin-top: auto !important; /* push to bottom of body when card stretches */
}

/* Place lockup row sits at top of body */
.story-card__placelockup {
	display: flex;
	margin: 0 0 0.1rem;
}

/* Cap the featured image visual size on desktop. The card grid columns will
   already constrain to ~400px wide via repeat(3, 1fr) inside container--wide. */
@media (min-width: 1100px) {
	.story-grid--tiles .story-card__thumbnail,
	.story-grid--featured .story-card__thumbnail {
		max-height: 300px;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTEST ARCHIVE — grid of contest cards
   ═══════════════════════════════════════════════════════════════════════════ */

.contest-grid {
	display: grid;
	gap: clamp(1.25rem, 2vw, 1.75rem);
	grid-template-columns: 1fr;
}

@media (min-width: 560px) {
	.contest-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.contest-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.contest-grid .contest-card {
	display: flex;
	flex-direction: column;
	grid-template-columns: none !important;
	padding: 0 !important;
	border: 1px solid var(--td-cream);
	border-radius: var(--td-radius-card);
	overflow: hidden;
	background-color: var(--td-white);
	transition: transform var(--td-transition), box-shadow var(--td-transition);
}

.contest-grid .contest-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(38, 15, 29, 0.08);
}

.contest-card__thumbnail {
	display: block;
	width: 100%;
	aspect-ratio: 16/9;
	overflow: hidden;
	background-color: color-mix(in srgb, var(--td-cream) 50%, transparent);
}

.contest-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.contest-card__thumbnail-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg,
		color-mix(in srgb, var(--td-primary) 18%, transparent),
		color-mix(in srgb, var(--td-accent) 22%, transparent));
	font-family: Catamaran, sans-serif;
	font-weight: 900;
	font-size: clamp(2rem, 3vw, 3rem);
	color: var(--td-ink);
	letter-spacing: -0.02em;
}

.contest-grid .contest-card__body {
	padding: 1rem 1.1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	flex: 1;
}

.contest-card__meta {
	margin-top: auto;
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
	align-items: center;
	padding-top: 0.5rem;
}

.contest-card__date {
	font-size: 0.85rem;
	color: color-mix(in srgb, var(--td-ink) 55%, transparent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE STORY — editorial 2-column layout
   ═══════════════════════════════════════════════════════════════════════════ */

.story-single .container--wide {
	max-width: calc( 1080px + var(--td-container-pad) * 2 );
}

.story__layout {
	display: grid;
	gap: clamp(1.5rem, 3vw, 3rem);
	padding-top: clamp(1.5rem, 3vw, 2.5rem);
	grid-template-columns: 1fr;
}

@media (min-width: 900px) {
	.story__layout {
		grid-template-columns: 280px minmax(0, 1fr);
		align-items: start;
	}
}

.story__meta-col {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	font-size: var(--wp--preset--font-size--sm, 0.9375rem);
	line-height: 1.5;
}

@media (min-width: 900px) {
	.story__meta-col {
		position: sticky;
		top: calc( var(--td-header-height) + 1rem );
		padding-right: 0.5rem;
		border-right: 1px solid var(--td-cream);
	}
}

.story__main-col {
	min-width: 0;
}

/* Story header in main col */
.story__header {
	text-align: left;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--td-cream);
}

.story__title {
	font-size: clamp(1.875rem, 1.5rem + 1.875vw, 2.875rem) !important;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.015em;
	margin: 0 0 0.5rem !important;
	color: var(--td-ink);
	text-align: left !important;
}

.story__submitted {
	margin: 0;
	font-size: var(--wp--preset--font-size--sm, 0.9375rem);
	color: color-mix(in srgb, var(--td-ink) 55%, transparent);
}

/* Meta col elements */
.story__badges {
	margin-bottom: 0 !important;
	justify-content: flex-start !important;
	gap: 0.4rem;
}

.story__author-block {
	padding: 0.75rem 0;
	border-top: 1px solid var(--td-cream);
}

.story__by-label {
	margin: 0 !important;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--td-ink) 55%, transparent);
	font-weight: 700;
}

.story__author {
	margin: 0.15rem 0 0 !important;
	font-size: 1.125rem !important;
	font-weight: 700 !important;
	color: var(--td-primary) !important;
}

.story__author-age,
.story__author-location {
	margin: 0.15rem 0 0 !important;
	color: color-mix(in srgb, var(--td-ink) 65%, transparent);
}

.story__author-location {
	font-style: italic;
}

/* Smaller illustration in side column */
.story__illustration {
	margin: 0 !important;
	border-radius: var(--td-radius-card);
	overflow: hidden;
	max-width: 240px;
}

.story__illustration img {
	width: 100% !important;
	height: auto !important;
	max-height: none !important;
	display: block;
	border-radius: 0 !important;
}

.story__illustration figcaption {
	font-size: 0.8125rem;
	color: color-mix(in srgb, var(--td-ink) 60%, transparent);
	font-style: italic;
	margin-top: 0.5rem;
	padding: 0;
}

/* Contest block in meta col */
.story__contest-block {
	padding-top: 0.75rem;
	border-top: 1px solid var(--td-cream);
}

.story__contest-eyebrow {
	margin: 0 0 0.15rem !important;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--td-ink) 55%, transparent);
	font-weight: 700;
}

.story__contest-title {
	margin: 0 !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
}

.story__contest-title a {
	color: var(--td-ink);
	text-decoration: none;
	border-bottom: 2px solid var(--td-accent);
}

.story__contest-title a:hover {
	color: var(--td-primary);
}

.story__contest-animal {
	margin: 0.25rem 0 0 !important;
	font-style: italic;
	color: color-mix(in srgb, var(--td-ink) 65%, transparent);
}

.story__contest-date {
	margin: 0.25rem 0 0 !important;
	font-size: 0.85rem;
	color: color-mix(in srgb, var(--td-ink) 55%, transparent);
}

/* Collapsible prompt */
.story__prompt {
	margin-top: 0.75rem;
	padding: 0.5rem 0.75rem;
	background-color: color-mix(in srgb, var(--td-cream) 60%, transparent);
	border-radius: var(--td-radius-card);
}

.story__prompt summary {
	cursor: pointer;
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--td-primary);
	list-style: none;
}

.story__prompt summary::-webkit-details-marker { display: none; }

.story__prompt summary::before {
	content: '+ ';
	font-weight: 800;
}

.story__prompt[open] summary::before { content: '− '; }

.story__prompt p {
	margin: 0.5rem 0 0 !important;
	font-size: 0.875rem !important;
	line-height: 1.5;
	font-style: italic;
	color: color-mix(in srgb, var(--td-ink) 75%, transparent);
}

/* Story body — keep prose width readable */
.story__body {
	max-width: 65ch;
	font-size: clamp(1.0625rem, 1rem + 0.375vw, 1.1875rem);
	line-height: 1.75;
}

.story__body p {
	margin: 0 0 1.25em;
}

/* Story footer — siblings */
.story__footer {
	margin-top: clamp(2.5rem, 5vw, 4rem);
	padding-top: clamp(1.5rem, 3vw, 2.25rem);
	border-top: 2px solid var(--td-cream);
}

.story__footer-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: 1.25rem;
	flex-wrap: wrap;
}

.story__footer-head h2 {
	margin: 0;
	font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
	font-weight: 800;
	color: var(--td-ink);
}

.story__footer-all {
	font-weight: 700;
	color: var(--td-primary);
	text-decoration: none;
	font-size: 0.95rem;
	white-space: nowrap;
}

.story__footer-all:hover {
	color: var(--td-primary-hover);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE CONTEST — stats, prompt block, story groups
   ═══════════════════════════════════════════════════════════════════════════ */

.contest-single {
	padding-top: clamp(2rem, 4vw, 3rem);
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

.contest-single .contest__header {
	text-align: center;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.contest__eyebrow {
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--td-primary);
	font-weight: 800;
	margin: 0 0 0.5rem;
}

.contest__title {
	font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem) !important;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0 0 0.5rem !important;
	line-height: 1.1;
}

.contest__prompt-animal {
	font-style: italic;
	font-size: var(--wp--preset--font-size--md, 1.25rem);
	color: color-mix(in srgb, var(--td-ink) 70%, transparent);
	margin: 0 0 1rem;
}

.contest__status {
	display: inline-block;
	padding: 0.25rem 0.85rem;
	border-radius: var(--td-radius-pill);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 1.5rem;
}

.contest__status--upcoming { background-color: color-mix(in srgb, var(--td-primary) 18%, transparent); color: var(--td-primary); }
.contest__status--open     { background-color: var(--td-accent); color: var(--td-ink); }
.contest__status--judging  { background-color: color-mix(in srgb, var(--td-heritage-green) 22%, transparent); color: var(--td-heritage-green); }
.contest__status--closed,
.contest__status--archived { background-color: color-mix(in srgb, var(--td-ink) 8%, transparent); color: var(--td-ink); }

/* Stats row */
.contest__stats {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	max-width: 800px;
	margin: 1.5rem auto 0;
	padding: 1.25rem;
	background-color: color-mix(in srgb, var(--td-cream) 60%, transparent);
	border-radius: var(--td-radius-card);
}

.contest__stat {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	text-align: center;
}

.contest__stat dt {
	margin: 0;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--td-ink) 60%, transparent);
	font-weight: 700;
}

.contest__stat dd {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--td-ink);
}

/* Active-contest CTA — shown for upcoming + open contests, suppressed for
   judging/closed/archived. Two flavors:
   - .contest__cta--open: dark-plum band with submit-now button
   - .contest__cta--upcoming: cream band with subscribe form embedded */
.contest__cta {
	max-width: 720px;
	margin: clamp(2rem, 4vw, 3rem) auto;
	padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.25rem);
	border-radius: var(--td-radius-card);
}

.contest__cta--open {
	background: var(--td-ink);
	color: var(--td-cream);
	position: relative;
	overflow: hidden;
}

.contest__cta--open::before {
	content: '';
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--td-accent);
}

.contest__cta--upcoming {
	background: var(--td-cream);
	color: var(--td-ink);
}

.contest__cta-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.6rem !important;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.contest__cta--open .contest__cta-eyebrow { color: var(--td-accent); }
.contest__cta--upcoming .contest__cta-eyebrow { color: var(--td-primary); }

/* Re-uses the upcoming-card live pulse */
.contest__cta-livedot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--td-accent);
	animation: tddl-livepulse 1.8s ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
	.contest__cta-livedot { animation: none; }
}

.contest__cta-title {
	margin: 0 0 0.6rem !important;
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-weight: 700;
	font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.contest__cta--open .contest__cta-title { color: var(--td-cream); }

.contest__cta-deadline {
	margin: 0 0 0.6rem !important;
	font-family: Catamaran, sans-serif;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.contest__cta--open .contest__cta-deadline { color: color-mix(in srgb, var(--td-cream) 75%, transparent); }
.contest__cta--upcoming .contest__cta-deadline { color: color-mix(in srgb, var(--td-ink) 60%, transparent); }

.contest__cta-agegroups {
	margin: 0 0 1rem !important;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.5rem;
	font-size: 0.8125rem;
}

.contest__cta-agegroups-label {
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 0.6875rem;
	margin-right: 0.25rem;
}

.contest__cta--open .contest__cta-agegroups-label {
	color: color-mix(in srgb, var(--td-cream) 70%, transparent);
}

.contest__cta--open .contest__cta-agegroups .td-cat-pill {
	border-color: color-mix(in srgb, var(--td-cream) 35%, transparent);
	color: var(--td-cream);
	background: color-mix(in srgb, var(--td-cream) 8%, transparent);
}

.contest__cta-action {
	margin: 0.5rem 0 0 !important;
}

.contest__cta-btn {
	display: inline-block;
	padding: 0.85rem 1.6rem;
	background: var(--td-accent);
	color: var(--td-ink);
	font-family: Catamaran, sans-serif;
	font-weight: 800;
	font-size: 1rem;
	letter-spacing: 0.02em;
	border-radius: var(--td-radius-pill);
	text-decoration: none;
	transition: transform var(--td-transition), box-shadow var(--td-transition);
}

.contest__cta-btn:hover,
.contest__cta-btn:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	color: var(--td-ink);
}

/* The embedded subscribe form sits inside the cream upcoming CTA. The global
   .gform_wrapper card styling already applies (white card on cream bg). */
.contest__cta-form {
	margin-top: 0.5rem;
}

.contest__cta-form .gform_wrapper {
	margin: 0;
	max-width: none;
}

/* Stylized prompt block */
.contest__prompt {
	max-width: 720px;
	margin: clamp(2rem, 4vw, 3rem) auto;
	padding: 0;
}

.contest__prompt-eyebrow {
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--td-primary);
	font-weight: 800;
	text-align: center;
	margin: 0 0 0.75rem;
}

.contest__prompt-body {
	margin: 0;
	padding: 1.5rem clamp(1.25rem, 3vw, 2.5rem);
	background-color: var(--td-cream);
	border-left: 6px solid var(--td-accent);
	border-radius: var(--td-radius-card);
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.25rem);
	line-height: 1.6;
	color: var(--td-ink);
}

.contest__prompt-body p { margin: 0; }

.contest__prompt-image {
	margin: clamp(1.5rem, 3vw, 2.5rem) auto;
	max-width: 720px;
	border-radius: var(--td-radius-card);
	overflow: hidden;
}

.contest__prompt-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Stories section */
.contest__stories {
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.contest__stories-group {
	margin-top: clamp(2rem, 4vw, 3rem);
}

.contest__stories-category {
	font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 1rem;
	padding-bottom: 0.4rem;
	border-bottom: 2px solid var(--td-cream);
	display: inline-block;
	color: var(--td-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLACE BADGES — distinct color per place
   ═══════════════════════════════════════════════════════════════════════════ */

.td-badge--place-first   { background-color: var(--td-accent); color: var(--td-ink); }
.td-badge--place-second  { background-color: color-mix(in srgb, var(--td-primary) 18%, transparent); color: var(--td-primary); }
.td-badge--place-third   { background-color: color-mix(in srgb, var(--td-cream) 80%, transparent); color: var(--td-ink); }
.td-badge--place-honorable_mention { background-color: color-mix(in srgb, var(--td-ink) 8%, transparent); color: var(--td-ink); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   HERO — shorter mobile, more program info
   ═══════════════════════════════════════════════════════════════════════════ */

.td-hero {
	min-height: 86vh;
}

@media (max-width: 768px) {
	.td-hero {
		min-height: 80dvh !important;
		padding-top: clamp(2rem, 6vw, 3rem) !important;
		padding-bottom: clamp(2rem, 6vw, 3rem) !important;
	}
	.td-hero .td-hero-logo object,
	.td-hero .td-hero-logo svg {
		max-height: 32vh;
	}
}

.td-hero__tagline {
	max-width: 36ch;
	margin-left: auto !important;
	margin-right: auto !important;
}

.td-hero__intro {
	max-width: 60ch;
	margin-left: auto !important;
	margin-right: auto !important;
	color: var(--td-ink);
}

.td-hero__facts {
	max-width: 720px;
	margin-left: auto !important;
	margin-right: auto !important;
	gap: 0.4rem 1.25rem !important;
}

.td-hero__fact {
	margin: 0;
	color: var(--td-ink);
	white-space: nowrap;
}

.td-hero__fact strong { font-weight: 800; }

/* Cursor hint on touch — tap to replay */
.td-hero-logo {
	cursor: pointer;
}

@media (hover: hover) {
	.td-hero-logo {
		cursor: default;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPONSOR TIER LADDER — fix mobile width + Most popular eyebrow clip
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 781px) {
	.wp-block-columns:has(.td-tier-card) {
		padding-top: 1.75rem !important;
	}
	/* Wider cards (78vw, capped at 320px) so the next card peeks past the
	   right edge — signals that the row is scrollable. */
	.td-tier-card {
		flex: 0 0 78vw !important;
		max-width: 320px !important;
		overflow: visible !important;
	}
	.td-tier-card--featured::before {
		font-size: 0.625rem;
		padding: 0.2em 0.7em;
		top: -0.55rem;
	}
}

/* ─── Benefactor (major-commitment) callout block ────────────────────────── */
.td-tier-benefactor {
	gap: clamp(1rem, 2vw, 2rem) !important;
	border: 1px solid color-mix(in srgb, var(--td-primary) 28%, transparent);
}

.td-tier-benefactor h3 {
	margin: 0.25rem 0 0.5rem !important;
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-weight: 700;
	letter-spacing: -0.005em;
}

.td-tier-benefactor p {
	margin: 0 0 0.4rem !important;
}

.td-tier-benefactor .wp-block-buttons {
	margin: 0 !important;
	flex-shrink: 0;
}

@media (max-width: 600px) {
	.td-tier-benefactor {
		flex-direction: column !important;
		align-items: flex-start !important;
	}
	.td-tier-benefactor .wp-block-buttons {
		width: 100%;
	}
	.td-tier-benefactor .wp-block-button {
		width: 100%;
	}
	.td-tier-benefactor .wp-block-button__link {
		width: 100%;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   AGE CARDS — mobile section mark + creature SVG marks
   ═══════════════════════════════════════════════════════════════════════════ */

.td-section-mark {
	margin: 0 auto clamp(0.75rem, 2vw, 1.25rem) !important;
	max-width: 320px !important;
}

.td-section-mark svg,
.td-section-mark img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 64px;
	object-fit: contain;
}

.td-age-card__mark {
	margin: 0 auto 0.5rem !important;
	max-width: 120px !important;
}

.td-age-card__mark svg,
.td-age-card__mark img {
	display: block;
	width: 100%;
	max-height: 56px;
	height: auto;
	object-fit: contain;
}

@media (max-width: 600px) {
	.td-age-card__mark {
		max-width: 56px !important;
	}
	.td-age-card__mark svg,
	.td-age-card__mark img {
		max-height: 32px;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOR-EDUCATORS / generic content padding fix
   ═══════════════════════════════════════════════════════════════════════════ */

/* Pages with constrained content blocks need horizontal padding so they don't
   touch the viewport edge on small screens. Scope to non-front-page so the
   hero cover keeps its full-bleed behavior, and skip cover blocks (they have
   their own padding already). */
.site-main:not(.site-main--front-page) .entry-content > .wp-block-group.alignfull,
.page-template-default .entry-content > .wp-block-group.alignfull {
	padding-left: var(--td-container-pad);
	padding-right: var(--td-container-pad);
}

@media (max-width: 781px) {
	.entry-content .wp-block-columns.alignwide:not(:has(.td-tier-card)):not(:has(.td-age-card)),
	.entry-content .wp-block-group.alignwide {
		padding-left: var(--td-container-pad);
		padding-right: var(--td-container-pad);
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE NAV DRAWER — pin GW lockup to bottom
   ═══════════════════════════════════════════════════════════════════════════ */

/* The nav drawer template-side already includes a duplicate GW lockup. Hide
   the header-row lockup on mobile, show the in-drawer one. */
@media (max-width: 768px) {
	.site-header__org-lockup {
		display: none !important;
	}
	.site-nav {
		display: flex;
		flex-direction: column;
	}
	.site-nav__list {
		flex: 1;
	}
	.site-nav__org-lockup {
		margin-top: auto;
		padding: 1.25rem 1.5rem 2rem;
		border-top: 1px solid color-mix(in srgb, var(--td-cream) 30%, transparent);
		display: flex;
		justify-content: center;
	}
	.site-nav__org-lockup .site-header__org-link {
		color: var(--td-cream);
	}
	.site-nav__org-lockup .site-header__org-label {
		color: color-mix(in srgb, var(--td-cream) 70%, transparent);
	}
	.site-nav__org-lockup .site-header__org-logo {
		color: var(--td-cream);
	}
	.site-nav__org-lockup .site-header__org-name {
		color: var(--td-cream);
	}
}

@media (min-width: 769px) {
	.site-nav__org-lockup {
		display: none !important;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   GRAVITY FORMS — foundation theming
   Applies to .gform_wrapper which Gravity emits at render time. Tokens come
   from CSS custom properties so the form picks up the brand naturally.
   ═══════════════════════════════════════════════════════════════════════════ */

.gform_wrapper.gravity-theme,
.gform_wrapper {
	font-family: inherit;
	color: var(--td-ink);
	max-width: 640px;
	margin: 1.5rem auto;
	background-color: var(--td-white);
	padding: clamp(1.25rem, 1rem + 1vw, 2rem);
	border-radius: var(--td-radius-card, 12px);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.gform_wrapper .gform_heading {
	margin-bottom: 1.5rem;
}

.gform_wrapper .gform_title {
	font-size: clamp(1.5rem, 1.2rem + 1.25vw, 2rem);
	font-weight: 800;
	margin: 0 0 0.5rem;
	color: var(--td-ink);
}

.gform_wrapper .gform_description {
	color: color-mix(in srgb, var(--td-ink) 70%, transparent);
}

.gform_wrapper .gfield {
	margin-bottom: 1.25rem;
}

.gform_wrapper .gfield_label,
.gform_wrapper label {
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--td-ink);
	display: block;
	margin-bottom: 0.4rem;
}

.gform_wrapper .gfield_required { color: var(--td-heritage-red); margin-left: 0.15rem; }

.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"],
.gform_wrapper input[type="number"],
.gform_wrapper input[type="password"],
.gform_wrapper input[type="date"],
.gform_wrapper select,
.gform_wrapper textarea {
	width: 100%;
	padding: 0.65rem 0.9rem;
	border: 2px solid var(--td-cream);
	border-radius: 8px;
	background-color: var(--td-white);
	color: var(--td-ink);
	font-family: inherit;
	font-size: 16px !important; /* hard 16px so iOS Safari does not zoom field on focus */
	line-height: 1.5;
	transition: border-color var(--td-transition), box-shadow var(--td-transition);
}

.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus {
	outline: none;
	border-color: var(--td-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--td-primary) 18%, transparent);
}

.gform_wrapper textarea {
	min-height: 120px;
	resize: vertical;
}

.gform_wrapper .gfield_description {
	font-size: 0.85rem;
	color: color-mix(in srgb, var(--td-ink) 65%, transparent);
	margin-top: 0.35rem;
}

.gform_wrapper .gfield_radio,
.gform_wrapper .gfield_checkbox {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.gform_wrapper .gchoice {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.gform_wrapper .gchoice label {
	font-weight: 500;
	margin: 0;
}

.gform_wrapper .gform_footer {
	margin-top: 1.5rem;
}

.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"] {
	display: inline-block;
	padding: 0.65em 1.75em;
	min-height: 44px;
	min-width: 140px;
	border-radius: var(--td-radius-pill);
	background-color: var(--td-primary);
	color: var(--td-white);
	font-family: inherit;
	font-weight: 700;
	font-size: 1.0625rem;
	border: none;
	cursor: pointer;
	transition: background-color var(--td-transition);
}

.gform_wrapper .gform_button:hover,
.gform_wrapper input[type="submit"]:hover {
	background-color: var(--td-primary-hover);
}

.gform_wrapper .validation_message,
.gform_wrapper .gfield_validation_message {
	color: var(--td-heritage-red);
	font-size: 0.875rem;
	margin-top: 0.35rem;
}

.gform_wrapper .gform_validation_errors {
	background-color: color-mix(in srgb, var(--td-heritage-red) 10%, transparent);
	border-left: 4px solid var(--td-heritage-red);
	padding: 1rem 1.25rem;
	border-radius: var(--td-radius-card);
	margin-bottom: 1rem;
}

.gform_confirmation_message {
	padding: 1rem 1.25rem;
	background-color: color-mix(in srgb, var(--td-heritage-green) 12%, transparent);
	border-left: 4px solid var(--td-heritage-green);
	border-radius: var(--td-radius-card);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PATCH LAYER 3
   - Site title larger
   - GW lockup: 3-col grid on mobile (so it never wraps)
   - GW lockup placement: directly under site title on desktop (not its own row)
   - Underline-secondary button style
   - Front-page winner tiles container
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Site title — larger ──────────────────────────────────────────────── */
.site-header__title {
	font-size: clamp(1.5rem, 1.2rem + 1.25vw, 2rem);
	letter-spacing: -0.015em;
	line-height: 1.05;
}

/* ─── Branding column: stack title + inline lockup ─────────────────────── */
.site-header__branding {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
}

/* ─── GW lockup — base reset (override earlier rules) ──────────────────── */
.site-header__org-lockup {
	padding: 0;
	text-align: left;
}

/* The link itself: 3-column grid so "A program of [icon] Guardian Whiskers"
   is locked to a single row with no wrapping at any viewport. */
.site-header__org-link {
	display: grid;
	grid-template-columns: auto auto auto;
	align-items: center;
	gap: 0.4rem;
	padding: 0;
	background: none;
	border-radius: 0;
	font-size: 0.8125rem;
	white-space: nowrap;
}

.site-header__org-link:hover {
	background: none;
	color: var(--td-primary-hover);
}

.site-header__org-label,
.site-header__org-name {
	white-space: nowrap;
}

.site-header__org-logo {
	width: 18px;
	height: 18px;
}

/* ─── Inline lockup (under title) — desktop default ────────────────────── */
.site-header__org-lockup--inline {
	display: block;
}

/* On mobile the inline lockup is hidden (mobile drawer + bar handle it) */
@media (max-width: 768px) {
	.site-header__org-lockup--inline {
		display: none;
	}
}

/* ─── Mobile drawer copy: 3-col grid lock so it never wraps ────────────── */
@media (max-width: 768px) {
	.site-nav__org-lockup .site-header__org-link {
		grid-template-columns: 70px 21px 100px;
		justify-content: center;
		justify-items: center;
		gap: 0.5rem;
	}
	.site-nav__org-lockup .site-header__org-label {
		justify-self: end;
	}
	.site-nav__org-lockup .site-header__org-name {
		justify-self: start;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS — underline "secondary" style
   Use by adding "is-style-underline" to a wp:button block, or by adding the
   class manually in patterns. Treats the button as a flat text link with an
   accent underline — no fill, no border.
   ═══════════════════════════════════════════════════════════════════════════ */

.wp-block-button.is-style-underline .wp-block-button__link {
	background: transparent !important;
	color: var(--td-ink) !important;
	border: 0;
	border-radius: 0;
	min-width: 0;
	padding: 0.4em 0;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.35em;
	text-decoration-color: var(--td-accent);
	transition: color var(--td-transition), text-decoration-color var(--td-transition);
}

.wp-block-button.is-style-underline .wp-block-button__link:hover {
	color: var(--td-primary) !important;
	text-decoration-color: var(--td-primary);
	background: transparent !important;
}

/* On dark backgrounds, surface the link color from currentColor */
.has-ink-background-color .wp-block-button.is-style-underline .wp-block-button__link,
.has-primary-background-color .wp-block-button.is-style-underline .wp-block-button__link {
	color: var(--td-cream) !important;
	text-decoration-color: var(--td-accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRONT PAGE — recent winners tile section
   Renders via [taradiddle_recent_winners] shortcode (see functions.php).
   Reuses .story-grid + content-story tiles for visual consistency.
   ═══════════════════════════════════════════════════════════════════════════ */

.td-recent-winners {
	max-width: var(--td-wide-width);
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 4.5rem) var(--td-container-pad);
}

.td-recent-winners__head {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: clamp(1.25rem, 2vw, 2rem);
	text-align: center;
}

.td-recent-winners__eyebrow {
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--td-primary);
	font-weight: 800;
	margin: 0;
}

.td-recent-winners__title {
	font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
	font-weight: 800;
	letter-spacing: -0.015em;
	margin: 0;
	color: var(--td-ink);
	line-height: 1.1;
}

.td-recent-winners__subtitle {
	font-size: var(--wp--preset--font-size--md, 1.25rem);
	color: color-mix(in srgb, var(--td-ink) 65%, transparent);
	margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PATCH LAYER 4 — placement medals, distinct category pills, title-first
   sizing, and a compact horizontal tile layout for the all-stories grid.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Place lockup — SVG icon + label ──────────────────────────────────────
   Trophy SVG for 1st/2nd/3rd, star SVG for honorable mention. Color per place
   is driven by --medal-color. Used as a prominent badge on story cards and
   inline alongside the category pill on single-story pages. */
.td-place-medal {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 800;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--medal-color, var(--td-ink));
	white-space: nowrap;
	line-height: 1;
}

.td-place-medal__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	color: var(--medal-color, var(--td-ink));
	flex-shrink: 0;
}

.td-place-medal__svg {
	width: 100%;
	height: 100%;
	display: block;
}

.td-place-medal__label {
	display: inline-block;
}

/* Per-place colors. Trophy is gold/silver/bronze; HM star is muted ink. */
.td-place-medal--first             { --medal-color: #c98a2c; }
.td-place-medal--second            { --medal-color: #8a8780; }
.td-place-medal--third             { --medal-color: #a06a3f; }
.td-place-medal--honorable_mention { --medal-color: color-mix(in srgb, var(--td-ink) 60%, transparent); }

/* ─── Category pill — solid fill, color-coded per age group ─────────────── */
.td-cat-pill {
	display: inline-block;
	padding: 0.25em 0.8em;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	border-radius: var(--td-radius-pill);
	background: var(--td-ink);
	border: 0;
	color: var(--td-cream);
	line-height: 1.4;
	white-space: nowrap;
}

/* Per-category fill — keep the same hue mapping as before, now as background. */
.td-cat-pill--abecedarians { background: var(--td-accent);  color: var(--td-ink); }
.td-cat-pill--juventus     { background: var(--td-primary); color: var(--td-white); }
.td-cat-pill--doyens       { background: var(--td-ink);     color: var(--td-cream); }

/* ─── Story-card badge row — keep medal + pill aligned ─────────────────── */
.story-card__badges,
.story__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 0.75rem;
	margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TITLE-FIRST tiles + compact horizontal layout for "All stories"
   ═══════════════════════════════════════════════════════════════════════════ */

/* Bigger, more prominent titles across all card variants */
.story-grid .story-card__title,
.story-archive .story-card__title,
.contest__stories .story-card__title,
.story__footer .story-card__title {
	font-size: clamp(1.1875rem, 1rem + 0.5vw, 1.4375rem) !important;
	font-weight: 800 !important;
	letter-spacing: -0.01em;
	line-height: 1.15;
	margin: 0 0 0.1rem !important;
}

/* Featured cards: thumbnail demoted to a small visual support slot at the
   bottom of the card. Body content (place lockup → title → byline) leads. */
.story-grid--featured .story-card__thumbnail {
	aspect-ratio: 16/9;
	max-height: 180px;
}

.story-grid--featured .story-card__body {
	padding: 1.25rem 1.25rem 1.1rem !important;
	gap: 0.5rem !important;
}

.story-grid--featured .story-card__title {
	font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem) !important;
	font-weight: 800 !important;
	letter-spacing: -0.01em;
	line-height: 1.15;
}

.story-grid--featured .td-place-medal {
	font-size: 0.875rem;
	letter-spacing: 0.08em;
}

.story-grid--featured .td-place-medal__icon {
	width: 26px;
	height: 26px;
}

/* ─── Compact "all stories" tiles ───────────────────────────────────────
   Tiles are HORIZONTAL at every viewport: body content on the left
   (place lockup → title → byline → category pill → meta), circular
   avatar thumbnail on the right. Distinct from `.story-grid--featured`
   which uses the vertical card lockup (image on top, body below).

   The grid `1fr 100px` puts body in a fluid column and locks the thumb
   to a 100px column. The thumb fills its track via aspect-ratio + 100%
   img sizing — no explicit width/height on the thumbnail wrapper, so
   the column width alone governs the size.
   ──────────────────────────────────────────────────────────────────────── */

@media (min-width: 600px) {
	.story-grid--tiles {
		gap: 0.85rem;
	}
}

.story-grid--tiles .story-card,
.contest__stories .story-card,
.story__footer .story-card {
	display: grid !important;
	grid-template-columns: 1fr 100px !important;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 0.85rem 0.85rem 1.1rem;
}

.story-grid--tiles .story-card__body,
.contest__stories .story-card__body,
.story__footer .story-card__body {
	padding: 0 !important;
	gap: 0.3rem !important;
	min-width: 0;
}

.story-grid--tiles .story-card__title {
	font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem) !important;
	margin: 0 !important;
	line-height: 1.2;
	/* Allow up to 2 lines of title without overflow */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.story-grid--tiles .story-card__byline {
	font-size: 0.8125rem !important;
	margin: 0 !important;
}

.story-grid--tiles .story-card__meta {
	font-size: 0.75rem;
}

/* Tighter badge row in compact tiles */
.story-grid--tiles .story-card__badges {
	gap: 0.4rem;
}

.story-grid--tiles .td-place-medal {
	font-size: 0.6875rem;
}

.story-grid--tiles .td-place-medal__icon {
	width: 18px;
	height: 18px;
}

.story-grid--tiles .td-cat-pill {
	font-size: 0.625rem;
	padding: 0.15em 0.55em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   JUDGES — archive grid + single profile layout
   ═══════════════════════════════════════════════════════════════════════════ */

.judge-archive {
	padding-top: clamp(2rem, 4vw, 3rem);
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

.judge-archive .archive-header {
	max-width: 60ch;
	margin: 0 auto clamp(1.5rem, 3vw, 2.5rem);
	text-align: center;
}

.judge-archive .archive-description {
	margin: 0.5rem auto 0;
}

.judge-grid {
	display: grid;
	gap: clamp(1.25rem, 2vw, 1.75rem);
	grid-template-columns: 1fr;
}

@media (min-width: 540px) {
	.judge-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 860px) {
	.judge-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.judge-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.judge-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--td-cream);
	border-radius: var(--td-radius-card);
	overflow: hidden;
	background: var(--td-white);
	transition: transform var(--td-transition), box-shadow var(--td-transition);
}

.judge-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(38, 15, 29, 0.08);
}

.judge-card__portrait {
	display: block;
	width: 100%;
	aspect-ratio: 3/4;
	overflow: hidden;
	background-color: color-mix(in srgb, var(--td-cream) 60%, transparent);
}

.judge-card__portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.judge-card__portrait-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg,
		color-mix(in srgb, var(--td-primary) 12%, transparent),
		color-mix(in srgb, var(--td-accent) 14%, transparent));
}

.judge-card__body {
	padding: 0.85rem 1rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.judge-card__name {
	margin: 0;
	font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.judge-card__name a {
	color: var(--td-ink);
	text-decoration: none;
}

.judge-card__name a:hover {
	color: var(--td-primary);
}

.judge-card__role {
	margin: 0;
	font-size: 0.85rem;
	color: var(--td-primary);
	font-weight: 600;
}

/* ─── Single judge ─────────────────────────────────────────────────────── */

.judge-single .container--wide {
	max-width: calc( 1080px + var(--td-container-pad) * 2 );
}

.judge__layout {
	display: grid;
	gap: clamp(1.5rem, 3vw, 3rem);
	padding-top: clamp(1.5rem, 3vw, 2.5rem);
	grid-template-columns: 1fr;
}

@media (min-width: 900px) {
	.judge__layout {
		grid-template-columns: 320px minmax(0, 1fr);
		align-items: start;
	}
}

.judge__portrait-col {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

@media (min-width: 900px) {
	.judge__portrait-col {
		position: sticky;
		top: calc( var(--td-header-height) + 1rem );
	}
}

.judge__portrait {
	margin: 0;
	border-radius: var(--td-radius-card);
	overflow: hidden;
	max-width: 320px;
	background-color: var(--td-cream);
	aspect-ratio: 3/4;
}

.judge__portrait img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
	border-radius: 0 !important;
}

.judge__back a {
	color: var(--td-primary);
	font-weight: 600;
	text-decoration: none;
	font-size: 0.9375rem;
}

.judge__back a:hover {
	color: var(--td-primary-hover);
	text-decoration: underline;
}

.judge__main-col {
	min-width: 0;
}

.judge__header {
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--td-cream);
}

.judge__name {
	margin: 0;
	font-size: clamp(1.875rem, 1.5rem + 1.875vw, 2.875rem);
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.1;
	color: var(--td-ink);
}

.judge__role {
	margin: 0.25rem 0 0;
	font-size: var(--wp--preset--font-size--md, 1.25rem);
	color: var(--td-primary);
	font-weight: 600;
}

.judge__bio {
	max-width: 65ch;
	font-size: clamp(1.0625rem, 1rem + 0.375vw, 1.1875rem);
	line-height: 1.7;
}

.judge__bio p {
	margin: 0 0 1.1em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PATCH LAYER 5
   - Story tile: 90px thumb + bolder title on mobile, title-first reorder
   - Judge portraits: MUCH smaller on archive + single
   - Single story: publication-style masthead, big serif title, squiggle rule,
     drop-cap, colophon end card
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Compact tiles: bolder title on mobile (thumb sizing lives at end) ── */
@media (max-width: 599px) {
	.story-grid--tiles .story-card__body {
		padding: 0.65rem 0.85rem !important;
	}
	.story-grid--tiles .story-card__title {
		font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.1875rem) !important;
		font-weight: 900 !important;
		letter-spacing: -0.015em;
		-webkit-line-clamp: 3;
	}
}

/* All story cards on mobile — title heavier */
@media (max-width: 599px) {
	.story-card__title {
		font-weight: 900 !important;
		letter-spacing: -0.015em;
	}
	.story-grid--featured .story-card__title {
		font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem) !important;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   JUDGES — much smaller portraits on both archive and single
   ═══════════════════════════════════════════════════════════════════════════ */

/* Archive: tighter grid, square avatar-style portraits */
.judge-card {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr);
	align-items: center;
	gap: 0.85rem;
	padding: 0.75rem;
	border-radius: var(--td-radius-card);
	background: var(--td-white);
}

.judge-card__portrait {
	width: 80px !important;
	height: 80px !important;
	aspect-ratio: 1 / 1 !important;
	border-radius: 50%;
	overflow: hidden;
}

.judge-card__portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.judge-card__body {
	padding: 0;
	gap: 0.15rem;
}

.judge-card__name {
	font-size: clamp(0.9375rem, 0.85rem + 0.3vw, 1.0625rem) !important;
}

.judge-card__role {
	font-size: 0.8125rem;
}

/* Bigger viewport: keep the row layout but allow more cards per row */
@media (min-width: 540px) {
	.judge-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 860px) {
	.judge-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.judge-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 600px) {
	.judge-card {
		grid-template-columns: 96px minmax(0, 1fr);
	}
	.judge-card__portrait {
		width: 96px !important;
		height: 96px !important;
	}
}

/* Single judge — portrait shrinks and goes inline at top of bio on mobile */
.judge__portrait {
	max-width: 200px !important;
	aspect-ratio: 1 !important;
	border-radius: 50%;
	margin: 0 auto 1rem !important;
}

.judge__portrait img {
	border-radius: 0 !important;
}

@media (max-width: 899px) {
	/* Mobile layout: "← All judges" sits above the portrait like a breadcrumb,
	   so the arrow doesn't visually point at the current judge's face. */
	.judge__portrait-col {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
	.judge__back {
		order: -1;
		margin: 0;
		font-size: 0.875rem;
	}
	.judge__portrait {
		width: 140px !important;
		max-width: 140px !important;
		margin: 0 !important;
	}
}

/* Desktop judge layout: tighten the sidebar column */
@media (min-width: 900px) {
	.judge__layout {
		grid-template-columns: 220px minmax(0, 1fr);
	}
	.judge__portrait {
		max-width: 200px !important;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE STORY — publication-style treatment
   ═══════════════════════════════════════════════════════════════════════════ */

.story-single {
	padding-top: clamp(2rem, 5vw, 3.5rem);
}

.story-single .container--wide {
	max-width: calc(960px + var(--td-container-pad) * 2);
}

/* ─── Masthead — small italic eyebrow ──────────────────────────────────── */
.story__masthead {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin: 0 auto clamp(1rem, 2vw, 1.5rem);
	padding: 0.5rem 0;
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-size: 0.875rem;
	color: color-mix(in srgb, var(--td-ink) 65%, transparent);
	letter-spacing: 0.02em;
	border-top: 1px solid color-mix(in srgb, var(--td-ink) 12%, transparent);
	border-bottom: 1px solid color-mix(in srgb, var(--td-ink) 12%, transparent);
	max-width: 540px;
	text-align: center;
}

.story__masthead-contest {
	color: var(--td-primary);
	text-decoration: none;
	font-weight: 600;
}

.story__masthead-contest:hover {
	color: var(--td-primary-hover);
}

.story__masthead-animal {
	font-style: italic;
	color: color-mix(in srgb, var(--td-ink) 70%, transparent);
}

.story__masthead-date {
	color: color-mix(in srgb, var(--td-ink) 60%, transparent);
}

/* ─── Title block ──────────────────────────────────────────────────────── */
.story__title-block {
	max-width: 760px;
	margin: 0 auto clamp(1.5rem, 3vw, 2.25rem);
	text-align: center;
}

.story__title {
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif !important;
	font-size: clamp(2.25rem, 1.8rem + 2.5vw, 4rem) !important;
	font-weight: 700 !important;
	font-style: italic;
	letter-spacing: -0.015em;
	line-height: 1.05;
	margin: 0 0 1rem !important;
	color: var(--td-ink);
	text-align: center !important;
}

.story__byline {
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1875rem);
	color: color-mix(in srgb, var(--td-ink) 75%, transparent);
	margin: 0 0 1rem;
	letter-spacing: 0.005em;
}

.story__byline-author {
	font-style: normal;
	font-weight: 600;
	color: var(--td-ink);
	font-family: Catamaran, sans-serif;
	font-size: 0.95em;
}

.story__byline-age,
.story__byline-location {
	font-style: italic;
}

.story__title-badges {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	margin: 0 0 1.25rem;
}

/* Squiggle rule — small horizontal ornament centered under the title */
.story__rule {
	display: block;
	height: 12px;
	width: auto;
	max-width: 120px;
	margin: 0.5rem auto 0;
	opacity: 0.55;
}

/* ─── Body / sidebar layout ───────────────────────────────────────────── */
.story__layout {
	display: grid;
	gap: clamp(1.5rem, 3vw, 3rem);
	grid-template-columns: 1fr;
	max-width: 100%;
	border-top: none !important;
}

@media (min-width: 900px) {
	.story__layout {
		grid-template-columns: minmax(0, 1fr) 240px;
	}
}

.story__main-col {
	min-width: 0;
	max-width: 680px;
	margin: 0 auto;
	width: 100%;
}

.story__meta-col {
	border-right: none !important;
	padding-right: 0 !important;
}

@media (min-width: 900px) {
	.story__meta-col {
		position: sticky;
		top: calc(var(--td-header-height) + 1rem);
		border-left: 1px solid var(--td-cream);
		padding-left: 1.5rem !important;
	}
}

/* Illustration: small + centered above the body */
.story__illustration {
	max-width: 260px !important;
	margin: 0 auto 1.5rem !important;
	border-radius: var(--td-radius-card);
	overflow: hidden;
}

.story__illustration img {
	max-width: 100% !important;
	width: 100% !important;
	height: auto !important;
}

/* ─── Body — drop cap + literary measure ─────────────────────────────── */
.story__body {
	max-width: 65ch;
	margin: 0 auto;
	font-family: "Hoefler Text", Georgia, "Times New Roman", serif;
	font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
	line-height: 1.75;
	color: var(--td-ink);
}

.story__body p {
	margin: 0 0 1.2em;
	hyphens: auto;
}

/* Drop cap on the first paragraph */
.story__body > p:first-of-type::first-letter {
	float: left;
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-weight: 700;
	font-style: italic;
	font-size: 4.5em;
	line-height: 0.85;
	margin: 0.08em 0.1em -0.1em 0;
	color: var(--td-primary);
}

/* Subtle indent on subsequent paragraphs to feel more book-like, but not
   first one (because of drop cap) and not after blockquote / heading */
.story__body > p + p {
	text-indent: 1.5em;
}

.story__body > p:first-of-type {
	text-indent: 0;
}

/* ─── Colophon — end-of-piece publication stamp ──────────────────────── */
.story__colophon {
	max-width: 540px;
	margin: clamp(2.5rem, 5vw, 4rem) auto 0;
	padding: 0 0 1rem;
	text-align: center;
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	color: color-mix(in srgb, var(--td-ink) 60%, transparent);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.story__colophon-rule {
	font-size: 1.5rem;
	color: var(--td-primary);
	margin-bottom: 0.5rem;
	font-style: normal;
	letter-spacing: 0.5em;
}

.story__colophon-line {
	margin: 0 0 0.25rem;
}

.story__colophon-author {
	font-style: normal;
	font-weight: 600;
	font-family: Catamaran, sans-serif;
	color: var(--td-ink);
}

.story__colophon-line a {
	color: var(--td-primary);
	text-decoration: none;
}

.story__colophon-line a:hover {
	color: var(--td-primary-hover);
	text-decoration: underline;
}

/* ─── Sidebar refresh: simpler, since most info is now in the masthead/colophon ── */
.story__contest-block {
	border-top: none;
	padding-top: 0;
}

@media (max-width: 899px) {
	/* Hide the desktop sidebar on mobile — colophon covers the meta. */
	.story__meta-col {
		display: none;
	}
}

/* ─── Footer "other winners" — tighter heading on mobile ───────────── */
@media (max-width: 599px) {
	.story__footer-head h2 {
		font-size: 1.125rem;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   PATCH LAYER 6
   - Universal "whole tile clickable" via stretched-link cover
   - Story archive: editorial card, image small/secondary
   - Judges archive: cover-link tile
   - Contest archive: stats-forward, no big image space
   - Single story: small circular author avatar
   - Site title: animated SVG (text hidden for SEO)
   - Sponsor logos larger with wider container
   - "Other winners" footer alignment fixed
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Universal stretched-link (whole tile clickable) ─────────────────── */
.story-card,
.judge-card,
.contest-card {
	position: relative;
	isolation: isolate;
}

/* The cover link is invisible but covers the entire card. */
.story-card__cover,
.judge-card__cover,
.contest-card__cover {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	overflow: hidden;
	text-indent: 200%;
	white-space: nowrap;
	color: transparent;
}

/* Inner links (titles, contest chips) sit above the cover so they remain
   independently clickable. */
.story-card__title a,
.judge-card a:not(.judge-card__cover),
.contest-card a:not(.contest-card__cover) {
	position: relative;
	z-index: 2;
}

/* Backwards-compatible: story-card still has its thumbnail <a>; treat that
   as a cover too on archives + footers. */
.story-grid .story-card__thumbnail::after,
.story-archive .story-card__thumbnail::after,
.story__footer .story-card__thumbnail::after,
.contest__stories .story-card__thumbnail::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}
.story-grid .story-card__thumbnail,
.story-archive .story-card__thumbnail,
.story__footer .story-card__thumbnail,
.contest__stories .story-card__thumbnail {
	position: static;
}

/* ─── Story card: editorial, title-first, image secondary ───────────── */

/* Featured grid (top of archive + homepage): smaller image, big serif title */
.story-grid--featured .story-card {
	display: flex !important;
	flex-direction: column;
	border: 1px solid var(--td-cream);
	background: var(--td-white);
}

.story-grid--featured .story-card__thumbnail {
	width: 100%;
	max-height: 160px;
	aspect-ratio: 16/9;
}

.story-grid--featured .story-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.story-grid--featured .story-card__body {
	padding: 1rem 1.1rem 1.1rem !important;
	text-align: left !important;
}

.story-grid--featured .story-card__title {
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif !important;
	font-style: italic;
	font-weight: 700 !important;
	font-size: clamp(1.25rem, 1.05rem + 0.75vw, 1.75rem) !important;
	letter-spacing: -0.005em;
	line-height: 1.1;
	margin: 0 0 0.4rem !important;
	text-align: left !important;
}

.story-grid--featured .story-card__byline {
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	color: color-mix(in srgb, var(--td-ink) 70%, transparent);
}

.story-grid--featured .story-card__author {
	font-style: normal;
	font-weight: 600;
	color: var(--td-ink);
	font-family: Catamaran, sans-serif;
}

/* Compact tiles: small thumb, title-first */
.story-grid--tiles .story-card__title {
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif !important;
	font-style: italic;
	font-weight: 700 !important;
}

.story-grid--tiles .story-card__byline {
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
}

.story-grid--tiles .story-card__author {
	font-style: normal;
	font-weight: 600;
	color: var(--td-ink);
	font-family: Catamaran, sans-serif;
}

/* Force consistent left-alignment for ALL content within story tiles
   (fixes "some text center, some left" in the other-winners footer). */
.story-grid .story-card,
.story-grid .story-card * {
	text-align: left !important;
}

/* ─── Other winners footer: head + tiles aligned cleanly ─────────────── */
.story__footer {
	max-width: 960px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

.story__footer-head {
	text-align: left;
}

.story__footer-head h2 {
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-weight: 700;
	letter-spacing: -0.005em;
}

/* ─── Judge card: cover-link tile, no inline anchor on portrait/name ── */
.judge-card__portrait {
	position: relative;
}

/* Hover lift on whole tile (was .story-card / .contest-card already) */
.judge-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(38, 15, 29, 0.08);
}

.judge-card__name {
	pointer-events: none; /* purely decorative — cover link handles clicks */
}

/* ─── Single story: small circular author avatar inside title block ─── */
.story__author-avatar {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	overflow: hidden;
	margin: 0.5rem auto 0.75rem;
	border: 3px solid var(--td-cream);
	background: var(--td-cream);
	box-shadow: 0 2px 12px rgba(38, 15, 29, 0.08);
}

.story__author-avatar img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
	border-radius: 0 !important;
	max-width: none !important;
}

@media (max-width: 599px) {
	.story__author-avatar {
		width: 80px;
		height: 80px;
	}
}

.story__illus-credit {
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-size: 0.8125rem;
	color: color-mix(in srgb, var(--td-ink) 55%, transparent);
	margin: 0.5rem 0 0;
}

/* The old prominent .story__illustration figure is no longer rendered.
   Keep harmless fallback styles in case content authors add featured-image
   blocks inside body. */

/* ═══════════════════════════════════════════════════════════════════════════
   SITE TITLE — animated SVG wordmark in the header bar
   ═══════════════════════════════════════════════════════════════════════════ */

.site-header__title {
	display: inline-flex;
	align-items: center;
	height: 100%;
	min-height: 36px;
	padding: 0;
}

.site-header__title-svg {
	display: block;
	height: clamp(28px, 3vw, 40px);
	width: auto;
	max-width: 200px;
	cursor: pointer;
	transition: filter 0.3s ease;
}

.site-header__title:hover .site-header__title-svg {
	filter: drop-shadow(0 2px 8px rgba(38, 15, 29, 0.15));
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTEST ARCHIVE — text-forward stats card, whole tile linked
   ═══════════════════════════════════════════════════════════════════════════ */

/* Override the older image-heavy contest-card rules from earlier patch layers */
.contest-grid .contest-card {
	display: flex !important;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1.25rem 1.5rem !important;
	border: 1px solid var(--td-cream);
	border-radius: var(--td-radius-card);
	background: var(--td-white);
	transition: transform var(--td-transition), box-shadow var(--td-transition);
	height: 100%;
}

.contest-grid .contest-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(38, 15, 29, 0.1);
	border-color: color-mix(in srgb, var(--td-primary) 30%, var(--td-cream));
}

/* Keep the thumbnail block from rendering — text-forward design */
.contest-grid .contest-card__thumbnail,
.contest-grid .contest-card__thumbnail-placeholder {
	display: none !important;
}

.contest-card__number {
	margin: 0 !important;
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--td-primary);
	font-weight: 800;
}

.contest-card__title {
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif !important;
	font-style: italic;
	font-weight: 700 !important;
	font-size: clamp(1.375rem, 1.15rem + 0.875vw, 1.75rem) !important;
	letter-spacing: -0.01em;
	line-height: 1.1;
	margin: 0.1rem 0 0.3rem !important;
	color: var(--td-ink);
}

.contest-card__date {
	margin: 0 !important;
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-size: 0.9375rem;
	color: color-mix(in srgb, var(--td-ink) 60%, transparent);
}

.contest-card__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.75rem;
	margin: 0.6rem 0 0.4rem !important;
	padding: 0;
	border: 0;
}

.contest-card__stat {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.contest-card__stat dd {
	order: -1;
	margin: 0;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.05;
	color: var(--td-ink);
	font-family: Catamaran, sans-serif;
	font-feature-settings: "tnum" 1;
}

.contest-card__stat dt {
	order: 0;
	margin: 0;
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--td-ink) 55%, transparent);
	font-weight: 600;
}

/* Status pill — slightly more refined */
.contest-card__status {
	align-self: flex-start;
	display: inline-block;
	padding: 0.2rem 0.7rem;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: var(--td-radius-pill);
	margin-top: 0.25rem !important;
}

/* Tighter contest-grid: 2 cols at sm, 3 at md, 4 at lg */
@media (min-width: 1100px) {
	.contest-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURED UPCOMING CONTEST — dark band above the past-contest grid
   ═══════════════════════════════════════════════════════════════════════════ */

.contest-upcoming {
	margin: 0 0 clamp(2rem, 4vw, 3.5rem);
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
}

/* When 2+ cards are showing, switch to a 2-col grid on tablet+ so they sit
   side-by-side. The single-card variant gets the full-width hero treatment. */
@media (min-width: 900px) {
	.contest-upcoming--multi {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.contest-upcoming__card {
	position: relative;
	overflow: hidden;
	border-radius: var(--td-radius-card);
	background: var(--td-ink);
	color: var(--td-cream);
	padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.75rem);
	isolation: isolate;
}

/* Currently-running variant — accent-tinted left edge to differentiate */
.contest-upcoming__card--running::before {
	content: '';
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--td-accent);
	z-index: 2;
}

/* Recent (just-wrapped) variant — same ink surface + cream type as the
   other variants; differentiation is a primary-purple left edge only. */
.contest-upcoming__card--recent::before {
	content: '';
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--td-primary);
	z-index: 2;
}

/* Judging / closed variants — same dark surface, just no live-pulse. The
   eyebrow text alone carries the state. */
.contest-upcoming__card--judging .contest-upcoming__eyebrow,
.contest-upcoming__card--closed .contest-upcoming__eyebrow {
	color: var(--td-cream);
}

.contest-upcoming__blob {
	position: absolute;
	top: -20%;
	right: -10%;
	width: clamp(220px, 40%, 420px);
	aspect-ratio: 1 / 1;
	background: var(--td-accent);
	mask: url('../img/blob.svg') center / contain no-repeat;
	-webkit-mask: url('../img/blob.svg') center / contain no-repeat;
	opacity: 0.08;
	pointer-events: none;
	z-index: 0;
}

.contest-upcoming__inner {
	position: relative;
	z-index: 1;
	max-width: 720px;
}

.contest-upcoming__eyebrow {
	margin: 0 0 0.5rem !important;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--td-accent);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

/* Live "running now" pulse — paired with the accent-tinted left edge */
.contest-upcoming__livedot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--td-accent);
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--td-accent) 70%, transparent);
	animation: tddl-livepulse 1.8s ease-out infinite;
}

@keyframes tddl-livepulse {
	0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--td-accent) 70%, transparent); }
	70%  { box-shadow: 0 0 0 8px color-mix(in srgb, var(--td-accent) 0%, transparent); }
	100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--td-accent) 0%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
	.contest-upcoming__livedot { animation: none; }
}

.contest-upcoming__title {
	margin: 0 0 0.75rem !important;
	font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
	font-style: italic;
	font-weight: 700;
	font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
	line-height: 1.05;
	letter-spacing: -0.015em;
	color: var(--td-cream);
}

/* Single-card variant: push the title bigger on desktop. The multi-card grid
   keeps the smaller default so two cards sit side-by-side without fighting. */
.contest-upcoming:not(.contest-upcoming--multi) .contest-upcoming__title {
	font-size: clamp(2.25rem, 1.5rem + 3.5vw, 4.5rem);
}

/* Age-categories row */
.contest-upcoming__agegroups {
	margin: 0 0 1rem !important;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.5rem;
	font-size: 0.8125rem;
}

.contest-upcoming__agegroups-label {
	font-weight: 700;
	letter-spacing: 0.04em;
	color: color-mix(in srgb, var(--td-cream) 70%, transparent);
	text-transform: uppercase;
	font-size: 0.6875rem;
	margin-right: 0.25rem;
}

/* Category pills inside the dark upcoming card need cream-tone styling */
.contest-upcoming__agegroups .td-cat-pill {
	border-color: color-mix(in srgb, var(--td-cream) 35%, transparent);
	color: var(--td-cream);
	background: color-mix(in srgb, var(--td-cream) 8%, transparent);
}

.contest-upcoming__number {
	display: block;
	font-family: Catamaran, sans-serif;
	font-style: normal;
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--td-cream) 65%, transparent);
	margin-bottom: 0.4rem;
}

.contest-upcoming__animal {
	display: block;
}

.contest-upcoming__dateline {
	margin: 0 0 1rem !important;
	font-family: Catamaran, sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: color-mix(in srgb, var(--td-cream) 70%, transparent);
}

.contest-upcoming__teaser {
	margin: 0 0 1.5rem !important;
	font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
	line-height: 1.5;
	max-width: 56ch;
	color: color-mix(in srgb, var(--td-cream) 92%, transparent);
}

.contest-upcoming__cta {
	margin: 0 !important;
}

.contest-upcoming__btn {
	display: inline-block;
	padding: 0.75rem 1.4rem;
	background: var(--td-cream);
	color: var(--td-ink);
	font-family: Catamaran, sans-serif;
	font-weight: 800;
	font-size: 0.9375rem;
	letter-spacing: 0.02em;
	border-radius: var(--td-radius-pill);
	text-decoration: none;
	transition: transform var(--td-transition), box-shadow var(--td-transition);
}

.contest-upcoming__btn:hover,
.contest-upcoming__btn:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	color: var(--td-ink);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPONSOR LOGOS — larger, wider container
   ═══════════════════════════════════════════════════════════════════════════ */

.td-sponsor-grid {
	gap: 2.5rem 3rem;
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
	padding: 1.5rem 0 1rem;
}

.td-sponsor-grid img {
	max-height: 88px !important;
	max-width: 220px !important;
	width: auto;
	height: auto;
	filter: grayscale(0.1);
}

@media (max-width: 599px) {
	.td-sponsor-grid {
		gap: 1.5rem 2rem;
	}
	.td-sponsor-grid img {
		max-height: 64px !important;
		max-width: 160px !important;
	}
}

.td-recent-winners__cta {
	display: flex;
	justify-content: center;
	margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TWO-STEP SCALING NAVIGATION
   Replaces the legacy .site-header markup. Floating fixed bar at the top of
   the viewport. Closed = small pill (logo + toggle). Open = bar expands and
   reveals a links column + brand visual.
   ═══════════════════════════════════════════════════════════════════════════ */

[data-twostep-nav] {
	--cubic-default: cubic-bezier(0.625, 0.05, 0, 1);
	--animation-ease: 0.2s ease;

	--duration-default:       0.5s;
	--duration-default-long:  0.75s;
	--duration-default-half:  0.25s;

	--animation-default:       var(--duration-default)       var(--cubic-default);
	--animation-default-long:  var(--duration-default-long)  var(--cubic-default);
	--animation-default-half:  var(--duration-default-half)  var(--cubic-default);

	/* Brand-tuned tokens */
	--twostep-bar-bg:       var(--td-white);
	--twostep-bar-fg:       var(--td-ink);
	--twostep-bar-border:   1px solid color-mix(in srgb, var(--td-ink) 8%, transparent);
	--twostep-bar-shadow:   0 6px 20px rgba(38, 15, 29, 0.08);
	--twostep-bar-shadow-active: 0 14px 40px rgba(38, 15, 29, 0.18);
	--twostep-overlay:      color-mix(in srgb, var(--td-ink) 55%, transparent);
	--twostep-line:         color-mix(in srgb, var(--td-ink) 12%, transparent);

	/* Bar sizes anchored in pixels so they don't drift with body font scaling */
	--twostep-bar-max-closed: 380px;
	--twostep-wrap-max:       820px;
	--twostep-bar-radius:     999px;
	--twostep-bar-radius-active: 18px;

	/* Reserve space below the bar for page content (used elsewhere) */
	--twostep-bar-space: clamp(72px, 9vh, 92px);
}

.twostep-nav {
	z-index: 100;
	pointer-events: none;
	position: fixed;
	inset: 0;
	font-family: inherit;
}

/* ─── Page overlay ───────────────────────────────────────────────────────── */
.twostep-nav__bg {
	z-index: 0;
	opacity: 0;
	pointer-events: auto;
	visibility: hidden;
	background-color: var(--twostep-overlay);
	width: 100%;
	height: 100%;
	position: absolute;
	inset: 0;
	transition: opacity var(--animation-default), visibility var(--animation-default);
	cursor: pointer;
}

[data-nav-status="active"] .twostep-nav__bg {
	opacity: 1;
	visibility: visible;
}

/* ─── Wrap + width ──────────────────────────────────────────────────────── */
.twostep-nav__wrap {
	display: flex;
	justify-content: center;
	align-items: stretch;
	width: 100%;
	position: absolute;
	top: 0;
	left: 0;
}

.twostep-nav__width {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: var(--twostep-wrap-max);
	padding: 0.875rem clamp(0.75rem, 2vw, 1.25rem) 0;
}

/* ─── The bar ────────────────────────────────────────────────────────────── */
.twostep-nav__bar {
	pointer-events: auto;
	color: var(--twostep-bar-fg);
	width: 100%;
	max-width: var(--twostep-bar-max-closed);
	position: relative;
	transition: max-width var(--animation-default-long) 0.2s;
}

[data-nav-status="active"] .twostep-nav__bar {
	transition: max-width var(--animation-default) 0s;
	max-width: 100%;
}

/* The "back" — animated background card behind the bar contents */
.twostep-nav__back {
	z-index: 0;
	position: absolute;
	inset: 0;
	transition: inset var(--animation-default), border-radius var(--animation-default);
}

.twostep-nav__back-bg {
	width: 100%;
	height: 100%;
	background-color: var(--twostep-bar-bg);
	border: var(--twostep-bar-border);
	border-radius: var(--twostep-bar-radius);
	box-shadow: var(--twostep-bar-shadow);
	/* Close direction: hold the rounded-card shape until the bar has shrunk,
	   then snap back to pill. Without the delay the radius reaches 999px
	   while the bar is still wide and looks like a giant pill mid-collapse. */
	transition:
		border-radius var(--animation-default-half) 0.5s,
		box-shadow var(--animation-default);
}

[data-nav-status="active"] .twostep-nav__back {
	inset: -0.25em;
}

[data-nav-status="active"] .twostep-nav__back-bg {
	/* Open direction: quickly soften the corners as the bar grows. */
	transition:
		border-radius var(--animation-default-half) 0s,
		box-shadow var(--animation-default);
	border-radius: var(--twostep-bar-radius-active);
	box-shadow: var(--twostep-bar-shadow-active);
}

/* ─── Top row: logo + toggle ────────────────────────────────────────────── */
.twostep-nav__top {
	z-index: 1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	width: 100%;
	height: 64px;
	padding: 0 1rem 0 1.25rem;
	position: relative;
}

.twostep-nav__logo {
	display: inline-flex;
	align-items: center;
	height: 100%;
	max-width: 140px;
	color: var(--twostep-bar-fg);
	text-decoration: none;
}

.twostep-nav__logo svg {
	height: 22px;
	width: auto;
	display: block;
}

.twostep-nav__logo:hover { opacity: 0.8; }

.twostep-nav__toggle {
	pointer-events: auto;
	cursor: pointer;
	background-color: transparent;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	position: relative;
	flex-shrink: 0;
	color: var(--twostep-bar-fg);
}

.twostep-nav__toggle-bar {
	position: absolute;
	background-color: currentColor;
	width: 24px;
	height: 2px;
	border-radius: 1px;
	transition: transform var(--animation-default);
	transform: translateY(-4px) rotate(0.001deg);
}

.twostep-nav__toggle .twostep-nav__toggle-bar:nth-child(2) {
	transform: translateY(4px) rotate(0.001deg);
}

.twostep-nav__toggle:hover .twostep-nav__toggle-bar {
	transform: translateY(4px) rotate(0.001deg);
}

.twostep-nav__toggle:hover .twostep-nav__toggle-bar:nth-child(2) {
	transform: translateY(-4px) rotate(0.001deg);
}

[data-nav-status="active"] .twostep-nav__toggle .twostep-nav__toggle-bar {
	transform: translateY(0) rotate(45deg);
}

[data-nav-status="active"] .twostep-nav__toggle .twostep-nav__toggle-bar:nth-child(2) {
	transform: translateY(0) rotate(-45deg);
}

/* Thin separator that fades in when nav is open */
.twostep-nav__top-line {
	z-index: 2;
	background-color: var(--twostep-line);
	height: 1px;
	position: absolute;
	bottom: 0;
	left: 0.75rem;
	right: 0.75rem;
	opacity: 0;
	transition: all var(--animation-default) 0s;
}

[data-nav-status="active"] .twostep-nav__top-line {
	transition: all var(--animation-default) 0.1s;
	opacity: 1;
}

/* ─── Bottom (revealed on open) ─────────────────────────────────────────── */
.twostep-nav__bottom {
	display: grid;
	grid-template-rows: 0fr;
	width: 100%;
	position: relative;
	overflow: hidden;
	transition: grid-template-rows var(--animation-default) 0s;
}

[data-nav-status="active"] .twostep-nav__bottom {
	transition: grid-template-rows var(--animation-default-long) 0.25s;
	grid-template-rows: 1fr;
}

.twostep-nav__bottom-overflow {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	position: relative;
}

.twostep-nav__bottom-inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 1.25rem 1.5rem 1.5rem;
	position: relative;
}

.twostep-nav__bottom-row {
	display: flex;
	justify-content: flex-start;
	align-items: stretch;
	gap: 1.5rem;
	width: 100%;
}

.twostep-nav__bottom-col {
	flex: 1;
	min-height: 100%;
	display: flex;
}

/* Reveal each column on open with a slight stagger */
.twostep-nav__bottom-row > * {
	opacity: 0;
	transform: translateY(2em);
	transition: all var(--animation-default) 0s;
}

.twostep-nav__bottom-row > *:nth-child(2) {
	transition-delay: 0.075s;
}

[data-nav-status="active"] .twostep-nav__bottom-row > * {
	opacity: 1;
	transform: translateY(0);
	transition: all var(--animation-default-long) 0.5s;
}

[data-nav-status="active"] .twostep-nav__bottom-row > *:nth-child(2) {
	transition-delay: 0.575s;
}

/* ─── Menu items ───────────────────────────────────────────────────────── */
.twostep-nav__info {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	width: 100%;
}

.twostep-nav__ul {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.twostep-nav__ul.is--small {
	flex-flow: row wrap;
	gap: 0.4rem 1.25rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--td-cream);
}

.twostep-nav__li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.twostep-nav__link {
	display: block;
	padding: 0.5rem 0;
	color: inherit;
	text-decoration: none;
	transition: color var(--animation-ease);
	position: relative;
}

.twostep-nav__link-span {
	display: inline-block;
	font-family: Catamaran, system-ui, sans-serif;
	font-weight: 800;
	font-size: clamp(1.625rem, 1.25rem + 1.5vw, 2.25rem);
	line-height: 1.05;
	letter-spacing: -0.025em;
	color: var(--td-ink);
	transition: color var(--animation-ease);
}

.twostep-nav__link:hover .twostep-nav__link-span {
	color: var(--td-primary);
}

.twostep-nav__link-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: Catamaran, system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	letter-spacing: -0.005em;
	color: color-mix(in srgb, var(--td-ink) 70%, transparent);
	transition: color var(--animation-ease);
}

.twostep-nav__link:hover .twostep-nav__link-eyebrow {
	color: var(--td-primary);
}

/* GW lockup link — show the small paw icon */
.twostep-nav__link--gw {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0;
}

.twostep-nav__link--gw .site-header__org-logo {
	width: 18px;
	height: 18px;
	color: var(--td-primary);
}

/* ─── Visual column ───────────────────────────────────────────────────── */
.twostep-nav__visual {
	aspect-ratio: 1;
	border-radius: var(--td-radius-card);
	width: 100%;
	max-width: 320px;
	overflow: hidden;
	background-color: var(--td-cream);
}

.twostep-nav__visual-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ─── Mobile adjustments ───────────────────────────────────────────────── */
@media (max-width: 767px) {
	.twostep-nav__bottom-col.is--visual {
		display: none;
	}

	.twostep-nav__top-line {
		bottom: -0.5em;
		left: 1em;
		right: 1em;
	}

	[data-nav-status="active"] .twostep-nav__top-line {
		transition: all var(--animation-default) 0.2s;
		left: 0;
		right: 0;
	}

	[data-nav-status="active"] .twostep-nav__back {
		inset: -1.25em;
	}

	[data-nav-status="active"] .twostep-nav__back-bg {
		border-radius: 0;
	}

	.twostep-nav__bottom {
		transform: translateY(-0.625em);
		transition: grid-template-rows var(--animation-default) 0s,
		            transform var(--animation-default) 0s;
	}

	[data-nav-status="active"] .twostep-nav__bottom {
		transition: grid-template-rows var(--animation-default-long) 0.25s,
		            transform var(--animation-default) 0.25s;
		transform: translateY(0);
	}

	.twostep-nav__bottom-inner {
		padding: 1rem 1.25rem 1.5rem;
	}

	.twostep-nav__link-span {
		font-size: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
	}
}

/* Lock body scroll when the nav is open */
body.twostep-nav-open {
	overflow: hidden;
}

/* Globally-available bar-space token for the twostep variant. Only used
   when body.nav-twostep is on — kept at :root so any layout rule can read it. */
:root {
	--twostep-bar-space: clamp(72px, 9vh, 92px);
}

/* ─── Twostep variant: reserve top space for page content ──────────────── */
body.nav-twostep .site-main {
	padding-top: calc(var(--twostep-bar-space) + clamp(0.5rem, 2vw, 1.5rem));
}

/* Front-page hero is full-bleed — let the floating bar overlay it. */
body.nav-twostep .site-main--front-page {
	padding-top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRIVACY POLICY PAGE — long-form prose with effective-date band, summary
   callout, and squiggle separators between major sections.
   ═══════════════════════════════════════════════════════════════════════════ */

.td-policy-effective {
	font-style: italic;
	font-size: 0.9375rem;
	color: var(--td-ink);
	opacity: 0.7;
	border-top: 1px solid var(--td-cream);
	border-bottom: 1px solid var(--td-cream);
	padding: 0.75rem 0;
	margin: 0 0 2.5rem;
	letter-spacing: 0.01em;
}

.td-policy-summary {
	background: var(--td-cream);
	border-radius: 12px;
	padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
	margin: 0 0 3rem;
}

.td-policy-summary p {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--td-ink);
}

.td-policy-summary strong {
	font-weight: 800;
}

.td-policy-squiggle {
	display: block;
	margin: 3rem auto;
	width: clamp(80px, 15vw, 120px);
	height: 12px;
	opacity: 0.5;
}

.entry-content .td-policy-squiggle img {
	display: block;
	width: 100%;
	height: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STORY TILE: CIRCULAR THUMBNAIL
   Pairs with the horizontal tile layout defined earlier in this file — the
   thumbnail sits in the 100px grid column, sized BY that column. No
   explicit width/height here; aspect-ratio + 100%-fill img is enough.
   Distinct from `.story-grid--featured` which keeps the rectangular hero
   image-on-top treatment.
   ═══════════════════════════════════════════════════════════════════════════ */

.story-grid--tiles .story-card__thumbnail,
.contest__stories .story-card__thumbnail,
.story__footer .story-card__thumbnail {
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	margin: 0;
	background-color: color-mix(in srgb, var(--td-cream) 50%, transparent);
}

.story-grid--tiles .story-card__thumbnail img,
.contest__stories .story-card__thumbnail img,
.story__footer .story-card__thumbnail img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.story-grid--tiles .story-card__thumbnail-placeholder,
.contest__stories .story-card__thumbnail-placeholder,
.story__footer .story-card__thumbnail-placeholder {
	width: 100%;
	height: 100%;
	border-radius: 50%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRONT-PAGE BLOB DECORATIONS
   Two decorative blobs flanking the peepers section on the home page:
     blob02.svg (::before) → top-right corner, bottom-left quadrant peek.
     blob.svg   (::after)  → bottom-left corner, top-right quadrant peek.
   Hover behavior: when the cursor sits within either blob's visible
   region, that blob slowly rotates. The other one stays still. JS in
   page-blobs.js toggles `td-peepers-hover-tr` / `td-peepers-hover-bl`
   classes based on cursor proximity. Reduced-motion: rotation disabled.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Peepers section: cream-bg override on home so the maroon blobs read. */
body.home .td-peepers-trigger.has-ink-background-color,
body.home .td-peepers-trigger {
	background-color: var(--td-cream) !important;
	color: var(--td-ink) !important;
	position: relative;
	overflow: hidden;
}

body.home .td-peepers-trigger.has-cream-color,
body.home .td-peepers-trigger .has-cream-color {
	color: var(--td-ink) !important;
}

body.home .td-peepers-trigger .has-accent-color {
	color: var(--td-primary) !important;
}

body.home .td-peepers-trigger > * {
	position: relative;
	z-index: 1;
}

/* Top-right blob (blob02). */
body.home .td-peepers-trigger::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: clamp(260px, 38vw, 460px);
	aspect-ratio: 450 / 421;
	background-image: url('../img/blob02.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	transform: translate(45%, -50%);
	transform-origin: center;
	pointer-events: none;
	z-index: 0;
}

/* Bottom-left blob (blob.svg). */
body.home .td-peepers-trigger::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: clamp(260px, 38vw, 460px);
	aspect-ratio: 445 / 430;
	background-image: url('../img/blob.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	transform: translate(-45%, 50%);
	transform-origin: center;
	pointer-events: none;
	z-index: 0;
}

@media (max-width: 720px) {
	body.home .td-peepers-trigger::before {
		width: clamp(180px, 60vw, 280px);
		transform: translate(50%, -55%);
	}
	body.home .td-peepers-trigger::after {
		width: clamp(180px, 60vw, 280px);
		transform: translate(-50%, 55%);
	}
}

/* Hover rotation — desktop only. JS adds `td-peepers-hover-tr` /
   `td-peepers-hover-bl` to the section when the cursor is near the
   respective blob. Keyframes preserve the static translate so the blob
   stays in place while spinning around its own center. */
@keyframes td-blob-spin-tr {
	from { transform: translate(45%, -50%) rotate(0deg); }
	to   { transform: translate(45%, -50%) rotate(360deg); }
}
@keyframes td-blob-spin-bl {
	from { transform: translate(-45%, 50%) rotate(0deg); }
	to   { transform: translate(-45%, 50%) rotate(360deg); }
}

@media (min-width: 721px) {
	body.home .td-peepers-trigger.td-peepers-hover-tr::before {
		animation: td-blob-spin-tr 22s linear infinite;
	}
	body.home .td-peepers-trigger.td-peepers-hover-bl::after {
		animation: td-blob-spin-bl 22s linear infinite;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.home .td-peepers-trigger::before,
	body.home .td-peepers-trigger::after {
		animation: none !important;
	}
}



