/* JCR Homepage Preview: content area only. Everything is scoped to .jcr-hp. */
.entry-content .jcr-hp,
.jcr-hp {
	--hp-navy: #0C1E7F;
	--hp-red: #D0111B;
	--hp-text: #14182B;
	--hp-muted: #565C6E;
	--hp-rule: #D9DEE7;
	--hp-soft: #F3F5F9;
	box-sizing: border-box;
	/* Same width as the banners above: the theme's content width (90vw, max 1500px). */
	width: var(--theme-block-width, 100%);
	max-width: var(--theme-block-max-width, 1500px);
	margin: 20px auto 32px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	column-gap: 32px;
	align-items: start;
	font-family: Roboto, system-ui, sans-serif;
	color: var(--hp-text);
	line-height: 1.4;
}
.jcr-hp *, .jcr-hp *::before, .jcr-hp *::after { box-sizing: border-box; }
.jcr-hp h2, .jcr-hp h3, .jcr-hp p { margin: 0; padding: 0; }
.jcr-hp a { color: inherit; text-decoration: none; }
.jcr-hp a:hover { color: var(--hp-navy); text-decoration: underline; }
.jcr-hp img { max-width: 100%; display: block; }

.jcr-hp-feed { display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.jcr-hp-rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.jcr-hp-tiles { display: flex; flex-direction: column; gap: 14px; }



/* Ads */
.jcr-hp-ad { line-height: 0; }
.jcr-hp-ad > div { max-width: 100% !important; margin: 0 auto; }
.jcr-hp-ad img { width: 100%; height: auto; }
/* AdSanity custom sizes draw a fixed-ratio box (height:0 + padding-bottom) and let the image
   overflow it. Creatives that aren't the nominal ratio (S4 is 324x236, S2 is 403x127) then spill
   onto the next tile. Let the image set the height instead. */
.jcr-hp .jcr-hp-ad .adsanity-inner { height: auto !important; padding-bottom: 0 !important; overflow: visible; }
.jcr-hp .jcr-hp-ad > div { height: auto !important; max-height: none !important; }
.jcr-hp-adbreak { display: flex; flex-direction: column; gap: 10px; }
.jcr-hp-search { margin-bottom: 4px; }

/* Section heads */
.jcr-hp-sechead { display: flex; justify-content: space-between; align-items: baseline; border-top: 3px solid var(--hp-navy); padding-top: 10px; }
.jcr-hp .jcr-hp-sechead h2 { font-family: Merriweather, Georgia, serif; font-weight: 900; font-size: 22px; line-height: 1.3; color: var(--hp-navy); }
.jcr-hp .jcr-hp-more { font-size: 13px; font-weight: 700; color: var(--hp-navy); padding: 6px 0; }

.jcr-hp-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hp-red); }
.jcr-hp time { font-size: 13px; color: var(--hp-muted); }
.jcr-hp h3 { font-family: Merriweather, Georgia, serif; font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--hp-text); }

.jcr-hp-thumb { display: block; }
.jcr-hp-thumb img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

/* Top stories */
.jcr-hp-topstories { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px 24px; }
.jcr-hp-ts-head { grid-column: 1 / -1; }
.jcr-hp-lead { display: flex; flex-direction: column; gap: 10px; }
.jcr-hp .jcr-hp-lead h3 { font-weight: 900; font-size: 32px; line-height: 1.2; }
.jcr-hp-ts-side { display: flex; flex-direction: column; gap: 22px; }
.jcr-hp-card { display: flex; flex-direction: column; gap: 8px; }
.jcr-hp-card-side .jcr-hp-thumb img { aspect-ratio: 16 / 9; }
.jcr-hp .jcr-hp-card-side h3 { font-size: 19px; line-height: 1.3; }

.jcr-hp .jcr-hp-btn { display: inline-block; align-self: flex-start; margin-top: 12px; font-weight: 700; font-size: 14px; padding: 12px 22px; border: 1.5px solid var(--hp-navy); border-radius: 4px; color: var(--hp-navy); }

/* Town sections */
.jcr-hp-town { display: flex; flex-direction: column; gap: 16px; }
.jcr-hp-cardgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
.jcr-hp-ts-more { grid-column: 1 / -1; display: flex; flex-direction: column; padding-top: 8px; }
.jcr-hp-morelinks { display: flex; gap: 16px; }
.jcr-hp .jcr-hp-cardgrid h3 { font-size: 19px; line-height: 1.3; }

/* State: headline list, two columns, no photos */
.jcr-hp-headlines-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.jcr-hp-headlines article { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--hp-rule); }

/* Empty banner slot (preview only) */
.jcr-hp-ad-placeholder { aspect-ratio: 1000 / 150; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; border: 1.5px dashed #8A90A0; background: var(--hp-soft); color: var(--hp-muted); font-size: 13px; line-height: 1.4; }

@media (max-width: 1000px) {
	.jcr-hp-cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.jcr-hp-topstories { grid-template-columns: minmax(0, 1fr); }
	.jcr-hp-ts-side { flex-direction: row; }
	.jcr-hp-ts-side .jcr-hp-card { flex: 1; min-width: 0; }
}

/* Phones: one column. Feed, top stories and rail dissolve and every block is placed by --m. */
@media (max-width: 760px) {
	.entry-content .jcr-hp,
	.jcr-hp {
		display: flex; flex-direction: column; align-items: stretch; gap: 22px;
		/* Mobile design: 16px side gutters. Blocksy's container is 88-90vw here, so break out of it. */
		width: calc(100vw - 32px); max-width: none;
		margin: 16px calc((100% - 100vw) / 2 + 16px) 28px;
	}
	.jcr-hp-feed, .jcr-hp-topstories, .jcr-hp-rail { display: contents; }
	.jcr-hp > *, .jcr-hp-feed > *, .jcr-hp-topstories > *, .jcr-hp-rail > * { order: var(--m, 0); }
	.jcr-hp-search { display: none; }
	.jcr-hp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: center; }
	.jcr-hp .jcr-hp-lead h3 { font-size: 25px; line-height: 1.25; }
	/* Phones: every story card gets a full-width photo (feedback: bigger photos, fewer small ones). */
	.jcr-hp-ts-side { flex-direction: column; gap: 0; }
	.jcr-hp-ts-side .jcr-hp-card,
	.jcr-hp-cardgrid .jcr-hp-card { padding: 16px 0; border-top: 1px solid var(--hp-rule); }
	.jcr-hp-cardgrid .jcr-hp-card:first-child { border-top: 0; padding-top: 0; }
	.jcr-hp-cardgrid .jcr-hp-card:last-child { padding-bottom: 0; }
	.jcr-hp-card-side .jcr-hp-thumb img { aspect-ratio: 3 / 2; }
	.jcr-hp .jcr-hp-card-side h3,
	.jcr-hp .jcr-hp-cardgrid .jcr-hp-card h3 { font-size: 19px; line-height: 1.3; }
	.jcr-hp-headlines-grid { grid-template-columns: minmax(0, 1fr); }
	.jcr-hp-ts-more { padding-top: 0; }
	.jcr-hp-cardgrid { display: flex; flex-direction: column; gap: 0; }
	.jcr-hp .jcr-hp-sechead h2 { font-size: 20px; }
	.jcr-hp-sechead { flex-wrap: wrap; column-gap: 12px; }
	.jcr-hp-morelinks { gap: 12px; }
}
