/* Awkward Cake — styles that theme.json can't express. */

:root {
	--ac-orange: var(--wp--preset--color--orange, #E36D21);
	--ac-orange-text: var(--wp--preset--color--orange-text, #B5520F);
	--ac-charcoal: var(--wp--preset--color--charcoal, #2F2F2F);
	--ac-muted: var(--wp--preset--color--muted, #6A6A6A);
	--ac-line: var(--wp--preset--color--line, #E2DDD6);
	--ac-sand: var(--wp--preset--color--sand, #F7F4F0);
	--ac-sans: var(--wp--preset--font-family--outfit, Outfit, system-ui, sans-serif);
}

/* Small uppercase label above titles. */
.ac-kicker {
	margin: 0;
	font-family: var(--ac-sans);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--ac-orange-text);
}
.ac-kicker a { color: inherit; text-decoration: none; }
.ac-kicker a:hover { text-decoration: underline; }

/* The orange underline from the logo. */
.ac-bar {
	display: block;
	width: 88px;
	height: 6px;
	background: var(--ac-orange);
	border: 0;
	margin: 0;
}
.wp-block-separator.ac-bar {
	opacity: 1;
	width: 88px;
	max-width: 88px;
	height: 6px;
	border: 0 !important;
	background: var(--ac-orange) !important;
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* Header */
.ac-header { border-bottom: 1px solid #ECE8E3; }
.ac-header .wp-block-image img { height: 56px; width: auto; display: block; }
.ac-header .wp-block-navigation a { text-decoration: none; }
.ac-header .wp-block-navigation .current-menu-item > a,
.ac-header .wp-block-navigation a[aria-current="page"] { color: var(--ac-orange-text); }
.ac-header .wp-block-search__button {
	background: transparent;
	color: var(--ac-charcoal);
	padding: 0;
	width: 44px;
	height: 44px;
	border-radius: 0;
}
.ac-header .wp-block-search__button:hover { background: transparent; color: var(--ac-orange-text); }
@media (max-width: 600px) {
	.ac-header .wp-block-image img { height: 44px; }
}

/* All posts list */
.ac-row {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 28px;
	padding: 28px 0;
	border-top: 1px solid var(--ac-line);
}
.ac-list .wp-block-post:last-child .ac-row { border-bottom: 1px solid var(--ac-line); }
.ac-row > *, .ac-row__body > * { margin: 0 !important; }
.ac-row .wp-block-post-date { margin: 0.35rem 0 0 !important; }
.ac-row__body {
	display: grid;
	grid-template-columns: 1fr 120px;
	gap: 24px;
	align-items: start;
}
.ac-row__body:not(:has(.wp-block-post-featured-image)) { grid-template-columns: 1fr; }
.ac-row__text { display: flex; flex-direction: column; gap: 8px; }
.ac-row__text > * { margin: 0 !important; }
.ac-row .wp-block-post-title { font-size: 1.625rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.ac-row .wp-block-post-title a { text-decoration: none; }
.ac-row .wp-block-post-excerpt__excerpt { margin: 0; }
.ac-row .wp-block-post-excerpt__more-text { display: none; }
.ac-row .wp-block-post-featured-image { margin: 0; }
.ac-row .wp-block-post-featured-image img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; }
@media (max-width: 700px) {
	.ac-row { grid-template-columns: 1fr; gap: 6px; }
	.ac-row__body { grid-template-columns: 1fr 88px; gap: 16px; }
	.ac-row .wp-block-post-featured-image { width: 88px !important; height: 88px !important; }
	.ac-row .wp-block-post-featured-image img { width: 88px !important; height: 88px !important; }
	.ac-row .wp-block-post-title { font-size: 1.375rem; }
}

/* Pagination */
.wp-block-query-pagination { gap: 8px; margin-top: 2rem; }
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers { text-decoration: none; }
.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	border-radius: 22px;
}
.wp-block-query-pagination-numbers .page-numbers.current { background: var(--ac-charcoal); color: #fff; }
.wp-block-query-pagination-next,
.wp-block-query-pagination-previous { color: var(--ac-orange-text); display: inline-flex; align-items: center; min-height: 44px; }

/* North End feature on the home page */
.ac-mosaic { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ac-mosaic .wp-block-post-featured-image { margin: 0; overflow: hidden; border-radius: 6px; }
.ac-mosaic .wp-block-post-featured-image img { aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; transition: transform .3s; }
.ac-mosaic .wp-block-post-featured-image a:hover img { transform: scale(1.03); }

/* Series page */
.ac-series-intro {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 3rem;
	align-items: end;
}
.ac-series-intro__head { display: flex; flex-direction: column; gap: 1.1rem; }
.ac-series-intro__title {
	margin: 0;
	font-family: var(--ac-sans);
	font-weight: 800;
	font-size: clamp(2.5rem, 5vw, 3.75rem);
	line-height: 1.02;
	letter-spacing: -0.025em;
}
.ac-series-intro__desc { color: #4A4A4A; font-size: 1.3rem; line-height: 1.65; }
.ac-series-intro__desc p { margin: 0 0 1rem; }
.ac-series-intro__desc p:last-child { margin-bottom: 0; }

.ac-tile { display: flex; flex-direction: column; gap: 10px; }
.ac-tile > * { margin: 0 !important; }
.ac-tile__media { position: relative; }
.ac-tile__media .wp-block-post-featured-image { margin: 0; overflow: hidden; border-radius: 6px; }
.ac-tile__media .wp-block-post-featured-image img { aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; display: block; }
.ac-day-badge {
	position: absolute;
	left: 10px;
	top: 10px;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	box-sizing: border-box;
	border-radius: 17px;
	background: #fff;
	color: var(--ac-charcoal);
	font-family: var(--ac-sans);
	font-weight: 800;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
.ac-tile .wp-block-post-title { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
.ac-tile .wp-block-post-title a { text-decoration: none; }
.ac-tile .wp-block-post-date { margin-top: -4px !important; }

/* Single post */
.ac-single-head > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.ac-single-head { display: flex; flex-direction: column; gap: 1rem; }
.ac-meta { font-family: var(--ac-sans); font-size: 0.9375rem; color: var(--ac-muted); }
.ac-meta > * { margin: 0 !important; }
.wp-block-post-content > .wp-block-image,
.wp-block-post-content > .wp-block-gallery { margin-top: 2rem; margin-bottom: 2rem; }
.wp-block-post-content .wp-block-gallery img { border-radius: 6px; }

/* Previous / next cards */
.ac-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ac-nav-card {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 18px;
	background: #fff;
	border-radius: 8px;
	text-decoration: none;
	color: var(--ac-charcoal);
	min-height: 60px;
}
.ac-nav-card--next { justify-content: flex-end; text-align: right; }
.ac-nav-card--empty { background: transparent; }
.ac-nav-card .ac-thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 4px; flex: none; }
.ac-nav-card__text { display: flex; flex-direction: column; gap: 4px; }
.ac-nav-card__label { font-family: var(--ac-sans); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac-muted); }
.ac-nav-card__title { font-family: var(--ac-sans); font-weight: 700; font-size: 1.25rem; line-height: 1.25; }
.ac-nav-card:hover .ac-nav-card__title { color: var(--ac-orange-text); }
@media (max-width: 700px) {
	.ac-post-nav { grid-template-columns: 1fr; }
	.ac-nav-card--empty { display: none; }
	.ac-nav-card .ac-thumb { width: 64px; height: 64px; }
}

/* Nearby days strip */
.ac-strip { display: flex; flex-direction: column; gap: 16px; margin-top: 2.25rem; }
.ac-strip__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ac-strip__title { margin: 0; font-size: 1.5rem; }
.ac-strip__all { font-family: var(--ac-sans); font-weight: 600; font-size: 0.9375rem; color: var(--ac-orange-text); }
.ac-strip__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.ac-strip__item { position: relative; display: block; border-radius: 4px; overflow: hidden; }
.ac-strip__item .ac-thumb { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.ac-strip__item.is-current { outline: 4px solid var(--ac-orange); outline-offset: -4px; }
.ac-strip__day {
	position: absolute;
	left: 6px;
	bottom: 6px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ac-charcoal);
	font-family: var(--ac-sans);
	font-weight: 800;
	font-size: 12px;
	padding: 2px 7px;
	border-radius: 10px;
}
@media (max-width: 600px) {
	.ac-strip__grid { grid-template-columns: repeat(4, 1fr); }
	.ac-strip__item:nth-child(n+5) { display: none; }
}

.ac-thumb--empty { display: block; background: var(--ac-sand); aspect-ratio: 1; }

/* Footer */
.ac-footer a { color: inherit; }
.ac-footer a:hover { color: #fff; }
.ac-footer .wp-block-image { flex-shrink: 0; }
.ac-footer .wp-block-image img { width: 56px; height: 56px; }
.ac-search-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ac-charcoal); }
.ac-search-link:hover { color: var(--ac-orange-text); }

/* Accessibility: visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible {
	outline: 3px solid var(--ac-orange);
	outline-offset: 2px;
}

/* Screen-reader-only text (search label, etc.) */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.wp-block-separator.ac-bar { margin-top: 0.35rem !important; }
