/* Epiphany Calendar
 * Override the custom properties in the theme to match the site's palette.
 */
.epcal {
	--epcal-accent: #1d3f6e;
	--epcal-text: #1f2328;
	--epcal-muted: #5f6368;
	--epcal-faint: #9aa0a6;
	--epcal-border: #e3e3e3;
	--epcal-bg: #fff;
	--epcal-hover: #f7f7f8;
	--epcal-allday-bg: #d3d4d6;
	--epcal-allday-text: #4a4d52;
	--epcal-radius: 4px;

	container: epcal / inline-size;
	position: relative;
	margin: 0 0 2em;
	color: var(--epcal-text);
	font-size: 16px;
	line-height: 1.35;
}

.epcal *,
.epcal *::before,
.epcal *::after {
	box-sizing: border-box;
}

.epcal-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.epcal a:focus-visible,
.epcal button:focus-visible {
	outline: 2px solid var(--epcal-accent);
	outline-offset: 2px;
}

/* Toolbar: ‹ › [This Month] September 2026 ------------------------------ */

.epcal__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin-bottom: 28px;
}

.epcal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	color: var(--epcal-text);
	text-decoration: none !important;
}

.epcal__prev,
.epcal__next {
	width: 36px;
	border-radius: 50%;
}

.epcal__prev:hover,
.epcal__next:hover {
	background: var(--epcal-hover);
	color: var(--epcal-text);
}

.epcal__btn.is-disabled,
.epcal__btn.is-disabled:hover {
	background: none;
	color: var(--epcal-text);
	opacity: .25;
	cursor: default;
}

.epcal__chevron {
	width: 11px;
	height: 11px;
	border-top: 2px solid currentColor;
	border-left: 2px solid currentColor;
}

.epcal__prev .epcal__chevron {
	margin-left: 4px;
	transform: rotate(-45deg);
}

.epcal__next .epcal__chevron {
	margin-right: 4px;
	transform: rotate(135deg);
}

.epcal__today {
	margin: 0 8px 0 4px;
	padding: 0 18px;
	border: 1px solid #d5d5d5;
	border-radius: var(--epcal-radius);
	background: var(--epcal-bg);
	font-size: 14px;
	transition: border-color .15s;
}

.epcal__today:hover {
	border-color: var(--epcal-text);
	color: var(--epcal-text);
}

.epcal__today.is-current {
	color: var(--epcal-muted);
}

.epcal__title {
	margin: 0 !important;
	font-size: 2em;
	font-weight: 400;
	line-height: 1.2;
}

/* Search (top right) ---------------------------------------------------- */

.epcal {
	--epcal-search-w: min(340px, 36cqw);
}

.epcal.has-search .epcal__toolbar {
	min-height: 46px;
	padding-right: calc(var(--epcal-search-w) + 20px);
}

.epcal__search {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 20;
	width: var(--epcal-search-w);
}

.epcal .epcal__search-input {
	display: block;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 14px 0 42px;
	border: 1px solid #d5d5d5;
	border-radius: var(--epcal-radius);
	background: var(--epcal-bg);
	box-shadow: none;
	color: var(--epcal-text);
	font: inherit;
	font-size: 15px;
	-webkit-appearance: none;
	appearance: none;
}

.epcal .epcal__search-input::placeholder {
	color: var(--epcal-muted);
	opacity: 1;
}

.epcal .epcal__search-input:focus {
	border-color: var(--epcal-text);
	outline: 2px solid var(--epcal-accent);
	outline-offset: 1px;
}

.epcal__search-icon {
	position: absolute;
	top: 15px;
	left: 15px;
	width: 13px;
	height: 13px;
	border: 2px solid var(--epcal-muted);
	border-radius: 50%;
	pointer-events: none;
}

.epcal__search-icon::after {
	content: "";
	position: absolute;
	top: 10px;
	left: 10px;
	width: 2px;
	height: 6px;
	background: var(--epcal-muted);
	border-radius: 1px;
	transform: rotate(-45deg);
}

.epcal__search.is-searching .epcal__search-icon {
	border-color: var(--epcal-border);
	border-top-color: var(--epcal-accent);
	animation: epcal-spin .7s linear infinite;
}

.epcal__search.is-searching .epcal__search-icon::after {
	display: none;
}

.epcal__results {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	width: max(100%, 380px);
	max-width: calc(100cqw - 2px);
	max-height: 440px;
	overflow-y: auto;
	border: 1px solid var(--epcal-border);
	border-radius: 6px;
	background: var(--epcal-bg);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}

.epcal__results[hidden] {
	display: none;
}

.epcal__results-msg {
	margin: 0 !important;
	padding: 14px 16px;
	color: var(--epcal-muted);
	font-size: 14px;
}

.epcal__result {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 12px 16px;
	border-top: 1px solid var(--epcal-border);
	cursor: pointer;
}

.epcal__result:first-child {
	border-top: 0;
}

.epcal__result.is-active {
	background: var(--epcal-hover);
}

.epcal__result-badge {
	flex: none;
	width: 46px;
	padding: 4px 0 5px;
	border: 1px solid var(--epcal-border);
	border-radius: 4px;
	text-align: center;
	line-height: 1.1;
}

.epcal__result-mon {
	display: block;
	color: var(--epcal-accent);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.epcal__result-day {
	display: block;
	font-size: 20px;
	font-weight: 700;
}

.epcal__result-body {
	min-width: 0;
	overflow-wrap: anywhere;
}

.epcal__result-title {
	display: block;
	font-size: 15px;
	line-height: 1.35;
}

.epcal__result.is-active .epcal__result-title {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.epcal__result-when,
.epcal__result-more {
	display: block;
	margin-top: 2px;
	color: var(--epcal-muted);
	font-size: 13px;
	line-height: 1.35;
}

/* Subscribe (bottom right) ----------------------------------------------- */

.epcal__footer {
	display: flex;
	justify-content: flex-end;
	margin-top: 20px;
}

.epcal__subscribe {
	position: relative;
}

.epcal .epcal__subscribe-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 44px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid #d5d5d5;
	border-radius: var(--epcal-radius);
	background: var(--epcal-bg);
	box-shadow: none;
	color: var(--epcal-text);
	font: inherit;
	font-size: 15px;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: border-color .15s;
}

.epcal .epcal__subscribe-btn:hover,
.epcal .epcal__subscribe-btn[aria-expanded="true"] {
	border-color: var(--epcal-text);
	background: var(--epcal-bg);
	color: var(--epcal-text);
}

.epcal__subscribe-icon {
	position: relative;
	width: 16px;
	height: 15px;
	border: 2px solid currentColor;
	border-top-width: 4px;
	border-radius: 2px;
}

.epcal__caret {
	flex: none;
	margin-left: 2px;
	transition: transform .15s;
}

.epcal__subscribe-btn[aria-expanded="true"] .epcal__caret {
	transform: rotate(180deg);
}

.epcal__subscribe-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 20;
	min-width: 230px;
	padding: 6px 0;
	border: 1px solid var(--epcal-border);
	border-radius: 6px;
	background: var(--epcal-bg);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}

.epcal__subscribe-menu[hidden] {
	display: none;
}

.epcal .epcal__subscribe-item {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--epcal-text);
	font: inherit;
	font-size: 15px;
	line-height: 1.3;
	text-align: left;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.epcal .epcal__subscribe-item:hover,
.epcal .epcal__subscribe-item:focus-visible {
	background: var(--epcal-hover);
	color: var(--epcal-text);
}

/* Grid ------------------------------------------------------------------- */

.epcal__grid {
	transition: opacity .15s;
}

.epcal.is-loading .epcal__grid {
	opacity: .45;
	pointer-events: none;
}

.epcal.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid var(--epcal-border);
	border-top-color: var(--epcal-accent);
	border-radius: 50%;
	animation: epcal-spin .7s linear infinite;
}

@keyframes epcal-spin {
	to { transform: rotate(360deg); }
}

.epcal__weekdays,
.epcal__days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.epcal__weekday {
	padding: 0 0 14px;
	color: var(--epcal-muted);
	font-size: 14px;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.epcal__weekday-short {
	display: none;
}

.epcal__days {
	border-top: 1px solid var(--epcal-border);
	border-left: 1px solid var(--epcal-border);
	background: var(--epcal-bg);
}

.epcal__day {
	min-width: 0;
	min-height: 140px;
	padding: 14px 18px 18px;
	border-right: 1px solid var(--epcal-border);
	border-bottom: 1px solid var(--epcal-border);
}

.epcal__date {
	margin-bottom: 10px;
	line-height: 1;
}

.epcal__date-num {
	color: var(--epcal-text);
	font-size: 30px;
	font-style: italic;
	font-weight: 700;
	letter-spacing: -.01em;
}

.epcal__day.is-past .epcal__date-num,
.epcal__day.is-other-month .epcal__date-num {
	color: var(--epcal-muted);
}

.epcal__day.is-today .epcal__date-num {
	color: var(--epcal-accent);
}

.epcal__day.is-today .epcal__date {
	position: relative;
}

.epcal__day.is-today .epcal__date::after {
	content: "";
	display: block;
	width: 22px;
	height: 3px;
	margin-top: 6px;
	background: var(--epcal-accent);
}

.epcal__date-full {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.epcal .epcal__events {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

/* Themes often style list items with markers or ::before bullets. Strip them all. */
.epcal .epcal__events > li {
	display: block !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
	list-style: none !important;
	background: none !important;
}

.epcal .epcal__events > li:last-child {
	margin-bottom: 0 !important;
}

.epcal .epcal__events > li::marker {
	content: "" !important;
	font-size: 0 !important;
}

.epcal .epcal__events > li::before,
.epcal .epcal__events > li::after {
	content: none !important;
	display: none !important;
}

/* Time on its own line, full title below. Nothing is truncated. */
.epcal__event {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--epcal-text);
	font: inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	white-space: normal;
	overflow-wrap: anywhere;
	hyphens: auto;
	cursor: pointer;
}

.epcal__event:hover,
.epcal__event:focus-visible {
	background: none;
	color: var(--epcal-text);
}

.epcal__event-time {
	display: block;
	margin-bottom: 2px;
	color: var(--epcal-muted);
	font-size: 13px;
	line-height: 1.35;
	white-space: nowrap;
}

.epcal__event-t {
	white-space: nowrap;
}

.epcal__event-title {
	display: block;
	font-size: 15px;
	line-height: 1.4;
}

.epcal__event:hover .epcal__event-title,
.epcal__event:focus-visible .epcal__event-title {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* All-day: grey bar that runs edge to edge of the day cell. */
.epcal__event.is-all-day {
	margin: 0 -18px;
	width: calc(100% + 36px);
	padding: 3px 18px 4px;
	border-radius: 13px;
	background: var(--epcal-allday-bg);
	color: var(--epcal-allday-text);
}

.epcal__event.is-all-day .epcal__event-title {
	font-size: 14px;
	line-height: 1.35;
}

.epcal__event.is-all-day:hover,
.epcal__event.is-all-day:focus-visible {
	background: #c4c5c8;
	color: var(--epcal-allday-text);
}

.epcal__event.is-continued .epcal__event-title {
	color: var(--epcal-muted);
}

.epcal__empty {
	margin: 16px 0 0;
	color: var(--epcal-muted);
	text-align: center;
}

/* Medium widths: tighter cells, short weekday names ---------------------- */

@container epcal (max-width: 1000px) {
	.epcal__weekday-full {
		display: none;
	}

	.epcal__weekday-short {
		display: inline;
	}

	.epcal__day {
		padding: 12px 10px 14px;
	}

	.epcal__event.is-all-day {
		margin: 0 -10px;
		width: calc(100% + 20px);
		padding: 3px 10px 4px;
	}

	.epcal__date-num {
		font-size: 24px;
	}

	.epcal__event-time {
		font-size: 12px;
		white-space: normal;
	}

	.epcal__event-title {
		font-size: 14px;
	}
}

/* Narrow (small screens or a narrow content column): agenda list -------- */

@container epcal (max-width: 760px) {
	.epcal__title {
		font-size: 1.5em;
	}

	.epcal.has-search .epcal__toolbar {
		padding-right: 0;
	}

	.epcal__search {
		position: relative;
		width: 100%;
		margin-bottom: 18px;
	}

	.epcal__results {
		width: 100%;
	}

	.epcal__footer {
		justify-content: stretch;
	}

	.epcal__subscribe,
	.epcal .epcal__subscribe-btn {
		width: 100%;
		justify-content: center;
	}

	.epcal__subscribe-menu {
		left: 0;
	}

	.epcal__weekdays {
		display: none;
	}

	.epcal__days {
		display: block;
		border-left: 0;
	}

	.epcal__day {
		display: none;
		min-height: 0;
		padding: 16px 4px;
		border-right: 0;
	}

	.epcal__day.has-events:not(.is-other-month) {
		display: grid;
		grid-template-columns: 150px minmax(0, 1fr);
		gap: 16px;
	}

	.epcal__date-num,
	.epcal__day.is-today .epcal__date::after {
		display: none;
	}

	.epcal__date {
		margin: 0;
		line-height: 1.4;
	}

	.epcal__date-full {
		position: static !important;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
		white-space: normal;
		font-weight: 700;
	}

	.epcal__day.is-today .epcal__date-full {
		color: var(--epcal-accent);
	}

	.epcal__event.is-all-day {
		margin: 0;
		width: 100%;
		padding: 3px 12px 4px;
	}

	.epcal__event-time {
		font-size: 13px;
	}

	.epcal__event-title {
		font-size: 15px;
	}
}

@container epcal (max-width: 480px) {
	.epcal__result-badge {
		display: none;
	}

	.epcal__day.has-events:not(.is-other-month) {
		grid-template-columns: minmax(0, 1fr);
		gap: 8px;
	}
}

/* Modal ------------------------------------------------------------------ */

html.epcal-modal-open {
	overflow: hidden;
}

.epcal-modal {
	--epcal-accent: #1d3f6e;
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: #fff;
	color: #1f2328;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	overflow: auto;
}

.epcal-modal::backdrop {
	background: rgba(15, 23, 42, .55);
}

.epcal-modal[open] {
	animation: epcal-pop .18s ease-out;
}

@keyframes epcal-pop {
	from { opacity: 0; transform: translateY(8px) scale(.98); }
	to { opacity: 1; transform: none; }
}

/* Fallback for browsers without <dialog>. */
.epcal-modal:not([open]) {
	display: none;
}

.epcal-modal__inner {
	position: relative;
	padding: 28px 28px 24px;
}

.epcal-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #4b5563;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.epcal-modal__close:hover,
.epcal-modal__close:focus-visible {
	background: #f1f3f5;
	color: #111;
}

.epcal-modal__title {
	margin: 0 36px 14px 0 !important;
	font-size: 1.45em;
	line-height: 1.25;
}

.epcal-modal__meta {
	margin-bottom: 16px;
}

.epcal-modal__row {
	display: flex;
	gap: 10px;
	margin: 0 0 6px !important;
}

.epcal-modal__icon {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	background-color: var(--epcal-accent);
	-webkit-mask: var(--epcal-icon) center / contain no-repeat;
	mask: var(--epcal-icon) center / contain no-repeat;
}

.epcal-modal__row--date .epcal-modal__icon {
	--epcal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

.epcal-modal__row--time .epcal-modal__icon {
	--epcal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.epcal-modal__row--location .epcal-modal__icon {
	--epcal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s-7-6.2-7-11a7 7 0 0 1 14 0c0 4.8-7 11-7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

.epcal-modal__text {
	white-space: pre-line;
}

.epcal-modal__maplink,
.epcal-modal__desc a {
	color: var(--epcal-accent);
}

.epcal-modal__maplink {
	white-space: nowrap;
}

.epcal-modal__desc {
	padding-top: 14px;
	border-top: 1px solid #e5e7eb;
	overflow-wrap: anywhere;
}

.epcal-modal__desc p,
.epcal-modal__desc ul,
.epcal-modal__desc ol {
	margin: 0 0 .8em;
}

.epcal-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}

.epcal-modal__actions:empty {
	display: none;
}

.epcal-modal__action {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border: 1px solid var(--epcal-accent);
	border-radius: 6px;
	color: var(--epcal-accent);
	font-size: .9em;
	text-decoration: none !important;
}

.epcal-modal__action:hover,
.epcal-modal__action:focus-visible {
	background: var(--epcal-accent);
	color: #fff;
}

.epcal-modal__action.is-primary {
	background: var(--epcal-accent);
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	.epcal-modal[open],
	.epcal.is-loading::after {
		animation: none;
	}
}
