/* The redesigned curriculum page. Everything is scoped under .cn. */
.cn {
	--cn-navy: #0d2c5a;
	--cn-blue: #1a4f9c;
	--cn-red: #d7262b;
	--cn-yellow: #f6c21c;
	--cn-yellow-dark: #e2ac00;
	--cn-wash: #eaf3fb;
	--cn-card: #ffffff;
	--cn-text: #2b2f36;
	background: var(--cn-wash);
	color: var(--cn-text);
	font-size: 15px;
	line-height: 1.5;
	margin-top: -10px;
}
/* The site frame pads the content and wraps it in a Bootstrap row; these
   pages run edge to edge instead. */
.content-wrapper {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.content-wrapper > .row {
	margin-left: 0;
	margin-right: 0;
}
.content-wrapper > .row > .col-xs-12 {
	padding-left: 0;
	padding-right: 0;
}
.cn h1, .cn h2, .cn h3 {
	font-weight: 700;
	margin: 0;
}
.cn p {
	margin: 0 0 12px;
}
.cn img {
	display: block;
	object-fit: cover;
	border-radius: 4px;
}

/* Buttons */
.cn-button, .cn-button:hover, .cn-button:focus {
	display: inline-block;
	background: var(--cn-yellow);
	color: var(--cn-navy);
	font-weight: 700;
	padding: 8px 16px;
	border-radius: 4px;
	text-decoration: none;
	white-space: nowrap;
}
.cn-button:hover {
	background: var(--cn-yellow-dark);
}
.cn-button .fa {
	margin-left: 6px;
}

.cn-tags {
	color: var(--cn-blue);
	font-weight: 600;
	font-size: 13px;
}
.cn-tags a {
	text-decoration: underline;
}

/* Hero */
.cn-hero {
	background-color: var(--cn-wash);
	background-repeat: no-repeat;
	background-position: right center;
	background-size: auto 100%;
	min-height: 360px;
	display: flex;
	align-items: center;
	position: relative;
}
.cn-hero::before {
	/* Fades the photo into the page behind the text. */
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--cn-wash) 45%, rgba(234, 243, 251, 0) 65%);
}
.cn-hero-text {
	position: relative;
	max-width: 50%;
	padding: 32px 48px;
}
.cn-hero h1 {
	color: var(--cn-red);
	font-size: 48px;
	margin-bottom: 8px;
}
.cn-hero h3 {
	color: var(--cn-navy);
	font-size: 20px;
	margin-bottom: 12px;
}

.cn-nav {
	display: flex;
	justify-content: space-between;
	background: var(--cn-card);
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(13, 44, 90, 0.12);
	margin: -24px 48px 32px;
	padding: 12px 24px;
	position: relative;
}
.cn-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--cn-navy);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
	max-width: 130px;
	text-decoration: none;
}
.cn-nav .fa {
	font-size: 26px;
	color: var(--cn-blue);
}

/* Navy section headings */
.cn-band {
	background: var(--cn-navy);
	color: #fff;
	text-align: center;
	padding: 16px;
}
.cn-band h2 {
	font-size: 30px;
}
.cn-band p {
	margin: 4px 0 0;
}

.cn-section {
	padding: 24px 40px;
}

/* Overview */
.cn-overview {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: center;
	padding: 32px 40px;
}
.cn-diagram {
	background: var(--cn-card);
	border-radius: 8px;
	padding: 12px;
	box-shadow: 0 2px 8px rgba(13, 44, 90, 0.12);
}
.cn-diagram h3 {
	color: var(--cn-navy);
	text-align: center;
	margin-bottom: 8px;
}
.cn-quadrants {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	position: relative;
}
.cn-q, .cn-q:hover, .cn-q:focus {
	color: #fff;
	text-decoration: none;
	text-align: center;
	border-radius: 6px;
	padding: 14px 20px;
	min-height: 120px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.cn-q small {
	display: block;
	margin-top: 4px;
	font-size: 11px;
}
/* Keep each quadrant's text clear of the circle in the middle. */
.cn-q-math, .cn-q-expanded { padding-right: 56px; }
.cn-q-steam, .cn-q-components { padding-left: 56px; }
.cn-q-math { background: #d32f2f; }
.cn-q-steam { background: #1f6fc4; }
.cn-q-expanded { background: #4caf50; }
.cn-q-components { background: #6a3fb0; }
.cn-hub {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 110px;
	height: 110px;
	border-radius: 50%;
	background: #fff;
	color: var(--cn-navy);
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	box-shadow: 0 0 0 4px var(--cn-card);
}

/* Programs */
.cn-program {
	display: flex;
	align-items: center;
	gap: 24px;
	background: var(--cn-card);
	border-radius: 8px;
	padding: 8px 24px 8px 8px;
	margin-bottom: 14px;
	box-shadow: 0 1px 4px rgba(13, 44, 90, 0.08);
}
.cn-program:nth-child(even) {
	background: #dceaf7;
}
.cn-program img {
	width: 200px;
	height: 130px;
	flex: none;
}
.cn-program-text {
	flex: 1;
}
.cn-program h3, .cn-card h3 {
	color: var(--cn-navy);
	font-size: 20px;
	margin-bottom: 6px;
}

/* Integrated components */
.cn-grid {
	display: grid;
	gap: 16px;
	margin-bottom: 16px;
}
.cn-grid-2 { grid-template-columns: 1fr 1fr; }
.cn-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.cn-card {
	display: flex;
	gap: 16px;
	background: var(--cn-card);
	border-radius: 8px;
	padding: 12px;
	box-shadow: 0 1px 4px rgba(13, 44, 90, 0.08);
}
.cn-grid-2 .cn-card img {
	width: 180px;
	height: 190px;
	flex: none;
}
.cn-grid-3 .cn-card img {
	width: 100px;
	height: 160px;
	flex: none;
}
.cn-grid-3 .cn-card h3 {
	font-size: 17px;
}
.cn-grid-3 .cn-card p {
	font-size: 13px;
}
.cn-card .cn-tags {
	margin-bottom: 10px;
}

/* Free curriculum */
.cn-free {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	padding-top: 32px;
	padding-bottom: 40px;
}
.cn-free-word {
	color: var(--cn-red);
}
.cn-free-tiles h3 {
	color: var(--cn-navy);
	font-size: 18px;
}
.cn-free-tiles small {
	display: block;
	margin-bottom: 10px;
}
.cn-tiles {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}
.cn-tile, .cn-tile:hover, .cn-tile:focus {
	background: var(--cn-card);
	border-radius: 6px;
	padding: 6px;
	text-align: center;
	color: var(--cn-navy);
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
	box-shadow: 0 1px 4px rgba(13, 44, 90, 0.08);
}
.cn-tile:hover {
	box-shadow: 0 2px 10px rgba(13, 44, 90, 0.25);
}
.cn-tile img {
	width: 100%;
	height: 90px;
	margin-bottom: 6px;
}

/* Detail pages */
.cn-page-header {
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 24px 40px;
}
.cn-page-header-text {
	flex: 1;
}
.cn-page-header h1 {
	color: var(--cn-red);
	font-size: 40px;
	margin: 6px 0 10px;
}
.cn-page-header p {
	font-size: 17px;
	max-width: 640px;
}
.cn-page-header img {
	width: 360px;
	height: 220px;
	border-radius: 8px;
	flex: none;
}
.cn-back, .cn-back:hover, .cn-back:focus {
	color: var(--cn-blue);
	font-weight: 600;
	text-decoration: none;
}
.cn-jump {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	background: var(--cn-navy);
	padding: 12px 40px;
}
.cn-jump a, .cn-jump a:hover, .cn-jump a:focus {
	color: #fff;
	font-weight: 600;
}
.cn-detail {
	scroll-margin-top: 60px;
}
.cn-detail + .cn-detail {
	border-top: 4px solid #fff;
}
.cn-detail h2 {
	color: var(--cn-navy);
	font-size: 26px;
	margin-bottom: 4px;
}
.cn-hint {
	color: #5a6270;
	font-size: 13px;
}
.cn-courses {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px;
	margin-bottom: 20px;
}
.cn-course, .cn-course:hover, .cn-course:focus {
	background: var(--cn-card);
	border-radius: 6px;
	padding: 6px;
	color: var(--cn-navy);
	font-weight: 600;
	font-size: 13px;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 1px 4px rgba(13, 44, 90, 0.08);
}
a.cn-course:hover {
	box-shadow: 0 2px 10px rgba(13, 44, 90, 0.25);
}
div.cn-course {
	cursor: pointer;
}
.cn-course img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
}
.cn-course span {
	display: block;
	margin-top: 4px;
}
/* Text from the old page's global values: keep its pictures and tables inside the column. */
.cn-global {
	max-width: 960px;
	overflow-wrap: break-word;
}
.cn-global img, .cn-global iframe, .cn-global video {
	max-width: 100%;
	height: auto;
}
.cn-global table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}
.cn-global [class*='col-'] {
	float: none;
	width: auto;
	margin-left: 0;
}
.cn-components-intro {
	margin-top: 8px;
}

/* ---- Phones and narrow windows -------------------------------------------
   The rest of the site sets a 1228px minimum width on <html> (style.css) and
   <body>; these pages lift it so they fit a phone. */
html {
	min-width: 0 !important;
}
body {
	min-width: 0 !important;
}
@media (max-width: 900px) {
	.cn-hero {
		flex-direction: column;
		align-items: stretch;
		background-size: 100% auto;
		background-position: center top;
		min-height: 0;
		padding-top: 52vw;
	}
	.cn-hero::before {
		background: linear-gradient(180deg, rgba(234, 243, 251, 0) 40vw, var(--cn-wash) 60vw);
	}
	.cn-hero-text {
		max-width: none;
		padding: 16px 20px 40px;
	}
	.cn-nav {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 14px;
		margin: -24px 16px 24px;
		padding: 14px;
	}
	.cn-overview, .cn-free, .cn-grid-2, .cn-grid-3 {
		grid-template-columns: 1fr;
	}
	.cn-overview, .cn-section, .cn-page-header {
		padding-left: 20px;
		padding-right: 20px;
	}
	.cn-jump {
		padding: 12px 20px;
	}
	.cn-program {
		flex-wrap: wrap;
		padding: 12px;
	}
	.cn-program img {
		width: 100%;
		height: 180px;
	}
	.cn-page-header {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 16px;
	}
	.cn-page-header img {
		width: 100%;
		height: 180px;
	}
}
@media (max-width: 600px) {
	.cn {
		font-size: 14px;
	}
	.cn-hero h1, .cn-page-header h1 {
		font-size: 32px;
	}
	.cn-hero h3 {
		font-size: 17px;
	}
	.cn-band h2 {
		font-size: 24px;
	}
	.cn-nav {
		grid-template-columns: repeat(2, 1fr);
	}
	.cn-quadrants {
		grid-template-columns: 1fr;
	}
	.cn-q-math, .cn-q-expanded, .cn-q-steam, .cn-q-components {
		padding: 14px 16px;
		min-height: 0;
	}
	.cn-hub {
		display: none;
	}
	.cn-card {
		flex-direction: column;
	}
	.cn-grid-2 .cn-card img, .cn-grid-3 .cn-card img {
		width: 100%;
		height: 180px;
	}
	.cn-tiles {
		grid-template-columns: repeat(2, 1fr);
	}
	.cn-courses {
		grid-template-columns: repeat(2, 1fr);
	}
	.cn-program .cn-button {
		width: 100%;
		text-align: center;
	}
}
