/* Eastern District Calendar
   Uses the theme's palette when it is there (theme.json presets), with the
   same values as fallbacks so the calendar still looks right on any theme. */

.edcal,
.edcal-strip,
.edcal-callout {
	--edcal-navy: var(--wp--preset--color--navy, #021631);
	--edcal-navy-mid: var(--wp--preset--color--navy-mid, #13325e);
	--edcal-gold: var(--wp--preset--color--gold, #c9a227);
	--edcal-gold-ink: #7a5f0c;
	--edcal-brick: var(--wp--preset--color--brick, #af1600);
	--edcal-ink: var(--wp--preset--color--ink, #101828);
	--edcal-muted: var(--wp--preset--color--muted, #5b6478);
	--edcal-line: var(--wp--preset--color--line, #e3e6ec);
	--edcal-surface: var(--wp--preset--color--surface, #fff);
	--edcal-canvas: var(--wp--preset--color--canvas, #f6f7f9);
	--edcal-radius: 14px;
	--edcal-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 22px rgba(16, 24, 40, .06);
	--edcal-max: 1180px;
	--edcal-gutter: clamp(16px, 3vw, 40px);
}

/* Author display rules (grid, flex) beat the browser's own [hidden] rule, so
   every hidden element in the calendar needs this to actually disappear. */
.edcal [hidden],
.edcal-strip [hidden],
.edcal-strip[hidden] { display: none !important; }

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

/* Type colours: gold for the DDGM, brick for the district, navy for the gavel.
   Tag text colours are darkened versions of each so they pass 4.5:1. */
.edcal-item--visit,
.edcal-strip__item--visit,
.edcal-filter--visit { --edcal-accent: var(--edcal-gold); --edcal-tag-bg: #f7efd6; --edcal-tag-ink: var(--edcal-gold-ink); }
.edcal-item--event,
.edcal-strip__item--event,
.edcal-filter--event { --edcal-accent: var(--edcal-brick); --edcal-tag-bg: #fbe9e6; --edcal-tag-ink: #9c1400; }
.edcal-item--gavel,
.edcal-strip__item--gavel,
.edcal-filter--gavel { --edcal-accent: var(--edcal-navy-mid); --edcal-tag-bg: #e6ecf5; --edcal-tag-ink: var(--edcal-navy-mid); }

/* ------------------------------------------------------------- icons
   Stroke icons as CSS masks: defined once here instead of an inline SVG in
   each of the ~34 entries, and they take the text colour of wherever they sit. */
.edcal-ico,
.edcal-fact::before,
.edcal-past::before,
.edcal-callout__icon::before,
summary.edcal-btn::after {
	-webkit-mask: var(--edcal-i) center / contain no-repeat;
	mask: var(--edcal-i) center / contain no-repeat;
	background-color: currentColor;
}
.edcal-ico { display: inline-block; flex: 0 0 auto; width: 1.1em; height: 1.1em; }

.edcal-ico--add  { --edcal-i: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2.5'/%3E%3Cpath d='M16 2.5v3M8 2.5v3M3 9.5h18M12 12.5v6M9 15.5h6'/%3E%3C/svg%3E"); }
.edcal-ico--sync { --edcal-i: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2.5'/%3E%3Cpath d='M16 2.5v3M8 2.5v3M3 9.5h18'/%3E%3Cpath d='M8.5 15.5l2.3 2.3 4.7-4.8'/%3E%3C/svg%3E"); }
.edcal-ico--doc  { --edcal-i: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E"); }
.edcal-ico--pin  { --edcal-i: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.7-6.5-11a6.5 6.5 0 0 1 13 0c0 5.3-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E"); }

/* ------------------------------------------------------------- buttons */
.edcal-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border: 2px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.edcal-btn:hover { text-decoration: none; }
.edcal-btn--gold { background: var(--edcal-gold); color: var(--edcal-navy); }
.edcal-btn--gold:hover { background: #d9b84a; color: var(--edcal-navy); }
.edcal-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .42); }
.edcal-btn--ghost:hover { background: #fff; border-color: #fff; color: var(--edcal-navy); }
.edcal-btn--line { background: var(--edcal-surface); color: var(--edcal-navy); border: 1px solid #cfd5df; }
.edcal-btn--line:hover { border-color: var(--edcal-navy); color: var(--edcal-navy); }
.edcal-btn--small { padding: 7px 12px; gap: 6px; font-size: .8125rem; }

summary.edcal-btn { list-style: none; }
summary.edcal-btn::-webkit-details-marker { display: none; }
summary.edcal-btn::after {
	content: "";
	width: .85em;
	height: .85em;
	margin-left: -1px;
	opacity: .75;
	transition: transform .15s ease;
	--edcal-i: 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.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.edcal-menu[open] > summary.edcal-btn::after { transform: rotate(180deg); }

/* --------------------------------------------------------------- menus */
.edcal-menu { position: relative; display: inline-block; }
.edcal-menu__panel {
	position: absolute;
	z-index: 40;
	top: calc(100% + 6px);
	right: 0;
	display: flex;
	flex-direction: column;
	min-width: 220px;
	max-width: calc(100vw - 32px);
	padding: 6px;
	background: var(--edcal-surface);
	border: 1px solid var(--edcal-line);
	border-radius: 12px;
	box-shadow: 0 18px 44px rgba(2, 22, 49, .22);
}
.edcal-menu--left .edcal-menu__panel { right: auto; left: 0; }
.edcal-menu__panel a {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--edcal-navy);
	font-size: .9375rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.edcal-menu__panel a:hover,
.edcal-menu__panel a:focus-visible { background: var(--edcal-canvas); text-decoration: none; }

/* ================================================================ hero */
.edcal-hero {
	color: #fff;
	background:
		radial-gradient(900px 420px at 88% -12%, rgba(201, 162, 39, .2), transparent 62%),
		radial-gradient(760px 420px at -8% 112%, rgba(19, 50, 94, .95), transparent 62%),
		var(--edcal-navy);
	padding: clamp(28px, 3.6vw, 52px) var(--edcal-gutter);
}
.edcal-hero__inner {
	max-width: var(--edcal-max);
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
	gap: clamp(26px, 4vw, 60px);
	align-items: center;
}
.edcal-eyebrow {
	margin: 0 0 10px;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--edcal-gold);
}
.edcal-hero__title {
	margin: 0;
	color: #fff;
	font-size: clamp(2.1rem, 4.6vw, 3.1rem);
	line-height: 1.04;
	letter-spacing: -.022em;
}
.edcal-hero__lede {
	margin: 14px 0 0;
	max-width: 52ch;
	font-size: 1.0625rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, .86);
}
.edcal-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.edcal-hero__hint { margin: 12px 0 0; font-size: .8125rem; color: rgba(255, 255, 255, .66); }

/* The next official visit, as a card on the navy band. */
.edcal-next__card {
	position: relative;
	padding: 22px 24px 18px;
	background: var(--edcal-surface);
	color: var(--edcal-ink);
	border-top: 4px solid var(--edcal-gold);
	border-radius: 18px;
	box-shadow: 0 26px 60px rgba(0, 0, 0, .34);
}
.edcal-next__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.edcal-next__eyebrow {
	margin: 0;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--edcal-gold-ink);
}
.edcal-when--pill {
	margin: 0;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--edcal-navy);
	color: #fff;
	font-size: .75rem;
	font-weight: 700;
	white-space: nowrap;
}
.edcal-next__date { margin: 14px 0 0; font-size: .9375rem; font-weight: 600; color: var(--edcal-muted); }
.edcal-next__lodge {
	margin: 3px 0 0;
	font-size: clamp(1.4rem, 2.5vw, 1.75rem);
	font-weight: 700;
	line-height: 1.14;
	letter-spacing: -.016em;
	color: var(--edcal-navy);
}
.edcal-next__lodge a { color: inherit; text-decoration: none; }
.edcal-next__lodge a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.edcal-next .edcal-facts { margin-top: 14px; font-size: .9375rem; }
.edcal-next__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.edcal-next__progress {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--edcal-line);
}
.edcal-progress { display: flex; flex: 1 1 auto; gap: 4px; }
.edcal-progress i { flex: 1 1 0; height: 6px; border-radius: 3px; background: var(--edcal-line); }
.edcal-progress i.is-done { background: var(--edcal-gold); }
.edcal-progress i.is-now { background: var(--edcal-navy); }
.edcal-progress__label { font-size: .75rem; font-weight: 700; color: var(--edcal-muted); white-space: nowrap; }
.edcal-next__card--done .edcal-next__lodge { font-size: 1.25rem; margin-top: 10px; }

/* =============================================================== facts */
.edcal-facts {
	display: grid;
	gap: 5px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: .9rem;
	line-height: 1.45;
	color: var(--edcal-ink);
}
.edcal-fact { display: flex; align-items: flex-start; gap: 8px; }
.edcal-fact::before {
	content: "";
	flex: 0 0 15px;
	width: 15px;
	height: 15px;
	margin-top: .18em;
	color: var(--edcal-muted);
}
.edcal-fact--time::before  { --edcal-i: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.2 2'/%3E%3C/svg%3E"); }
.edcal-fact--place::before { --edcal-i: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.7-6.5-11a6.5 6.5 0 0 1 13 0c0 5.3-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E"); }
.edcal-fact--note::before  { --edcal-i: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5M12 7.6v.1'/%3E%3C/svg%3E"); }
.edcal-fact a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: rgba(16, 24, 40, .28);
	text-underline-offset: 3px;
}
.edcal-fact a:hover { text-decoration-color: currentColor; }

/* ================================================================ body */
.edcal-body {
	max-width: var(--edcal-max);
	margin-inline: auto;
	padding: clamp(22px, 3vw, 40px) var(--edcal-gutter) clamp(32px, 3.6vw, 56px);
	box-sizing: content-box;
}

/* Filters need the script, so they only exist once it is known to run. */
.edcal-toolbar { display: none; margin-bottom: 16px; }
.edcal-js .edcal-toolbar { display: block; }
.edcal-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.edcal-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid #cfd5df;
	border-radius: 999px;
	background: var(--edcal-surface);
	color: var(--edcal-navy);
	font: inherit;
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.edcal-filter[data-edcal-filter]:not([data-edcal-filter="all"])::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--edcal-accent);
}
.edcal-filter:hover { border-color: var(--edcal-navy); }
.edcal-filter[aria-pressed="true"] { background: var(--edcal-navy); border-color: var(--edcal-navy); color: #fff; }
.edcal-filter__n {
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--edcal-canvas);
	color: var(--edcal-muted);
	font-size: .75rem;
	font-weight: 700;
}
.edcal-filter[aria-pressed="true"] .edcal-filter__n { background: rgba(255, 255, 255, .16); color: #fff; }

.edcal-past {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 0 0 18px;
	padding: 10px 14px;
	border: 1px dashed #c3cad6;
	border-radius: 12px;
	background: transparent;
	color: var(--edcal-muted);
	font: inherit;
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
}
.edcal-js .edcal-past { display: flex; }
.edcal-past::before {
	content: "";
	width: 15px;
	height: 15px;
	--edcal-i: 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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15l-6-6-6 6'/%3E%3C/svg%3E");
}
.edcal-past[aria-expanded="true"]::before { transform: rotate(180deg); }
.edcal-past:hover { border-color: var(--edcal-navy); color: var(--edcal-navy); }

/* First paint, before the script has run: past dates are already folded away,
   so nothing jumps when it takes over. */
.edcal-js .edcal:not(.edcal--ready) .edcal-item.is-past,
.edcal-js .edcal:not(.edcal--ready) .edcal-month.is-past { display: none; }

/* ============================================================== months */
.edcal-month + .edcal-month { margin-top: clamp(24px, 2.8vw, 34px); }
.edcal-month__title {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 1.25rem;
	line-height: 1.2;
	letter-spacing: -.01em;
	color: var(--edcal-navy);
}
.edcal-month__year { font-weight: 400; color: var(--edcal-muted); }
.edcal-month__title::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	margin-left: 6px;
	background: var(--edcal-line);
	align-self: center;
}
.edcal-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

/* ============================================================== entries */
.edcal-item {
	position: relative;
	display: grid;
	grid-template-columns: 60px minmax(0, 1fr) auto;
	gap: 4px 18px;
	align-items: start;
	margin: 0;
	padding: 14px 16px 14px 14px;
	background: var(--edcal-surface);
	border: 1px solid var(--edcal-line);
	border-radius: var(--edcal-radius);
	box-shadow: var(--edcal-shadow);
	scroll-margin-top: 130px;
}
.edcal-item::before {
	content: "";
	position: absolute;
	left: -1px;
	top: 14px;
	bottom: 14px;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: var(--edcal-accent);
}
.edcal-item__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 12px;
	background: var(--edcal-canvas);
	color: var(--edcal-navy);
}
.edcal-item__dow {
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--edcal-muted);
}
.edcal-item__day { font-size: 1.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.edcal-item__main { min-width: 0; }
.edcal-item__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.edcal-tag {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--edcal-tag-bg, var(--edcal-canvas));
	color: var(--edcal-tag-ink, var(--edcal-muted));
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.35;
	text-transform: uppercase;
	white-space: nowrap;
}
.edcal-when { font-size: .8125rem; font-weight: 600; color: var(--edcal-muted); }
.edcal-item__title {
	margin: 6px 0 0;
	font-size: 1.125rem;
	line-height: 1.28;
	letter-spacing: -.01em;
	color: var(--edcal-navy);
}
.edcal-item__title a { color: inherit; text-decoration: none; }
.edcal-item__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.edcal-item__title,
.edcal-next__lodge,
.edcal-card__title { text-wrap: balance; }

/* Each half of "From → To" wraps as a unit, so a phone shows two clean lines. */
.edcal-gv { display: inline-block; }
.edcal-arrow { margin: 0 8px; color: var(--edcal-gold); font-weight: 700; }
.edcal-item__actions { align-self: center; }

.edcal-item.is-past { background: transparent; box-shadow: none; }
.edcal-item.is-past .edcal-item__date,
.edcal-item.is-past .edcal-item__main { opacity: .58; }

/* What comes next gets the eye: a navy date tile and a gold ring. */
.edcal-item.is-next {
	border-color: rgba(201, 162, 39, .7);
	box-shadow: 0 0 0 3px rgba(201, 162, 39, .2), var(--edcal-shadow);
}
.edcal-item.is-next .edcal-item__date { background: var(--edcal-navy); }
.edcal-item.is-next .edcal-item__day { color: #fff; }
.edcal-item.is-next .edcal-item__dow { color: var(--edcal-gold); }
.edcal-item.is-next .edcal-when { color: var(--edcal-navy); }
.edcal-item:target { box-shadow: 0 0 0 3px var(--edcal-gold), var(--edcal-shadow); }

.edcal-empty { margin: 8px 0 0; padding: 18px; border-radius: 12px; background: var(--edcal-surface); border: 1px solid var(--edcal-line); color: var(--edcal-muted); }
.edcal-linkbtn { padding: 0; border: 0; background: none; color: var(--edcal-navy); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ======================================================= meeting nights */
.edcal-meets { margin-top: clamp(36px, 4.4vw, 60px); }
.edcal-section__title { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.2; letter-spacing: -.016em; color: var(--edcal-navy); }
.edcal-meets__lede { margin: 6px 0 0; max-width: 64ch; color: var(--edcal-muted); }
.edcal-meets__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.edcal-meets__week {
	padding: 16px 16px 8px;
	background: var(--edcal-surface);
	border: 1px solid var(--edcal-line);
	border-top: 3px solid var(--edcal-gold);
	border-radius: var(--edcal-radius);
}
.edcal-meets__weektitle {
	margin: 0 0 4px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--edcal-gold-ink);
}
.edcal-meets__list { margin: 0; padding: 0; list-style: none; }
.edcal-meet {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr);
	gap: 10px;
	padding: 10px 0;
	border-top: 1px solid var(--edcal-line);
}
.edcal-meet:first-child { border-top: 0; }
.edcal-meet__when { display: flex; flex-direction: column; gap: 1px; }
.edcal-meet__day { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--edcal-navy); }
.edcal-meet__time { font-size: .75rem; color: var(--edcal-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.edcal-meet__what { min-width: 0; line-height: 1.3; }
.edcal-meet__lodge { display: block; font-weight: 600; color: var(--edcal-navy); text-decoration: none; }
a.edcal-meet__lodge:hover { text-decoration: underline; text-underline-offset: 3px; }
.edcal-meet__town { display: block; margin-top: 2px; font-size: .8125rem; color: var(--edcal-muted); }

.edcal-foot {
	max-width: 82ch;
	margin-top: clamp(28px, 3vw, 40px);
	padding-top: 16px;
	border-top: 1px solid var(--edcal-line);
	font-size: .8125rem;
	line-height: 1.55;
	color: var(--edcal-muted);
}
.edcal-foot p { margin: 0 0 6px; }
.edcal-foot a { color: var(--edcal-navy); }

/* ====================================================== coming-up strip */
/* The strip sits between the theme's own bands, so it takes the theme's root
   padding as its gutter: its left edge then lines up with the sections above
   and below it at every width. */
.edcal-strip { --edcal-gutter: var(--wp--style--root--padding-left, 20px); }
.edcal-strip {
	padding: clamp(18px, 2.4vw, 30px) var(--edcal-gutter);
	background: var(--edcal-surface);
	border-bottom: 1px solid var(--edcal-line);
}
.edcal-strip__inner { max-width: var(--edcal-max); margin-inline: auto; }
.edcal-strip__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.edcal-strip__title { margin: 0; font-size: clamp(1.15rem, 2vw, 1.375rem); line-height: 1.2; letter-spacing: -.012em; color: var(--edcal-navy); }
.edcal-strip__all { flex: 0 0 auto; font-size: .9375rem; font-weight: 600; color: var(--edcal-navy); text-decoration: none; white-space: nowrap; }
.edcal-strip__all:hover { text-decoration: underline; text-underline-offset: 4px; }
.edcal-strip__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.edcal-strip__item { margin: 0; }
.edcal-card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	height: 100%;
	box-sizing: border-box;
	padding: 14px 16px 14px 14px;
	background: var(--edcal-canvas);
	border: 1px solid var(--edcal-line);
	border-radius: 12px;
	color: var(--edcal-ink);
	text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.edcal-card:hover {
	background: var(--edcal-surface);
	border-color: #c3cad6;
	box-shadow: var(--edcal-shadow);
	transform: translateY(-2px);
	text-decoration: none;
}
.edcal-card__date {
	display: flex;
	flex: 0 0 54px;
	flex-direction: column;
	align-items: center;
	padding: 7px 0 6px;
	border-radius: 10px;
	background: var(--edcal-navy);
	border-bottom: 3px solid var(--edcal-accent);
	color: #fff;
	line-height: 1.1;
}
.edcal-card__mon { font-size: .625rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--edcal-gold); }
.edcal-card__day { font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.edcal-card__dow { font-size: .625rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.edcal-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.edcal-card__title { font-weight: 700; line-height: 1.25; color: var(--edcal-navy); }
.edcal-card__meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .8125rem; color: var(--edcal-muted); }
.edcal-card__meta .edcal-when { font-size: inherit; color: var(--edcal-navy); }

/* ================================================== trestle board banner */
/* Higher specificity on purpose: this sits inside Elementor content, whose
   kit styles colour every link. */
a.edcal-callout[href] {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 0 0 26px;
	padding: 18px 20px;
	border-radius: 16px;
	border: 1px solid rgba(201, 162, 39, .55);
	background:
		radial-gradient(600px 200px at 100% 0, rgba(201, 162, 39, .18), transparent 60%),
		var(--edcal-navy);
	color: #fff;
	text-decoration: none;
	box-shadow: var(--edcal-shadow);
	transition: transform .15s ease, box-shadow .15s ease;
}
a.edcal-callout[href]:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(2, 22, 49, .28); color: #fff; }
.edcal-callout__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: rgba(201, 162, 39, .16);
	color: var(--edcal-gold);
}
.edcal-callout__icon::before {
	content: "";
	width: 24px;
	height: 24px;
	--edcal-i: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2.5'/%3E%3Cpath d='M16 2.5v3M8 2.5v3M3 9.5h18'/%3E%3Cpath d='M7.5 13.5h2M11 13.5h2M14.5 13.5h2M7.5 17h2M11 17h2'/%3E%3C/svg%3E");
}
.edcal-callout__text { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.edcal-callout__title { color: #fff; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.edcal-callout__sub { color: rgba(255, 255, 255, .8); font-size: .875rem; line-height: 1.45; }
.edcal-callout__cta {
	flex: 0 0 auto;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--edcal-gold);
	color: var(--edcal-navy);
	font-size: .875rem;
	font-weight: 700;
	white-space: nowrap;
}
a.edcal-callout[href]:hover .edcal-callout__cta { background: #d9b84a; }

/* ============================================================ responsive */
@media (max-width: 1000px) {
	.edcal-meets__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.edcal-hero__inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
	.edcal-hero { padding-top: 24px; padding-bottom: 26px; }
	.edcal-hero__lede { font-size: 1rem; }
	.edcal-hero__actions { margin-top: 18px; }
	.edcal-hero__actions .edcal-btn { flex: 1 1 auto; justify-content: center; }
	.edcal-hero__actions .edcal-menu { flex: 1 1 100%; }
	.edcal-hero__actions .edcal-menu > summary { width: 100%; box-sizing: border-box; }

	/* One row of filters that scrolls sideways beats three rows of pills. */
	.edcal-filters {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-inline: calc(var(--edcal-gutter) * -1);
		padding: 2px var(--edcal-gutter) 6px;
		scrollbar-width: none;
	}
	.edcal-filters::-webkit-scrollbar { display: none; }

	.edcal-item { grid-template-columns: 50px minmax(0, 1fr); gap: 4px 14px; padding: 12px 14px 14px 12px; }
	.edcal-item__date { width: 50px; height: 54px; border-radius: 10px; }
	.edcal-item__day { font-size: 1.375rem; }
	.edcal-item__title { font-size: 1.0625rem; }

	/* "Add to calendar" becomes an icon in the card's corner: a full-width row
	   of its own cost ~48px on every entry, over a screen and a half across
	   the season. The kicker line is made exactly as tall as the button and
	   kept clear of it, so the title below never runs underneath. */
	.edcal-item__kicker { min-height: 32px; padding-right: 44px; }
	.edcal-item__actions { position: absolute; top: 9px; right: 9px; }
	.edcal-item__actions summary.edcal-btn {
		justify-content: center;
		width: 38px;
		height: 36px;
		padding: 0;
		border-radius: 10px;
	}
	.edcal-item__actions summary.edcal-btn::after { display: none; }
	.edcal-item__actions .edcal-btn__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
	.edcal-item__actions .edcal-ico { width: 18px; height: 18px; }

	.edcal-next__card { padding: 18px 18px 16px; }

	a.edcal-callout[href] { flex-wrap: wrap; }
	.edcal-callout__cta { flex: 1 1 100%; text-align: center; }

	.edcal-strip__list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.edcal-card { padding: 11px 12px; }
}

@media (max-width: 560px) {
	.edcal-meets__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.edcal-card,
	a.edcal-callout[href] { transition: none; }
	.edcal-card:hover,
	a.edcal-callout[href]:hover { transform: none; }
}

/* ================================================================ print
   People print calendars. Keep the list, drop the chrome and the buttons. */
@media print {
	body:has(.edcal) .wp-site-blocks > header,
	body:has(.edcal) .wp-site-blocks > footer { display: none !important; }

	.edcal-hero { padding: 0 0 10px; background: none; color: #000; }
	.edcal-hero__inner { display: block; }
	.edcal-hero__title { color: #000; font-size: 22pt; }
	.edcal-eyebrow,
	.edcal-hero__lede { color: #333; }
	.edcal-hero__actions,
	.edcal-hero__hint,
	.edcal-next,
	.edcal-toolbar,
	.edcal-past,
	.edcal-item__actions,
	.edcal-when { display: none !important; }

	.edcal-body { padding: 0; }
	.edcal-item,
	.edcal-meets__week { box-shadow: none !important; break-inside: avoid; }
	.edcal-item.is-past .edcal-item__date,
	.edcal-item.is-past .edcal-item__main { opacity: 1; }
	.edcal-fact a { text-decoration: none; }
}
