/* Creatives Events: front-end styles. Variables are set per site from the settings screen. */

.ce-events,
.ce-single,
.ce-form {
	--ce-accent: #6c9ff9;
	--ce-accent-text: #fff;
	--ce-card-bg: #fff;
	--ce-text: currentColor;
	--ce-text-safe: var(--ce-text);
	--ce-muted: currentColor;
	/* Luminance bounds that keep automatic text readable on the card background (set per site from the card color). */
	--ce-text-y-min: 0;
	--ce-text-y-max: .125;
	--ce-muted-y-min: 0;
	--ce-muted-y-max: .1687;
	--ce-border: #e5e7eb;
	--ce-radius: 12px;
	--ce-img-w: 35%;
	--ce-ratio: 4 / 3;
	--ce-pad: 3%;
	--ce-gap: 3%;
	--ce-title-size: 1.35rem;
	--ce-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
	--ce-card-border: 1px solid transparent;
	--ce-heading-font: inherit;
	color: var(--ce-text-safe);
}

/*
 * Contrast floor for automatic colors. Each color is scaled in linear light so its luminance
 * stays inside the bounds above (darker on light cards, lighter on dark cards), keeping its hue.
 * Text: 6:1 against the card. Secondary text (the theme text blended 68% into the card): 4.8:1.
 * Colors picked in the settings or the Elementor widgets are used as chosen.
 */
@supports (color: color(from currentColor srgb-linear calc(r * min(1, .5 / g)) g b)) {
	.ce-events,
	.ce-single,
	.ce-form {
		--ce-lum: (.2126 * r + .7152 * g + .0722 * b);
		--ce-tk: min(1, var(--ce-text-y-max) / var(--ce-lum));
		--ce-tt: max(0, (var(--ce-text-y-min) - var(--ce-lum)) / (1 - var(--ce-lum)));
		--ce-mk: min(1, var(--ce-muted-y-max) / var(--ce-lum));
		--ce-mt: max(0, (var(--ce-muted-y-min) - var(--ce-lum)) / (1 - var(--ce-lum)));
		--ce-text-safe: color(from var(--ce-text) srgb-linear calc(r * var(--ce-tk) + (1 - r * var(--ce-tk)) * var(--ce-tt)) calc(g * var(--ce-tk) + (1 - g * var(--ce-tk)) * var(--ce-tt)) calc(b * var(--ce-tk) + (1 - b * var(--ce-tk)) * var(--ce-tt)));
		--ce-muted: color(from color-mix(in srgb, currentColor 68%, var(--ce-card-bg)) srgb-linear calc(r * var(--ce-mk) + (1 - r * var(--ce-mk)) * var(--ce-mt)) calc(g * var(--ce-mk) + (1 - g * var(--ce-mk)) * var(--ce-mt)) calc(b * var(--ce-mk) + (1 - b * var(--ce-mk)) * var(--ce-mt)));
	}
}

.ce-events *,
.ce-single *,
.ce-form * {
	box-sizing: border-box;
}

.ce-events [hidden],
.ce-single [hidden] {
	display: none !important;
}

/* Sections */
.ce-section + .ce-section {
	margin-top: 6%;
}

.ce-section__heading {
	font-family: var(--ce-heading-font);
	margin: 0 0 2%;
	display: flex;
	align-items: center;
	gap: .6em;
}

.ce-section__heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--ce-border);
}

.ce-empty {
	padding: 4% 3%;
	border: 1px dashed var(--ce-border);
	border-radius: var(--ce-radius);
	text-align: center;
	color: var(--ce-muted);
	margin: 0;
}

.ce-list {
	container-type: inline-size;
	container-name: ce-list;
}

/* An inline-size container has no content width, so a shrink-wrapped Elementor widget (row container) collapses to 0 */
.elementor-widget:has(.ce-events) {
	width: 100%;
}
/* Card */
.ce-card {
	display: grid;
	grid-template-columns: var(--ce-img-w) minmax(0, 1fr);
	background: var(--ce-card-bg);
	border: var(--ce-card-border);
	border-radius: var(--ce-radius);
	box-shadow: var(--ce-shadow);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease;
}

.ce-card + .ce-card {
	margin-top: var(--ce-gap);
}

.ce-card--elevated:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(15, 23, 42, .06), 0 14px 32px rgba(15, 23, 42, .12);
}

.ce-card--img-right {
	grid-template-columns: minmax(0, 1fr) var(--ce-img-w);
}

.ce-card--img-right .ce-card__media {
	order: 2;
}

.ce-card__media {
	position: relative;
	min-width: 0;
	overflow: hidden;
	background: color-mix(in srgb, var(--ce-accent) 12%, var(--ce-card-bg));
}

.ce-card .ce-card__media img,
.ce-card .ce-card__img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: var(--ce-ratio);
	object-fit: cover;
	max-width: none;
	border-radius: 0;
	margin: 0;
	contain: none;
}

.ce-ratio-fill .ce-card__media {
	min-height: 220px;
}

.ce-ratio-fill .ce-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}

/* On wide (two-column) cards the image keeps the chosen shape and sits at the top of
 * its column. "Fill card height" instead fills the column and crops to the text height.
 * Stacked (narrow) cards keep the ratio-based box from the rules above. */
@container ce-list (min-width: 641px) {
	.ce-card__media {
		min-height: 0;
		align-self: start;
	}

	.ce-card .ce-card__media img,
	.ce-card .ce-card__placeholder {
		height: auto;
		aspect-ratio: var(--ce-ratio);
	}

	.ce-ratio-fill .ce-card__media {
		align-self: stretch;
	}

	.ce-ratio-fill .ce-card__media img,
	.ce-ratio-fill .ce-card__placeholder {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		aspect-ratio: auto;
	}
}

.ce-card__media-link {
	display: block;
	height: 100%;
}

/* Share row under the image (upcoming events) */
.ce-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .5em .75em;
	padding: 1em 5%;
	min-width: 0;
}

.ce-share__label {
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ce-muted);
}

.ce-share__btns {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .4em;
}

.ce-card .ce-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	margin: 0;
	border: 1px solid var(--ce-border);
	border-radius: 50%;
	background: var(--ce-card-bg);
	color: var(--ce-accent);
	font-size: 1rem;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.ce-card .ce-share__btn:hover,
.ce-card .ce-share__btn:focus-visible {
	background: var(--ce-accent);
	border-color: var(--ce-accent);
	color: var(--ce-accent-text);
}

.ce-card .ce-share__btn:focus-visible {
	outline: 2px solid var(--ce-accent);
	outline-offset: 2px;
}

.ce-share__icon {
	width: 1.1em;
	height: 1.1em;
	display: block;
}

.ce-share__msg {
	flex-basis: 100%;
	text-align: center;
	font-size: .8rem;
	color: var(--ce-muted);
}

.ce-share__msg:empty {
	display: none;
}

/* Two columns: image and share row stacked in the image column, text beside both */
@container ce-list (min-width: 641px) {
	.ce-list:not(.ce-list--grid) .ce-card--share {
		grid-template-rows: auto 1fr;
	}

	.ce-list:not(.ce-list--grid) .ce-card--share > .ce-card__media {
		grid-column: 1;
		grid-row: 1;
	}

	.ce-list:not(.ce-list--grid) .ce-card--share > .ce-share {
		grid-column: 1;
		grid-row: 2;
		align-self: start;
	}

	.ce-list:not(.ce-list--grid) .ce-card--share > .ce-card__body {
		grid-column: 2;
		grid-row: 1 / span 2;
	}

	.ce-list:not(.ce-list--grid) .ce-card--share.ce-card--img-right > .ce-card__media,
	.ce-list:not(.ce-list--grid) .ce-card--share.ce-card--img-right > .ce-share {
		grid-column: 2;
	}

	.ce-list:not(.ce-list--grid) .ce-card--share.ce-card--img-right > .ce-card__body {
		grid-column: 1;
	}
}

.ce-list--grid .ce-card--share {
	grid-template-rows: auto auto 1fr;
}

.ce-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 180px;
	aspect-ratio: var(--ce-ratio);
	color: var(--ce-accent);
	background: linear-gradient(135deg, color-mix(in srgb, var(--ce-accent) 22%, var(--ce-card-bg)), color-mix(in srgb, var(--ce-accent) 6%, var(--ce-card-bg)));
}

.ce-card__placeholder .ce-icon {
	width: 30%;
	height: auto;
	max-width: 72px;
	opacity: .7;
}

.ce-ratio-fill .ce-card__placeholder {
	position: absolute;
	inset: 0;
	width: auto;
	height: auto;
	aspect-ratio: auto;
	min-height: 0;
}

/* Date badge */
.ce-badge-date {
	position: absolute;
	top: 6%;
	left: 6%;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 3.4em;
	padding: .4em .55em .45em;
	border-radius: calc(var(--ce-radius) * .75);
	background: var(--ce-card-bg);
	color: var(--ce-text-safe);
	box-shadow: 0 4px 14px rgba(15, 23, 42, .18);
	line-height: 1;
	text-align: center;
}

.ce-card--img-right .ce-badge-date {
	left: auto;
	right: 6%;
}

.ce-badge-date__m {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ce-accent);
}

.ce-badge-date__d {
	font-family: var(--ce-heading-font);
	font-size: 1.6rem;
	font-weight: 700;
	margin-top: .12em;
}

/* Body */
.ce-card__body {
	display: flex;
	flex-direction: column;
	gap: .75em;
	min-width: 0;
	padding: var(--ce-pad) calc(var(--ce-pad) * 1.2);
}

.ce-card__title {
	font-family: var(--ce-heading-font);
	font-size: var(--ce-title-size);
	line-height: 1.25;
	margin: 0;
}

.ce-card__title a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(var(--ce-accent), var(--ce-accent));
	background-size: 0 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size .3s ease;
}

.ce-card__title a:hover,
.ce-card__title a:focus-visible {
	background-size: 100% 2px;
}

/* Chips */
.ce-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .4em;
}

.ce-chip {
	display: inline-block;
	padding: .3em .75em;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1.2;
}

.ce-chip--cancelled {
	background: #fde8e8;
	color: #b42318;
}

.ce-chip--postponed {
	background: #fef3c7;
	color: #92400e;
}

.ce-chip--sold-out {
	background: #e5e7eb;
	color: #374151;
}

.ce-chip--online {
	background: color-mix(in srgb, var(--ce-accent) 16%, var(--ce-card-bg));
	color: color-mix(in srgb, var(--ce-accent) 70%, #000);
}

.ce-status-cancelled .ce-card__title,
.ce-status-cancelled .ce-meta__row:first-child .ce-meta__text {
	text-decoration: line-through;
	text-decoration-thickness: 1px;
	opacity: .7;
}

/* Meta rows */
.ce-meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: .45em;
	font-size: .95rem;
}

.ce-meta__row {
	display: flex;
	align-items: flex-start;
	gap: .6em;
	margin: 0;
	padding: 0;
}

.ce-icon {
	flex: none;
	width: 1.1em;
	height: 1.1em;
	margin-top: .2em;
	color: var(--ce-accent);
}

.ce-meta__text {
	display: flex;
	flex-wrap: wrap;
	gap: .1em .9em;
	min-width: 0;
}

.ce-venue {
	display: block;
	width: 100%;
	font-weight: 600;
}

.ce-address,
.ce-time {
	color: var(--ce-muted);
}

.ce-meta a {
	color: var(--ce-accent);
}

.ce-desc {
	margin: 0;
	color: var(--ce-muted);
	line-height: 1.6;
}

.ce-single .ce-desc {
	color: inherit;
}

.ce-desc > :first-child {
	margin-top: 0;
}

.ce-desc > :last-child {
	margin-bottom: 0;
}

/* Embedded media from links in the description */
.ce-desc iframe,
.ce-desc video {
	max-width: 100%;
}

.ce-desc iframe[src*="youtube"],
.ce-desc iframe[src*="youtu.be"],
.ce-desc iframe[src*="vimeo"] {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Images and captions in the description */
.ce-desc img {
	max-width: 100%;
	height: auto;
}

.ce-desc .wp-caption {
	max-width: 100%;
}

.ce-desc .wp-caption img {
	display: block;
	margin-inline: auto;
}

/* A floated photo never leaves the text less than about 45% of the width */
.ce-desc .alignleft,
.ce-desc .alignright {
	max-width: 55%;
}

/* Up to 880px: a floated photo sits above the text, centred */
@media (max-width: 880px) {
	.ce-desc .alignleft,
	.ce-desc .alignright,
	.ce-desc img[style*="float"],
	.ce-desc figure[style*="float"] {
		float: none !important;
		clear: both;
		display: block;
		max-width: 100%;
		margin: 0 auto 1em !important;
	}

	.ce-desc figure.alignleft,
	.ce-desc figure.alignright,
	.ce-desc .wp-caption.alignleft,
	.ce-desc .wp-caption.alignright {
		width: fit-content !important;
	}
}

/* Phones: full usable width */
@media (max-width: 767px) {
	.ce-desc .alignleft,
	.ce-desc .alignright,
	.ce-desc img[style*="float"],
	.ce-desc figure[style*="float"],
	.ce-desc figure.alignleft,
	.ce-desc figure.alignright,
	.ce-desc .wp-caption.alignleft,
	.ce-desc .wp-caption.alignright,
	.ce-desc .wp-caption.alignleft img,
	.ce-desc .wp-caption.alignright img {
		width: 100% !important;
	}
}

.ce-more {
	color: var(--ce-accent);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ce-more::after {
	content: " \2192";
}

/* Buttons */
.ce-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .5em;
	margin-top: .25em;
}

.ce-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .65em 1.25em;
	border-radius: calc(var(--ce-radius) * .6);
	border: 2px solid var(--ce-accent);
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.ce-btn--filled {
	background: var(--ce-accent);
	color: var(--ce-accent-text);
}

.ce-btn--filled:hover,
.ce-btn--filled:focus-visible {
	background: color-mix(in srgb, var(--ce-accent) 82%, #000);
	border-color: color-mix(in srgb, var(--ce-accent) 82%, #000);
	color: var(--ce-accent-text);
}

.ce-btn--outline {
	background: var(--ce-card-bg);
	color: var(--ce-accent);
}

.ce-btn--outline:hover,
.ce-btn--outline:focus-visible {
	background: var(--ce-accent);
	color: var(--ce-accent-text);
}

.ce-btn--ghost {
	border-color: var(--ce-border);
	background: var(--ce-card-bg);
	color: inherit;
	font-weight: 500;
}

.ce-btn--ghost:hover,
.ce-btn--ghost:focus-visible {
	border-color: var(--ce-accent);
	color: color-mix(in srgb, var(--ce-accent) 75%, #000);
}

.ce-btn:focus-visible,
.ce-map summary:focus-visible,
.ce-card__title a:focus-visible {
	outline: 2px solid var(--ce-accent);
	outline-offset: 2px;
}

/* Map */
.ce-map summary {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	cursor: pointer;
	font-size: .9rem;
	font-weight: 600;
	color: var(--ce-accent);
	list-style: none;
}

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

.ce-map summary .ce-icon {
	margin-top: 0;
}

.ce-map[open] summary {
	margin-bottom: .6em;
}

.ce-map__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: calc(var(--ce-radius) * .75);
	overflow: hidden;
	border: 1px solid var(--ce-border);
}

.ce-map__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Past events: the image fades, the text keeps full contrast */
.ce-past-muted .ce-card,
.ce-past-grayscale .ce-card {
	box-shadow: none;
	border: 1px solid var(--ce-border);
}

.ce-past-muted .ce-card__media,
.ce-past-grayscale .ce-card__media {
	opacity: .82;
	transition: opacity .3s ease;
}

.ce-past-muted .ce-card:hover,
.ce-past-grayscale .ce-card:hover {
	transform: none;
}

.ce-past-muted .ce-card:hover .ce-card__media,
.ce-past-grayscale .ce-card:hover .ce-card__media {
	opacity: 1;
}

.ce-past-grayscale .ce-card__media img {
	filter: grayscale(1);
	transition: filter .3s ease;
}

.ce-past-grayscale .ce-card:hover .ce-card__media img {
	filter: none;
}

/* Pagination */
.ce-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .35em;
	margin-top: 3%;
}

.ce-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4em;
	padding: .45em .8em;
	border: 1px solid var(--ce-border);
	border-radius: calc(var(--ce-radius) * .6);
	color: inherit;
	text-decoration: none;
	line-height: 1.2;
}

.ce-pagination .page-numbers.current,
.ce-pagination a.page-numbers:hover {
	background: var(--ce-accent);
	border-color: var(--ce-accent);
	color: var(--ce-accent-text);
}

/* Single event page */
.ce-single {
	display: flex;
	flex-direction: column;
	gap: 1.1em;
	margin-bottom: 2em;
}

.ce-single__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ce-radius);
}

/* Event page image box (fixed shape) */
.ce-single__media.ce-frame {
	aspect-ratio: var(--ce-ratio, 4 / 3);
	overflow: hidden;
	border-radius: var(--ce-radius);
	background: var(--ce-card-bg, #f3f4f6);
	isolation: isolate;
}

.ce-single__media.ce-frame img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: 0;
	z-index: 1;
}

.ce-frame--fill img {
	object-fit: cover;
}

.ce-frame--whole img {
	object-fit: contain;
}

.ce-frame--whole::before {
	content: "";
	position: absolute;
	inset: -2rem;
	background: var(--ce-bg, none) center / cover no-repeat;
	filter: blur(1.5rem);
	opacity: 0.55;
	z-index: 0;
}

.ce-single__media.ce-frame .ce-badge-date {
	z-index: 2;
}

@media (max-width: 1024px) {
	.ce-frame--fill img[style] {
		object-position: var(--ce-pos-t) !important;
	}
}

@media (max-width: 767px) {
	.ce-frame--fill img[style] {
		object-position: var(--ce-pos-m) !important;
	}
}

.ce-single .ce-meta {
	padding: 4%;
	background: var(--ce-card-bg);
	border: 1px solid var(--ce-border);
	border-radius: var(--ce-radius);
	font-size: 1rem;
}

.ce-notice {
	margin: 0;
	padding: .8em 1em;
	border-left: 4px solid var(--ce-accent);
	background: color-mix(in srgb, var(--ce-accent) 10%, var(--ce-card-bg));
	border-radius: calc(var(--ce-radius) * .5);
}

/* Front-end form wrapper */
.ce-form-notice {
	padding: 4%;
	border: 1px solid var(--ce-border);
	border-radius: var(--ce-radius);
	background: var(--ce-card-bg);
	text-align: center;
}

.ce-form-notice p {
	margin: 0 0 .75em;
}

.ce-form-notice p:last-child {
	margin-bottom: 0;
}

.ce-form .rwmb-form-submit button,
.ce-form .rwmb-button {
	background: var(--ce-accent);
	border: 2px solid var(--ce-accent);
	color: var(--ce-accent-text);
	border-radius: calc(var(--ce-radius) * .6);
	padding: .65em 1.4em;
	font-weight: 600;
	cursor: pointer;
}

.ce-form .rwmb-form-submit button:hover,
.ce-form .rwmb-button:hover {
	background: color-mix(in srgb, var(--ce-accent) 82%, #000);
	border-color: color-mix(in srgb, var(--ce-accent) 82%, #000);
}

/* Stack on narrow containers (a narrow column or a phone) */
@container ce-list (max-width: 640px) {
	.ce-card,
	.ce-card--img-right {
		grid-template-columns: 1fr;
	}

	.ce-card--img-right .ce-card__media {
		order: 0;
	}

	.ce-card__body {
		padding: 5%;
	}

	.ce-ratio-fill .ce-card__media img,
	.ce-ratio-fill .ce-card__placeholder {
		position: static;
		aspect-ratio: 16 / 9;
	}

	.ce-ratio-fill .ce-card__media {
		min-height: 0;
	}

	.ce-ratio-portrait .ce-card__media img,
	.ce-ratio-portrait .ce-card__placeholder {
		aspect-ratio: 4 / 3;
		object-fit: contain;
	}

	.ce-card--img-right .ce-badge-date {
		right: auto;
		left: 5%;
	}
}

/* Elementor widget: let hover background and border changes ease in too */
.ce-events--widget .ce-card {
	transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease, opacity .25s ease;
}

/* Event Details widget */
.ce-single__media {
	position: relative;
}

.ce-single__title {
	font-size: calc(var(--ce-title-size) * 1.6);
	line-height: 1.2;
}

.ce-single .ce-chips:empty {
	display: none;
}

/* Cards without an image (Elementor widget option) */
.ce-card.ce-card--no-image {
	grid-template-columns: minmax(0, 1fr);
}

/* Custom icons chosen in the Elementor widget */
.ce-icon--custom {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1em;
	line-height: 1;
}

.ce-icon--custom svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.ce-icon--custom i {
	font-size: 1em;
}

/* Grid layout (Elementor widget): stacked cards in columns */
.ce-list--grid {
	display: grid;
	grid-template-columns: repeat(var(--ce-cols, 3), minmax(0, 1fr));
	column-gap: var(--ce-gap);
	row-gap: var(--ce-row-gap, var(--ce-gap));
	align-items: stretch;
}

.ce-list--grid .ce-card,
.ce-list--grid .ce-card--img-right {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: auto 1fr;
}

.ce-list--grid .ce-card.ce-card--no-image {
	grid-template-rows: 1fr;
}

.ce-list--grid .ce-card + .ce-card {
	margin-top: 0;
}

.ce-list--grid .ce-card--img-right .ce-card__media {
	order: 0;
}

.ce-list--grid .ce-card .ce-card__media {
	min-height: 0;
}

.ce-list--grid .ce-card .ce-card__media img,
.ce-list--grid .ce-card .ce-card__placeholder {
	position: static;
	width: 100%;
	height: auto;
	min-height: 0;
	aspect-ratio: var(--ce-ratio);
	object-fit: cover;
}

.ce-list--grid .ce-ratio-fill .ce-card__media img,
.ce-list--grid .ce-ratio-fill .ce-card__placeholder {
	aspect-ratio: 16 / 9;
}

.ce-list--grid .ce-card--img-right .ce-badge-date {
	left: 6%;
	right: auto;
}

.ce-list--grid .ce-actions {
	margin-top: auto;
}

@media (prefers-reduced-motion: reduce) {
	.ce-card,
	.ce-card__title a,
	.ce-btn,
	.ce-past-muted .ce-card__media,
	.ce-past-grayscale .ce-card__media,
	.ce-past-grayscale .ce-card__media img {
		transition: none;
	}

	.ce-card--elevated:hover {
		transform: none;
	}
}

.ce-events .screen-reader-text,
.ce-single .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Accent-colored text on light surfaces gets the same floor as text (after the base rules so it wins). */
@supports (color: color(from currentColor srgb-linear calc(r * min(1, .5 / g)) g b)) {
	.ce-chip--online {
		color: color(from color-mix(in srgb, var(--ce-accent) 70%, #000) srgb-linear calc(r * var(--ce-tk) + (1 - r * var(--ce-tk)) * var(--ce-tt)) calc(g * var(--ce-tk) + (1 - g * var(--ce-tk)) * var(--ce-tt)) calc(b * var(--ce-tk) + (1 - b * var(--ce-tk)) * var(--ce-tt)));
	}

	.ce-btn--outline {
		color: color(from var(--ce-accent) srgb-linear calc(r * var(--ce-tk) + (1 - r * var(--ce-tk)) * var(--ce-tt)) calc(g * var(--ce-tk) + (1 - g * var(--ce-tk)) * var(--ce-tt)) calc(b * var(--ce-tk) + (1 - b * var(--ce-tk)) * var(--ce-tt)));
	}
}
