/**
 * Front-end styles for the calendar and event lists.
 * Colors come from the --ch-* custom properties emitted by CH_Events_Palette,
 * with literal fallbacks so this file still reads correctly on its own.
 */

.ch-cal,
.ch-upcoming,
.ch-archive {
	--ch-c-brand: var( --ch-brand, #961c20 );
	--ch-c-tint: var( --ch-brand-tint, #f5e8e9 );
	--ch-c-ink: var( --ch-black, #000000 );
	--ch-c-ink60: var( --ch-ink-60, #444444 );
	--ch-c-rule: var( --ch-rule, #dddddd );
	--ch-f-head: var( --ch-font-heading, inherit );
	--ch-f-body: var( --ch-font-body, inherit );
	--ch-wt-head: var( --ch-w-heading, 500 );
	--ch-wt-body: var( --ch-w-body, 400 );
	font-family: var( --ch-f-body );
	font-weight: var( --ch-wt-body );
	font-size: 16px;
	color: var( --ch-c-ink );
}

/* ---------------------------------------------------------------- toolbar */

.ch-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding-bottom: 14px;
	margin-bottom: 18px;
	border-bottom: 2px solid var( --ch-c-ink );
}

.ch-views {
	display: inline-flex;
	border: 1px solid var( --ch-c-ink );
	border-radius: 100px;
	overflow: hidden;
}
.ch-viewbtn {
	appearance: none;
	background: #fff;
	border: 0;
	padding: 8px 18px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	cursor: pointer;
	color: var( --ch-c-ink );
	line-height: 1;
}
.ch-viewbtn + .ch-viewbtn {
	border-left: 1px solid var( --ch-c-rule );
}
.ch-viewbtn.is-active {
	background: var( --ch-c-ink );
	color: #fff;
}
.ch-viewbtn:hover:not( .is-active ) {
	background: var( --ch-c-tint );
}

.ch-nav {
	display: inline-flex;
	gap: 4px;
}
.ch-navbtn {
	appearance: none;
	background: #fff;
	border: 1px solid var( --ch-c-rule );
	border-radius: 3px;
	min-width: 32px;
	height: 32px;
	padding: 0 10px;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	color: var( --ch-c-ink );
}
.ch-navbtn:hover {
	border-color: var( --ch-c-brand );
	color: var( --ch-c-brand );
}
.ch-navbtn-today {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.ch-period {
	font-size: 18px;
	font-family: var( --ch-f-head );
	font-weight: var( --ch-wt-head );
}

.ch-filters {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
}
.ch-aud {
	padding: 6px 10px;
	border: 1px solid var( --ch-c-rule );
	border-radius: 3px;
	font-size: 13px;
	background: #fff;
	color: var( --ch-c-ink );
}
.ch-routine-toggle {
	font-size: 13px;
	color: var( --ch-c-ink60 );
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	white-space: nowrap;
}

.ch-cal-body.is-loading {
	opacity: .45;
	transition: opacity .15s ease;
}

/* ------------------------------------------------------------------ grids */

.ch-grid {
	display: grid;
	gap: 1px;
	background: var( --ch-c-rule );
	border: 1px solid var( --ch-c-rule );
}
.ch-grid-month,
.ch-grid-week {
	grid-template-columns: repeat( 7, 1fr );
}

.ch-grid-head {
	background: #fafafa;
	padding: 8px 6px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var( --ch-c-ink60 );
	text-align: center;
}

/*
 * A month cell keeps its height. Before this, one day with five events
 * stretched its whole row and the grid stopped reading as a calendar -- rows of
 * wildly different heights are a list with borders drawn on.
 *
 * The height is a variable so the week view can opt out below: seven columns
 * across the full width have the room, and the week view is where somebody goes
 * precisely to see everything on a busy day.
 */
.ch-cell {
	background: #fff;
	height: var( --ch-cell-h, 118px );
	padding: 6px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	overflow: hidden;
	position: relative;
}
/* Clicking the day number releases the height and shows the whole day. */
.ch-cell.is-expanded {
	height: auto;
	min-height: var( --ch-cell-h, 118px );
	overflow: visible;
	z-index: 2;
}
.ch-cell-events {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 3px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.ch-cell.is-expanded .ch-cell-events {
	overflow-y: visible;
}
/*
 * Scroll indicator: a fade at the foot of a cell that has more below. Applied
 * only where the JS measured a real overflow, or every cell would advertise
 * events it does not have. pointer-events:none so it never swallows a click
 * meant for the chip underneath.
 */
.ch-cell.has-more::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 22px;
	background: linear-gradient( rgba( 255, 255, 255, 0 ), #fff 72% );
	pointer-events: none;
}
.ch-cell.has-more.is-expanded::after {
	display: none;
}
.ch-cell-num.is-clickable {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
}
/* A quiet dot marks a day holding more than it can show. */
.ch-cell.has-more .ch-cell-num.is-clickable::after {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin-left: 5px;
	vertical-align: middle;
	border-radius: 50%;
	background: var( --ch-c-brand );
}
.ch-cell-num.is-clickable:focus-visible {
	outline: 2px solid var( --ch-c-brand );
	outline-offset: 2px;
}
.ch-cell.is-outside {
	background: #fbfbfb;
}
.ch-cell.is-outside .ch-cell-num {
	color: #b5b5b5;
}
.ch-cell.is-today {
	background: var( --ch-c-tint );
}
.ch-cell.is-today .ch-cell-num {
	background: var( --ch-c-brand );
	color: #fff;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ch-cell-num {
	font-size: 12px;
	font-weight: 700;
	color: var( --ch-c-ink60 );
	line-height: 22px;
}
.ch-cell-head {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var( --ch-c-ink60 );
	margin-bottom: 4px;
}
/*
 * The week view opts out of the fixed height entirely -- it has the room, and
 * capping it would remove the reason to switch to it from a crowded month.
 */
.ch-grid-week .ch-cell {
	height: auto;
	min-height: 150px;
	overflow: visible;
}
.ch-grid-week .ch-cell-events {
	overflow-y: visible;
}

/* ------------------------------------------------------------------ chips */

.ch-chip {
	display: block;
	padding: 4px 6px;
	border-left: 3px solid var( --ch-c-brand );
	background: #f7f7f7;
	font-size: 12px;
	line-height: 1.32;
	text-decoration: none;
	color: var( --ch-c-ink );
	border-radius: 2px;
}
a.ch-chip:hover {
	background: var( --ch-c-tint );
}
.ch-chip.is-routine {
	border-left-color: #bdbdbd;
	background: #fafafa;
	color: var( --ch-c-ink60 );
}
.ch-chip.is-cancelled .ch-chip-title {
	text-decoration: line-through;
	opacity: .6;
}
.ch-chip-time {
	display: block;
	font-size: 11px;
	font-weight: 700;
	color: var( --ch-c-brand );
}
.ch-chip.is-routine .ch-chip-time {
	color: #888;
}
.ch-chip-title {
	display: block;
}
.ch-chip-date {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var( --ch-c-ink60 );
}
.ch-chip-flag {
	display: inline-block;
	margin-top: 2px;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var( --ch-c-brand );
	background: var( --ch-c-tint );
	padding: 1px 5px;
	border-radius: 2px;
}

/* ------------------------------------------------------------- list view */

/*
 * The list view reuses the .ch-event-* classes from the shared list renderer,
 * so the server-rendered fallback and the JS view are visually identical --
 * the swap on boot must not move anything. Only the day heading and the
 * routine dimming are specific to this view.
 */

.ch-list-day {
	margin: 26px 0 10px;
	padding-bottom: 5px;
	border-bottom: 1px solid var( --ch-c-rule );
	font-size: var( --ch-fs-list-day, 12px );
	font-weight: 800;
	letter-spacing: var( --ch-ls-list-day, .08em );
	text-transform: uppercase;
	color: var( --ch-c-brand );
	font-family: var( --ch-f-head );
}
.ch-listview .ch-list-day:first-child {
	margin-top: 0;
}

.ch-listview .ch-event-item {
	padding-bottom: 16px;
	margin-bottom: 16px;
}
.ch-listview .ch-event-item:last-child {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: 4px;
}

/* Routine services sit quieter than real events in a list. */
.ch-listview .ch-event-item.is-routine .ch-event-title {
	font-size: 16px;
}
.ch-listview .ch-event-item.is-routine .ch-event-date {
	color: var( --ch-c-ink60 );
}

.ch-event-item.is-cancelled .ch-event-title {
	text-decoration: line-through;
	opacity: .6;
}

/* --------------------------------------------- upcoming / fallback list */

.ch-event-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ch-event-item {
	display: flex;
	gap: 16px;
	/* Thumbnail centres against the text block, not pinned to its top. */
	align-items: center;
	padding-bottom: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid var( --ch-c-rule );
}
.ch-event-item:last-child {
	border-bottom: 0;
	margin-bottom: 0;
}
.ch-event-thumb {
	flex: 0 0 160px;
	max-width: 160px;
}
.ch-event-thumb img {
	width: 100%;
	height: auto;
	display: block;
	/*
	 * Smaller than the banner's 20px deliberately. The same radius on a 160px
	 * card eats the corners rather than softening them.
	 */
	border-radius: var( --ch-thumb-radius, 12px );
}
.ch-event-body {
	flex: 1;
	min-width: 0;
}
.ch-event-date {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var( --ch-c-brand );
	margin-bottom: 3px;
}
.ch-event-title {
	margin: 0 0 4px;
	font-size: 18px;
	line-height: 1.3;
	font-family: var( --ch-f-head );
	font-weight: var( --ch-wt-head );
}
.ch-event-title a {
	color: var( --ch-c-ink );
	text-decoration: none;
}
.ch-event-title a:hover {
	color: var( --ch-c-brand );
}
/*
 * Unused since 2026-07-27 -- the location line was removed from both list
 * renderers. Kept so that restoring it is a one-line change in each renderer
 * rather than a styling job as well.
 */
.ch-event-loc {
	margin: 0 0 4px;
	font-size: 13px;
	color: var( --ch-c-ink60 );
}
.ch-event-excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var( --ch-c-ink60 );
}

.ch-empty-note {
	color: var( --ch-c-ink60 );
	font-style: italic;
}

/*
 * One or two buttons, always on one line. nowrap because the requirement is
 * side by side on a phone as well -- allowing a wrap would quietly stack them
 * at exactly the width where it matters most.
 */
.ch-upcoming-more {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: stretch;
	gap: 10px;
	margin-top: 22px;
	text-align: center;
}
/* inline-flex so a label wrapping to two lines still centres in the pill. */
.ch-upcoming-more .ch-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
@media ( max-width: 767px ) {
	/*
	 * Two pills at the desktop padding of 34px a side come to roughly 400px,
	 * which does not fit a 375px phone. Side by side is only possible if they
	 * give ground: equal widths, tighter padding, and a line-height that lets a
	 * long label take two lines rather than overflow.
	 *
	 * min-width:0 is the part that is easy to miss -- without it a flex item
	 * refuses to shrink below its content and they overflow anyway.
	 */
	.ch-upcoming-more.is-two .ch-btn {
		flex: 1 1 0;
		min-width: 0;
		padding: 11px 8px;
		font-size: 11px;
		letter-spacing: .03em;
		line-height: 1.2;
	}
}
.ch-btn {
	display: inline-block;
	background: #fff;
	color: var( --ch-c-ink );
	border: 2px solid var( --ch-c-ink );
	border-radius: 100px;
	padding: 13px 34px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
	transition: background .2s ease, color .2s ease;
}
.ch-btn:hover {
	background: var( --ch-c-ink );
	color: #fff;
}

/* ----------------------------------------------------------------- mobile */

@media ( max-width: 980px ) {
	.ch-filters {
		margin-left: 0;
		width: 100%;
	}
}

@media ( max-width: 767px ) {
	.ch-cell {
		/*
		 * The variable, not min-height -- .ch-cell now sets an explicit height,
		 * so a min-height here would be overridden and phone cells would keep
		 * their desktop size.
		 */
		--ch-cell-h: 86px;
		padding: 4px;
	}
	.ch-chip-title {
		font-size: 11px;
	}
	.ch-grid-week {
		grid-template-columns: 1fr;
	}
	.ch-grid-week .ch-cell {
		min-height: 0;
	}
	.ch-event-item {
		flex-direction: column;
		/* Centring is for the side-by-side layout only. Stacked, it would
		   centre the image horizontally and shrink it. */
		align-items: stretch;
	}
	.ch-event-thumb {
		flex: none;
		max-width: 100%;
		width: 100%;
	}
	.ch-period {
		font-size: 16px;
	}
}

/* ------------------------------------------------------- single event page */

.ch-single {
	--ch-f-head: var( --ch-font-heading, inherit );
	--ch-f-body: var( --ch-font-body, inherit );
	--ch-wt-head: var( --ch-w-heading, 500 );
	--ch-wt-body: var( --ch-w-body, 400 );
	--ch-c-brand: var( --ch-brand, #961c20 );
	--ch-c-tint: var( --ch-brand-tint, #f5e8e9 );
	--ch-c-ink: var( --ch-black, #000000 );
	--ch-c-ink60: var( --ch-ink-60, #444444 );
	--ch-c-rule: var( --ch-rule, #dddddd );
	color: var( --ch-c-ink );
}

/*
 * Banner width comes from Events Settings > Event page layout, via the
 * --ch-hero-* properties CH_Events_Palette emits. The fallbacks reproduce the
 * original fixed layout, so the stylesheet still works standalone.
 *
 * Centred with left/transform rather than auto margins, because the point of
 * the control is that the banner may end up WIDER than Divi's content area, and
 * auto margins collapse to zero the moment a block exceeds its parent. left:50%
 * puts the left edge at the parent's centre; translateX(-50%) pulls it back by
 * half its OWN rendered width, which centres it whether it is narrower or wider
 * and stays correct when max-width does the capping.
 *
 * THE HORIZONTAL MARGINS MUST STAY 0. Do not "tidy" this to margin: 0 auto.
 * Auto margins centre the box first, and then left/transform apply a second,
 * equal offset on top -- the two sum to exactly the free space, which lands the
 * banner flush against the right edge of the content area. That was the 0.12.0
 * bug. The offsets are the centring mechanism; auto margins are a competing one.
 *
 * No comma-bearing CSS function here: min() and clamp() would be tidier but must
 * never appear anywhere this could be pasted into a Divi field.
 */
.ch-single-hero {
	box-sizing: border-box;
	width: var( --ch-hero-w, 100% );
	max-width: var( --ch-hero-max, 1080px );
	margin: 0 0 28px;
	position: relative;
	left: 50%;
	transform: translateX( -50% );
}
/*
 * Rounded corners follow NewHomePageCustom.css: 20px on media, and SQUARE once
 * the image runs edge to edge -- a radius against the browser edge reads as a
 * rendering fault rather than a choice. The homepage does exactly this at its
 * mobile breakpoint.
 *
 * Which tiers are edge to edge is not something CSS can work out for itself; it
 * depends on the width settings. So CH_Events_Palette sets --ch-hero-radius to
 * 0 for any breakpoint where the banner fills the screen.
 */
.ch-single-hero img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var( --ch-hero-radius, 20px );
}

/*
 * The text column only ever narrows, so it needs no centring escape -- auto
 * margins are enough. border-box is explicit because this element has
 * horizontal padding and a percentage width; Divi does set it globally, but
 * relying on the theme for that would make the column 40px wider than asked.
 */
.ch-single-inner {
	box-sizing: border-box;
	width: var( --ch-text-w, 100% );
	max-width: var( --ch-text-max, 760px );
	margin: 0 auto;
	padding: 0 20px 60px;
}

.ch-single-date {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var( --ch-c-brand );
}
.ch-single-time {
	margin-left: 8px;
	color: var( --ch-c-ink60 );
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: none;
}

.ch-single-title {
	margin: 0 0 8px;
	font-size: 34px;
	line-height: 1.2;
	font-family: var( --ch-f-head );
	font-weight: var( --ch-wt-head );
}
/*
 * Unused since 2026-07-27 -- the location line under the title was removed from
 * the template. Kept so that putting it back is a one-line template change
 * rather than a styling job.
 */
.ch-single-loc {
	margin: 0 0 22px;
	font-size: 15px;
	color: var( --ch-c-ink60 );
}

.ch-single-body {
	font-size: 17px;
	line-height: 1.65;
	/*
	 * Body copy is normal weight, full stop. Divi's own content styling can
	 * inherit a heavier weight into this region; bold should come from the
	 * editor -- a <strong> the author actually chose -- and nowhere else.
	 */
	font-family: var( --ch-f-body );
	font-weight: var( --ch-wt-body );
}
.ch-single-body p,
.ch-single-body li,
.ch-single-body td {
	font-weight: var( --ch-wt-body );
}
.ch-single-body strong,
.ch-single-body b {
	font-weight: 700;
}
.ch-single-body h2,
.ch-single-body h3,
.ch-single-body h4 {
	font-family: var( --ch-f-head );
	font-weight: var( --ch-wt-head );
	line-height: 1.25;
}
.ch-single-body img {
	max-width: 100%;
	height: auto;
}
/* Produced by CH_Events_Divi when it converts an et_pb_image module. */
.ch-single-body .ch-figure {
	margin: 24px 0;
}
.ch-single-body .ch-figure img {
	display: block;
	border-radius: var( --ch-thumb-radius, 12px );
}
.ch-single-body .ch-inline-cta {
	margin: 24px 0;
}
.ch-single-body .ch-rule {
	margin: 28px 0;
	border: 0;
	border-top: 1px solid var( --ch-c-rule, #e3e3e3 );
}
.ch-single-body a {
	color: var( --ch-c-brand );
}

/*
 * Register, Add to Calendar and the QR share one row, centred so a single item
 * does not sit lonely against the left edge and three do not sprawl.
 * align-items:center keeps the buttons vertically centred against the taller
 * QR block instead of hanging from its top edge.
 */
.ch-single-cta {
	margin: 28px 0 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px 20px;
	text-align: center;
}
/*
 * Inside the row the QR is small -- a companion to the buttons, not the feature
 * it is standing alone via [ch_qr].
 */
.ch-single-cta .ch-qr {
	--ch-qr-size: 156px;
	display: flex;
	align-items: center;
}
/*
 * The caption is hidden in this context, and that is what makes the centring
 * work. With a line of text under the code, the block's midpoint falls between
 * code and caption -- so align-items:center lines the BLOCK up with the buttons
 * and leaves the code itself sitting visibly high. No caption, no offset. The
 * buttons either side say what it is.
 */
.ch-single-cta .ch-qr-note {
	display: none;
}
/*
 * Outline sibling to ch-btn-solid. .ch-btn already supplies the pill shape,
 * border and padding, so this only needs to say it is not filled in.
 */
.ch-btn-outline {
	background: #fff;
	border-color: var( --ch-c-brand );
	color: var( --ch-c-brand );
}
/* Pin icon sits on the text baseline rather than above it. */
.ch-btn-map {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}
.ch-pin {
	width: 15px;
	height: 15px;
	fill: currentColor;
	flex: none;
}
.ch-btn-outline:hover {
	background: var( --ch-c-brand );
	border-color: var( --ch-c-brand );
	color: #fff;
}
.ch-btn-solid {
	background: var( --ch-c-brand );
	border-color: var( --ch-c-brand );
	color: #fff;
}
.ch-btn-solid:hover {
	background: var( --ch-brand-dark, #7b171a );
	border-color: var( --ch-brand-dark, #7b171a );
	color: #fff;
}

.ch-single-dates {
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid var( --ch-c-rule );
}
.ch-single-dates h2 {
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var( --ch-c-ink60 );
	margin: 0 0 10px;
}
.ch-single-dates ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 200px, 1fr ) );
	gap: 6px 18px;
}
.ch-single-dates li {
	display: flex;
	gap: 10px;
	align-items: baseline;
	font-size: 14px;
	padding: 4px 0;
	border-bottom: 1px solid #f2f2f2;
}
.ch-single-dates li.is-cancelled .ch-d-date,
.ch-single-dates li.is-cancelled .ch-d-time {
	text-decoration: line-through;
	opacity: .55;
}
.ch-d-date {
	font-weight: 700;
	min-width: 84px;
}
.ch-d-time {
	color: var( --ch-c-ink60 );
}

.ch-single-aud {
	margin-top: 28px;
}
.ch-aud-chip {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 4px 11px;
	background: var( --ch-c-tint );
	color: var( --ch-c-brand );
	border-radius: 100px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

@media ( max-width: 767px ) {
	.ch-single-title {
		font-size: 26px;
	}
	.ch-single-inner {
		padding: 0 16px 40px;
	}
	.ch-single-hero {
		margin-bottom: 20px;
	}
}

.ch-single-footer {
	margin-top: 44px;
	padding-top: 32px;
	border-top: 1px solid var( --ch-c-rule, #e3e3e3 );
}
/* A grid in the footer slot needs no top margin of its own. */
.ch-single-footer .ch-egrid {
	margin-top: 0;
}

/* ---------------------------------------------------------- event grid */

/*
 * [ch_events_grid]. The column count and the overflow cut-off are generated
 * per instance by CH_Events_Shortcodes::grid_css(), because they come from
 * shortcode attributes -- everything that does NOT vary lives here.
 */
.ch-egrid {
	display: grid;
	gap: 18px;
	margin: 28px 0;
}
.ch-egrid-item {
	display: block;
	min-width: 0;
	/*
	 * Containing block for the optional .ch-egrid-date badge below --
	 * needed here rather than on the <a>, since a tile with no url (see
	 * grid()'s own $url check) skips the anchor entirely and puts the
	 * badge directly inside this div instead. Absolute positioning finds
	 * the nearest positioned ancestor at any depth, so this one rule
	 * covers both cases.
	 */
	position: relative;
}
.ch-egrid-item a {
	display: block;
	text-decoration: none;
}
/*
 * A fixed 16:9 box with object-fit, so a graphic that is not exactly 16:9 is
 * cropped rather than making its row taller than the others -- one odd image
 * would otherwise break the grid's alignment.
 */
.ch-egrid-item img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var( --ch-thumb-radius, 12px );
	transition: opacity .15s ease;
}
.ch-egrid-item a:hover img {
	opacity: .88;
}
/*
 * Date badge overlay (show_date="1" / Events Settings > Show date on event
 * grid). Bottom-right corner, same corner and same two-line month/day
 * layout as the mobile app's own event-list badge, so the graphic reads
 * consistently whether someone sees it on the website or in the app.
 *
 * Fixed dark chip regardless of the site's own palette (--ch-c-brand etc.)
 * rather than a themed one: the badge sits on top of an arbitrary staff-
 * uploaded promotional graphic, which could be any color -- a brand-red
 * chip would disappear against a red graphic, where black-with-opacity
 * plus white text reads on top of anything.
 */
.ch-egrid-date {
	position: absolute;
	right: 8px;
	bottom: 8px;
	min-width: 34px;
	padding: 3px 6px;
	border-radius: 6px;
	background: rgba( 0, 0, 0, .72 );
	text-align: center;
	line-height: 1.1;
	pointer-events: none; /* the tile's own <a> should get the click, not this chip */
}
.ch-egrid-date-mon {
	display: block;
	font-size: 9px;
	font-weight: 600;
	letter-spacing: .04em;
	color: #fff;
	opacity: .85;
}
.ch-egrid-date-day {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
}
@media ( max-width: 767px ) {
	.ch-egrid {
		gap: 14px;
	}
}

/* ------------------------------------------------------------- QR code */

.ch-qr {
	margin: 0;
}
/*
 * The SVG carries no width or height, so this is the only place the displayed
 * size is decided. The default is comfortably above the ~100px a phone camera
 * needs at arm's length, and the four-module quiet zone is inside the viewBox,
 * so no extra padding is required to keep it scannable.
 */
.ch-qr-code {
	width: var( --ch-qr-size, 160px );
	max-width: 45vw;
}

/* [ch_qr] used on its own, anywhere on the site. */
.ch-qr-block {
	display: block;
	margin: 24px 0;
}
.ch-qr-block.is-center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}
.ch-qr-block.is-center .ch-qr-code {
	margin-left: auto;
	margin-right: auto;
}
.ch-qr-block.is-right {
	margin-left: auto;
	text-align: right;
}
.ch-qr-block.is-right .ch-qr-code {
	margin-left: auto;
}
.ch-qr-code svg {
	display: block;
	width: 100%;
	height: auto;
}
.ch-qr-note {
	margin: 8px 0 0;
	font-size: 12px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var( --ch-c-ink60, #666 );
}

/* ------------------------------------------------------ subscribe block */

.ch-subscribe {
	margin: 36px 0 8px;
	padding: 22px 24px;
	border: 1px solid var( --ch-c-rule, #e3e3e3 );
	border-radius: var( --ch-thumb-radius, 12px );
	text-align: center;
}
.ch-subscribe-lead {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
}
/* Buttons wrap rather than overflow on a phone. */
.ch-subscribe-btns {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0;
}
.ch-subscribe-alt {
	margin: 16px 0 0;
	font-size: 13px;
	color: var( --ch-c-ink60, #666 );
}
/*
 * The address has to be selectable and must not push the layout sideways on a
 * phone. break-all rather than a horizontal scroll: a URL broken across two
 * lines is still copyable, a URL that widens the page is not.
 */
.ch-subscribe-url {
	display: inline-block;
	margin-top: 4px;
	padding: 3px 7px;
	background: #f4f4f4;
	border-radius: 4px;
	font-size: 12px;
	word-break: break-all;
	user-select: all;
}

/* --------------------------------------------------------- events archive */

.ch-archive-inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 40px 20px 60px;
}
.ch-archive-head {
	margin-bottom: 26px;
}
.ch-archive-title {
	margin: 0;
	font-size: 34px;
	line-height: 1.2;
	font-family: var( --ch-f-head );
	font-weight: var( --ch-wt-head );
}
.ch-archive-desc {
	margin: 8px 0 0;
	font-size: 16px;
	color: var( --ch-ink-60, #444444 );
}

@media ( max-width: 767px ) {
	.ch-archive-title {
		font-size: 26px;
	}
	.ch-archive-inner {
		padding: 24px 16px 40px;
	}
}


/* ------------------------------------------------------ audience picker */

.ch-audpick {
	position: relative;
	font-size: 13px;
}
.ch-audpick-sum {
	list-style: none;
	cursor: pointer;
	padding: 6px 28px 6px 11px;
	border: 1px solid var( --ch-c-rule );
	border-radius: 3px;
	background: #fff;
	white-space: nowrap;
	position: relative;
	user-select: none;
}
.ch-audpick-sum::-webkit-details-marker {
	display: none;
}
.ch-audpick-sum::after {
	content: '';
	position: absolute;
	right: 11px;
	top: 50%;
	width: 6px;
	height: 6px;
	margin-top: -4px;
	border-right: 1.5px solid var( --ch-c-ink60 );
	border-bottom: 1.5px solid var( --ch-c-ink60 );
	transform: rotate( 45deg );
	transition: transform .15s ease;
}
.ch-audpick[open] .ch-audpick-sum::after {
	transform: rotate( -135deg );
	margin-top: -1px;
}
.ch-audpick-sum:hover {
	border-color: var( --ch-c-brand );
}
.ch-audpick-label {
	font-weight: 600;
}

.ch-audpick-panel {
	position: absolute;
	z-index: 30;
	top: calc( 100% + 4px );
	left: 0;
	min-width: 210px;
	background: #fff;
	border: 1px solid var( --ch-c-rule );
	border-radius: 3px;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, .1 );
	padding: 6px;
}
.ch-audpick-panel label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border-radius: 2px;
	cursor: pointer;
	white-space: nowrap;
}
.ch-audpick-panel label:hover {
	background: var( --ch-c-tint );
}
.ch-audpick-all {
	font-weight: 700;
	border-bottom: 1px solid var( --ch-c-rule );
	margin-bottom: 4px;
	padding-bottom: 8px !important;
}

@media ( max-width: 767px ) {
	.ch-audpick-panel {
		left: auto;
		right: 0;
	}
}


/*
 * Micro-labels keep their own heavier weights on purpose.
 *
 * The uppercase chrome -- view buttons, day names, date labels -- is set small
 * and letter-spaced, and at 500 it reads as washed out rather than quiet. These
 * are interface furniture, not content, so they take the heading FAMILY but
 * their own weight.
 */
.ch-viewbtn,
.ch-grid-head,
.ch-cell-head,
.ch-list-day,
.ch-event-date,
.ch-chip-flag,
.ch-aud-chip,
.ch-single-date,
.ch-btn,
.ch-single-dates h2 {
	font-family: var( --ch-f-head );
}

/* ---------------------------------------------------------------------------
   Editor draft view (v0.28.0)

   Only ever rendered for a user with edit_ch_events, and only in List view.
   Deliberately unlike the public list: an editor should be able to tell at a
   glance that they are looking at unpublished work, without reading a label.
   --------------------------------------------------------------------------- */

.ch-statuspill {
	display: inline-flex;
	border: 1px solid var( --ch-line, #d8d8d8 );
	border-radius: 999px;
	overflow: hidden;
	margin-left: auto;
}

.ch-statusbtn {
	background: none;
	border: 0;
	padding: 0.35em 0.9em;
	font: inherit;
	font-size: 0.85em;
	line-height: 1.6;
	cursor: pointer;
	color: inherit;
	white-space: nowrap;
}

.ch-statusbtn + .ch-statusbtn {
	border-left: 1px solid var( --ch-line, #d8d8d8 );
}

.ch-statusbtn.is-active {
	background: var( --ch-accent, #1a4a7a );
	color: #fff;
}

.ch-bucket-head {
	display: flex;
	align-items: baseline;
	gap: 0.5em;
	margin: 1.6em 0 0.5em;
	padding-bottom: 0.3em;
	border-bottom: 1px solid var( --ch-line, #e4e4e4 );
	font-size: 1em;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.75;
}

.ch-bucket-count {
	font-weight: 400;
	opacity: 0.6;
}

/* A dashed edge is the whole signal: it reads as provisional at a glance and
   survives a greyscale print, which a colour alone would not. */
.ch-draft-item {
	position: relative;
	border: 1px dashed var( --ch-line, #c9c9c9 );
	border-radius: 4px;
	padding: 0.7em 3em 0.7em 0.9em;
	margin-bottom: 0.5em;
	background: transparent;
}

.ch-draft-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	margin-bottom: 0.25em;
	font-size: 0.82em;
}

.ch-status-chip {
	border: 1px solid currentColor;
	border-radius: 3px;
	padding: 0.05em 0.45em;
	font-size: 0.92em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.8;
}

/* Private is the one status whose chip carries a warning rather than a name --
   the event is bucketed Upcoming and is simultaneously not on the calendar. */
.ch-status-chip.is-private {
	text-transform: none;
	letter-spacing: 0;
	opacity: 1;
}

.ch-draft-note {
	opacity: 0.65;
	font-style: italic;
}

.ch-draft-item .ch-event-title {
	margin: 0;
	font-size: 1.02em;
	line-height: 1.35;
}

.ch-edit-link {
	position: absolute;
	top: 0.55em;
	right: 0.6em;
	width: 2em;
	height: 2em;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	text-decoration: none;
	font-size: 1.05em;
	opacity: 0.5;
}

.ch-edit-link:hover,
.ch-edit-link:focus {
	opacity: 1;
	background: var( --ch-tint, #f0f0f0 );
}

@media ( max-width: 767px ) {
	.ch-statuspill {
		margin-left: 0;
		width: 100%;
	}

	.ch-statusbtn {
		flex: 1 1 0;
		text-align: center;
	}
}

/* Row actions (v0.30.0) ---------------------------------------------------- */

.ch-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em;
	margin-top: 0.55em;
}

.ch-rowbtn {
	background: none;
	border: 1px solid var( --ch-line, #d0d0d0 );
	border-radius: 3px;
	padding: 0.2em 0.7em;
	font: inherit;
	font-size: 0.8em;
	line-height: 1.7;
	cursor: pointer;
	color: inherit;
}

.ch-rowbtn:hover,
.ch-rowbtn:focus {
	border-color: currentColor;
}

.ch-rowbtn.is-primary {
	border-color: var( --ch-accent, #1a4a7a );
	color: var( --ch-accent, #1a4a7a );
	font-weight: 600;
}

.ch-rowbtn.is-quiet {
	opacity: 0.65;
}

@media ( max-width: 767px ) {
	/* Full-width targets rather than a row of small ones. These change
	   published state, so a mis-tap is not a free mistake. */
	.ch-row-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.ch-rowbtn {
		padding: 0.5em 0.7em;
		font-size: 0.9em;
	}
}

/* New event (v0.31.0) ------------------------------------------------------ */

.ch-create {
	margin-left: 0.5em;
}

.ch-createbtn {
	background: var( --ch-accent, #1a4a7a );
	border: 1px solid var( --ch-accent, #1a4a7a );
	color: #fff;
	border-radius: 999px;
	padding: 0.35em 1em;
	font: inherit;
	font-size: 0.85em;
	line-height: 1.6;
	cursor: pointer;
	white-space: nowrap;
}

.ch-create.is-open .ch-createbtn {
	background: none;
	color: inherit;
	border-color: var( --ch-line, #d8d8d8 );
}

.ch-create-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	margin-top: 0.6em;
	padding: 0.8em;
	border: 1px solid var( --ch-line, #d8d8d8 );
	border-radius: 4px;
}

.ch-create-form input {
	font: inherit;
	font-size: 0.9em;
	padding: 0.35em 0.5em;
	border: 1px solid var( --ch-line, #d0d0d0 );
	border-radius: 3px;
}

.ch-create-title {
	flex: 1 1 14em;
	min-width: 10em;
}

.ch-create-note {
	flex: 1 1 100%;
	margin: 0.2em 0 0;
	font-size: 0.78em;
	opacity: 0.7;
}

/* A published row gains a pencil, so it needs the same right-hand gutter the
   draft rows already reserve. */
.ch-event-item.ch-has-actions {
	position: relative;
	padding-right: 3em;
}

@media ( max-width: 767px ) {
	.ch-create {
		margin-left: 0;
		width: 100%;
	}

	.ch-createbtn {
		width: 100%;
	}

	.ch-create-form {
		flex-direction: column;
		align-items: stretch;
	}
}

/* Move picker (v0.31.2) ---------------------------------------------------- */

.ch-move-panel {
	flex: 1 1 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em;
	margin-top: 0.45em;
	padding: 0.6em;
	border: 1px solid var( --ch-line, #d8d8d8 );
	border-radius: 4px;
}

.ch-move-panel input {
	font: inherit;
	font-size: 0.85em;
	padding: 0.3em 0.45em;
	border: 1px solid var( --ch-line, #d0d0d0 );
	border-radius: 3px;
}

.ch-rowbtn.is-active {
	border-color: currentColor;
	font-weight: 600;
}

@media ( max-width: 767px ) {
	.ch-move-panel {
		flex-direction: column;
		align-items: stretch;
	}
}

/* Customise: this date vs the series (v0.35.0) ----------------------------- */

.ch-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.5 );
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1em;
	z-index: 100000;
}

.ch-modal {
	background: #fff;
	color: #222;
	border-radius: 6px;
	padding: 1.4em;
	max-width: 26em;
	width: 100%;
	box-shadow: 0 8px 30px rgba( 0, 0, 0, 0.25 );
}

.ch-modal-title {
	margin: 0 0 0.4em;
	font-size: 1.1em;
}

.ch-modal-body {
	margin: 0 0 1em;
	font-size: 0.92em;
	opacity: 0.85;
}

.ch-modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.ch-modal-actions .ch-rowbtn {
	flex: 1 1 auto;
	text-align: center;
	padding: 0.5em 0.9em;
}

@media ( max-width: 767px ) {
	.ch-modal-actions {
		flex-direction: column;
		align-items: stretch;
	}
}

/* View as visitor (v0.32.0) ------------------------------------------------ */

.ch-aspublic {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em;
	margin-bottom: 0.9em;
	padding: 0.6em 0.9em;
	border-left: 4px solid var( --ch-accent, #1a4a7a );
	background: var( --ch-tint, #f4f4f4 );
	font-size: 0.88em;
}

.ch-aspublic-text {
	flex: 1 1 16em;
}

.ch-peekbtn {
	background: none;
	border: 1px solid var( --ch-line, #d8d8d8 );
	border-radius: 999px;
	padding: 0.35em 0.9em;
	margin-left: 0.5em;
	font: inherit;
	font-size: 0.85em;
	line-height: 1.6;
	cursor: pointer;
	color: inherit;
	white-space: nowrap;
}

.ch-peekbtn:hover,
.ch-peekbtn:focus {
	border-color: currentColor;
}

/* A cancelled date is only ever sent to an editor, so this styling is not a
   public-facing state. Struck through rather than merely tinted, so it survives
   a greyscale screen and reads as "off" without needing the chip to be read. */
.ch-event-item.is-cancelled .ch-event-title,
.ch-chip.is-cancelled {
	text-decoration: line-through;
	opacity: 0.6;
}

.ch-chip-flag {
	display: inline-block;
	margin-left: 0.4em;
	padding: 0.05em 0.4em;
	border: 1px solid currentColor;
	border-radius: 3px;
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

@media ( max-width: 767px ) {
	.ch-peekbtn {
		margin-left: 0;
		width: 100%;
	}
}

/* Draft-row thumbnails (v0.33.0) ------------------------------------------- */

.ch-draft-item {
	display: flex;
	gap: 0.9em;
	align-items: flex-start;
}

.ch-draft-thumb {
	flex: 0 0 8.5em;
	max-width: 8.5em;
}

.ch-draft-thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 3px;
}

.ch-draft-item .ch-event-body {
	flex: 1 1 auto;
	min-width: 0;
}

/* A cancelled date reads as off without the chip having to be read. */
.ch-draft-item.is-cancelled .ch-event-title {
	text-decoration: line-through;
	opacity: 0.65;
}

.ch-draft-item.is-cancelled .ch-draft-thumb img {
	opacity: 0.5;
}

@media ( max-width: 767px ) {
	.ch-draft-thumb {
		flex-basis: 5.5em;
		max-width: 5.5em;
	}
}
