.csn {
	--csn-accent: #F58220;
	--csn-accent-dark: #B85808;
	--csn-dark: #3A3A3C;
	--csn-muted: #EFEFF0;
	--csn-stage: #6B6B6E;
	--csn-tab-text: #1E7B3C;   /* inactive year tab text (green) */
	--csn-heading: #F58220;    /* month + year in the newsletter heading */
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	box-sizing: border-box;
	scroll-margin-top: 140px;
	overflow-x: clip;          /* never let anything push the page sideways */
}
.csn *, .csn *::before, .csn *::after { box-sizing: border-box; }

/* ---------- Year tabs ---------- */
.csn .csn-tabs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 0;
	padding-bottom: 10px;
}
.csn .csn-tab {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 12px 20px;
	background: var(--csn-muted);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.csn .csn-tab:first-child { border-radius: 8px 0 0 8px; }
.csn .csn-tab:last-child { border-radius: 0 8px 8px 0; }
.csn .csn-tab:only-child { border-radius: 8px; }
.csn .csn-tab,
.csn .csn-tab:visited,
.csn .csn-tab:focus { color: var(--csn-tab-text); }
.csn .csn-tab:hover { color: var(--csn-tab-text); background: #E2E2E4; }
.csn .csn-tab.is-active,
.csn .csn-tab.is-active:visited,
.csn .csn-tab.is-active:hover,
.csn .csn-tab.is-active:focus { color: #fff; background: var(--csn-dark); }
.csn .csn-tab.is-active::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -8px;
	transform: translateX(-50%);
	border: 8px solid transparent;
	border-top-color: var(--csn-dark);
	border-bottom: 0;
}

/* ---------- Month pills ---------- */
.csn .csn-months {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 32px 0 8px;
}
.csn .csn-month {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 22px;
	border: 1.5px solid #D6D6D9;
	border-radius: 999px;
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
	text-decoration: none;
	transition: border-color .2s, color .2s, background .2s;
}
.csn .csn-month,
.csn .csn-month:visited { color: var(--csn-dark); }
.csn .csn-month:hover { border-color: var(--csn-accent); color: var(--csn-accent-dark); }
.csn .csn-month.is-active,
.csn .csn-month.is-active:visited,
.csn .csn-month.is-active:hover { background: var(--csn-accent); border-color: var(--csn-accent); color: #fff; }

/* ---------- Newsletter blocks ---------- */
.csn .csn-item { margin: 56px 0; scroll-margin-top: 140px; }
.csn .csn-title {
	margin: 0 0 20px;
	text-align: center;
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 700;
	line-height: 1.25;
	color: #2B2B2D;
	overflow-wrap: anywhere;
}
.csn .csn-title span { color: var(--csn-heading); white-space: nowrap; }
.csn .csn-viewer {
	width: 100%;
	max-width: 100%;
	background: var(--csn-stage);
	border-radius: 14px;
	padding: 16px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
	overflow: hidden;
}
.csn .csn-viewer > *,
.csn .csn-viewer ._df_book,
.csn .csn-viewer .df-container { max-width: 100% !important; }
.csn .csn-frame { background: #fff; border-radius: 8px; }
.csn .csn-iframe {
	display: block;
	width: 100%;
	height: var(--csn-h, 720px);
	border: 0;
	border-radius: 8px;
	background: #fff;
}
.csn .csn-actions { margin: 16px 0 0; text-align: center; }
.csn .csn-download,
.csn .csn-download:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--csn-dark);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.csn .csn-download:hover { background: var(--csn-accent-dark); color: #fff; }
.csn .csn-empty { text-align: center; color: #5A5A5E; padding: 40px 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.csn .csn-item { margin: 44px 0; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	/* Tabs: show just the year, in an even grid that wraps */
	.csn .csn-tab-pre { display: none; }
	.csn .csn-tabs {
		grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
		gap: 6px;
		padding-bottom: 0;
	}
	.csn .csn-tab,
	.csn .csn-tab:first-child,
	.csn .csn-tab:last-child { border-radius: 8px; min-height: 46px; padding: 10px 8px; font-size: 16px; }
	.csn .csn-tab.is-active::after { display: none; }

	/* Months: one swipeable row instead of many wrapped lines */
	.csn .csn-months {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		margin: 20px 0 0;
		padding: 4px 2px 8px;
		gap: 8px;
	}
	.csn .csn-months::-webkit-scrollbar { display: none; }
	.csn .csn-month { flex: 0 0 auto; padding: 0 16px; font-size: 14px; scroll-snap-align: start; }

	.csn .csn-item { margin: 32px 0; scroll-margin-top: 90px; }
	.csn .csn-title { margin-bottom: 14px; }
	.csn .csn-title span { white-space: normal; }

	/* Viewer: shorter and edge-to-edge so the pages are readable */
	.csn .csn-viewer { padding: 6px; border-radius: 10px; }
	.csn .csn-viewer ._df_book,
	.csn .csn-viewer .df-container { height: var(--csn-h-m, 460px) !important; min-height: 0 !important; }
	.csn .csn-iframe { height: var(--csn-h-m, 460px); }

	.csn .csn-download { width: 100%; }
}
