/*
 * The new course page design (base_course.php): breadcrumbs, the Contents menu (its look comes
 * from css/rb-plan.css), and the card with the blue title bar (css/rb-page.css, .rb-docs) and
 * its toolbar. The chapters and activity cards inside keep their own styles.
 */

.rb-course {
	font-family: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* ---- Breadcrumbs, under the site header ---------------------------------------- */
.rb-course-crumbs .rb-course-guide { /* Instructor Guide, at the right */
	margin-left: auto;
	color: #fff !important;
	padding: 3px 12px;
	font-size: 13px;
	font-weight: 600;
}
.rb-course-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0 0 7px;
	padding: 8px 14px;
	background: #F4F7FA;
	border: 1px solid #E1E7ED;
	border-radius: 8px;
	color: #52677C;
	font-size: 14px;
	line-height: 1.4;
}
.rb-course-crumbs .rb-course-home {
	color: #2495eb;
	font-size: 17px;
	line-height: 1;
}
.rb-course-crumbs .rb-course-home:hover {
	color: #022851;
}
/* A crumb with a small triangle that opens its menu. */
.rb-course-crumb {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 2px;
}
.rb-course-crumb-btn {
	width: 20px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: none;
	color: #1d7fd0;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
}
.rb-course-crumb-btn:hover,
.rb-course-crumb-btn[aria-expanded='true'] {
	background: #DCEBF8;
	color: #022851;
}
.rb-course-crumb-menu {
	position: absolute;
	z-index: 30;
	top: calc(100% + 8px);
	left: 0;
	min-width: 260px;
	max-width: min(480px, calc(100vw - 40px));
	width: max-content;
	max-height: min(70vh, 520px);
	overflow-y: auto;
	padding: 6px 0;
	background: #fff;
	border: 1px solid #D5DDE5;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(18,58,99,.18);
}
.rb-course-crumb-menu[hidden] {
	display: none;
}
.rb-course-crumb-menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.rb-course-crumb-menu li > a,
.rb-course-crumb-menu li > span {
	display: block;
	padding: 6px 16px;
	color: #022851;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
}
.rb-course-crumb-menu li > a:hover,
.rb-course-crumb-menu li > a:focus-visible {
	background: #EAF4FD;
	color: #022851;
	text-decoration: none;
}
.rb-course-crumb-menu li.rb-course-crumb-current > span {
	background: #FFBF00;
	font-weight: 700;
}
.rb-course-crumb-menu li.rb-course-crumb-locked > span {
	color: #9AA8B6;
}
.rb-course-crumb-menu li.rb-course-crumb-group {
	margin-top: 6px;
	padding: 6px 16px 4px;
	border-top: 1px solid #E1E7ED;
	color: #C10230;
	font-size: 12px;
	font-weight: 700;
}
.rb-course-crumb-menu li.rb-course-crumb-group:first-child {
	margin-top: 0;
	border-top: 0;
}
.rb-course-crumbs a {
	color: #1d7fd0;
	font-weight: 500;
}
.rb-course-crumbs [aria-current] {
	color: #022851;
	font-weight: 700;
}
.rb-course-crumb-sep {
	color: #9AA8B6;
}

/* ---- Contents menu: units as red headings, chapters, the open chapter's sections --- */
.rb-course-menu > li.rb-course-menu-unit {
	margin: 2px 0;
	padding: 3px 14px;
	background: #fff;
	color: #C10230;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
}
.rb-course-menu > li.rb-course-menu-unit:first-child {
	margin-top: 0;
}
.rb-course-menu > li.rb-course-menu-section > a {
	padding: 6px 14px 6px 26px;
	font-size: 13px;
	font-weight: 500;
}
.rb-course-menu > li.rb-course-menu-section {
	background: #FFF2CC;
}
/* Tests in the same pink as their titles on the page (AdminLTE's .text-fuchsia). */
.rb-course-menu > li.rb-course-menu-test > a {
	color: #f012be !important;
}

/* ---- The card: blue title bar, then the toolbar ----------------------------------- */
.rb-course-card {
	margin: 0 0 24px;
}
.rb-course-titles {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.rb-course-kicker {
	font-size: 18px; /* the same as the guides' title bars (css/rb-plan.css) */
	font-weight: 700;
	letter-spacing: .03em;
	color: #fff;
	line-height: 1.2;
}
.rb-course-name {
	font-size: 30px;
	line-height: 1.25;
}
.rb-course-toolbar {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 12px 24px;
	background: #EEF7FF; /* light blue, like the guides' */
	border-bottom: 1px solid #E1E7ED;
}
/* The controls displayProject() makes, side by side: view on the left, links on the right. */
.rb-course-tools {
	display: contents;
}
.rb-course-tools select[name='curriculumView'] {
	float: none !important;
	margin: 0 !important;
	height: 32px;
	padding: 2px 28px 2px 10px;
	border: 0;
	border-radius: 5px;
	-webkit-appearance: none;
	appearance: none;
	background: #00a000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") right 9px center / 11px 7px no-repeat;
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.rb-course-tools select[name='curriculumView']:hover {
	background-color: #009300;
}
.rb-course-tools select option {
	background: #fff;
	color: #022851;
}
.rb-course-view {
	order: 1;
	display: inline-flex;
	flex-wrap: wrap;
	border: 1px solid #C9D3DD;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}
.rb-course-view label {
	margin: 0;
	font-weight: 500;
	cursor: pointer;
}
.rb-course-view input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.rb-course-view span {
	display: block;
	padding: 6px 12px;
	color: #022851;
	font-size: 13px;
	line-height: 1.35;
	border-left: 1px solid #E1E7ED;
}
.rb-course-view label:first-child span {
	border-left: 0;
}
.rb-course-view label:hover span {
	background: #EAF4FD;
}
.rb-course-view input:checked + span {
	background: #2495eb;
	color: #fff;
	font-weight: 700;
}
.rb-course-view input:focus-visible + span {
	outline: 2px solid #022851;
	outline-offset: -3px;
}
.rb-course-checks {
	order: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
}
.rb-course-checks label {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	color: #022851;
	cursor: pointer;
}
.rb-course-checks input {
	margin: 0 4px 0 0;
	vertical-align: -1px;
}
.rb-course-buttons {
	order: 3;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-left: auto;
}
.rb-course-buttons .btn {
	margin: 0;
}
.rb-course-key {
	order: 4;
}

/* ---- Key: a small button that opens the legend -------------------------------- */
.rb-course-key-btn {
	height: 30px;
	padding: 0 12px;
	border: 1px solid #2495eb;
	border-radius: 15px;
	background: #fff;
	color: #1d7fd0;
	font-size: 13px;
	font-weight: 700;
}
.rb-course-key-btn:hover,
.rb-course-key-btn[aria-expanded='true'] {
	background: #2495eb;
	color: #fff;
}
.rb-course-key-panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 6px);
	right: 24px;
	width: max-content;
	max-width: calc(100% - 48px);
	padding: 14px 16px 6px;
	background: #fff;
	border: 1px solid #D5DDE5;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(18,58,99,.18);
	font-size: 13px;
	color: #22313F;
}
.rb-course-key-panel[hidden] {
	display: none;
}
.rb-course-key-panel .chart-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0 0 8px;
	padding: 0 0 8px !important;
	border-bottom: 1px solid #E1E7ED;
}
/* The four card colors on one line (they wrap only when the screen is too narrow). */
.rb-course-key-panel .chart-legend > li {
	float: none;
	margin: 0;
	white-space: nowrap;
}
.rb-course-key-panel .chart-legend::before,
.rb-course-key-panel .chart-legend::after {
	content: none;
}
.rb-course-key-badges {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 16px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}
.rb-course-key-icon {
	border-radius: 10px;
	width: 18px;
	height: 18px;
	padding: 0;
}
.rb-course-key-a {
	font-size: 15px;
	font-weight: bold;
	line-height: 15px;
}

.rb-course-body {
	padding-top: 6px;
}

@media (max-width: 900px) {
	.rb-course-buttons {
		margin-left: 0;
	}
	.rb-course-key-panel {
		left: 16px;
		right: 16px;
		width: auto;
	}
	.rb-course-key-badges {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (max-width: 600px) {
	.rb-course-toolbar {
		padding: 12px 16px;
	}
	.rb-course-name {
		font-size: 24px;
	}
}

/* Chapter titles are buttons (they open and close the chapter), which center their text
   when it wraps: keep them left-aligned like the rest. */
.rb-course-body button.chapterTitle {
	text-align: left;
}

/* ---- One section at a time ------------------------------------------------------ */
.rb-course-chapter-head {
	padding-top: 15px;
}
.rb-course-menu > li.rb-course-menu-section.current_page_item > a {
	background: #FFBF00;
	font-weight: 700;
}
.rb-course-pager {
	display: flex;
	justify-content: space-between;
	align-items: stretch;
	gap: 16px;
	margin: 18px 0 6px;
	padding-top: 18px;
	border-top: 1px solid #E1E7ED;
}
.rb-course-step {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	max-width: 48%;
	padding: 10px 18px;
	border: 2px solid #2495eb;
	border-radius: 8px;
	background: #fff;
	color: #1d7fd0 !important;
	text-decoration: none !important;
	line-height: 1.3;
}
.rb-course-step .fa {
	font-size: 24px;
}
.rb-course-step > span {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.rb-course-step-word {
	font-size: 12px;
	font-weight: 500;
	opacity: .85;
}
.rb-course-step-name {
	font-size: 15px;
	font-weight: 700;
}
.rb-course-step:hover {
	background: #EAF4FD;
}
.rb-course-next {
	margin-left: auto;
	background: #2495eb;
	color: #fff !important;
	text-align: right;
}
.rb-course-next > span {
	align-items: flex-end;
}
.rb-course-next:hover {
	background: #1d84d4;
}
/* One chapter at a time: Previous chapter and Next chapter in a row above the chapter too. */
.rb-course-pager.rb-course-pager-top {
	margin: 0 0 12px;
	padding: 0;
	border-top: 0;
}
.rb-course-pager-top .rb-course-step {
	gap: 8px;
	padding: 5px 14px;
}
.rb-course-pager-top .rb-course-step .fa {
	font-size: 18px;
}
.rb-course-pager-top .rb-course-step-word {
	font-size: 13px;
	font-weight: 700;
	opacity: 1;
}
.rb-course-empty {
	padding: 20px 0;
	color: #52677C;
}
@media (max-width: 600px) {
	.rb-course-pager:not(.rb-course-pager-top) {
		flex-direction: column-reverse;
	}
	.rb-course-step {
		max-width: none;
	}
}

/* Chapter titles keep their green when pointed at (the site's rule turns them blue). */
.rb-course-body .btn-link.chapterTitle:hover,
.rb-course-body .btn-link.chapterTitle:focus {
	color: #00a000;
}

/* Units are red headings. Each level's text starts 15px in from
   the one above it: the unit's at 18px from the card's edge (its bar at 10px), chapters at
   33px (Chapter 0 too, which has no unit), and sections with their cards at 48px. */
.rb-course-body > div:has(> .unitTitle) {
	padding-top: 18px !important;
}
.rb-course-body .unitTitle {
	display: block;
	padding: 0 14px 0 8px;
	color: #C10230;
	font-size: 24px;
	line-height: 1.35;
}
/* Chapters come under units, so their titles are a size smaller (the site's is 24px), and
   green like the Instructor View button (one green on the page, not two). */
.rb-course-body .chapterTitle {
	font-size: 22px;
	color: #00a000;
}
.rb-course-body > div:has(> .unitTitle) {
	margin-left: -15px;
}
.rb-course-body > div:has(.chapterTitle) {
	margin-left: 8px !important;
	padding-top: 10px !important; /* the same 15px gap as from a chapter to its first section */
}
.rb-course-body > div:not(:has(> .unitTitle)):not(:has(.chapterTitle)) {
	margin-left: 23px !important; /* over the site's .no-margin in one-chapter view */
}

/* One section at a time (wide screens): the menu is exactly as tall as the card beside it,
   its list scrolling inside, instead of running on below the card. */
@media (min-width: 901px) {
	.rb-course-one-section .rb-plan {
		align-items: stretch;
		margin-bottom: 24px;
	}
	.rb-course-one-section .rb-course-card {
		margin-bottom: 0;
	}
	.rb-course-one-section .rb-plan-menu-col {
		position: relative;
		top: auto;
		max-height: none;
		overflow: hidden;
	}
	.rb-course-one-section .rb-plan-menu {
		position: absolute;
		inset: 0;
		display: flex;
		flex-direction: column;
		background: #FFF9E5;
		border-radius: 0 0 8px 8px;
	}
	.rb-course-one-section .rb-plan-menu-head {
		flex: 0 0 auto;
	}
	.rb-course-one-section .rb-plan-menu-list {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
	}
	.rb-course-one-section .rb-plan-menu-collapsed .rb-plan-menu {
		background: none;
	}
}

/* The Contents menu steps in the same way, in smaller steps (it is narrow): units, then
   chapters 8px in, then sections 8px further. */
.rb-course-menu > li.rb-course-menu-unit {
	padding-left: 12px;
}
.rb-course-menu > li.rb-course-menu-chapter > a {
	padding-left: 20px;
}
.rb-course-menu > li.rb-course-menu-section > a {
	padding-left: 28px;
}

/* No extra space above the first heading: the card's own padding is enough under the toolbar. */
.rb-course-body > div:first-child {
	padding-top: 0 !important;
}

/* Toolbar, two rows: the view picker on the left and the course's buttons and the Key at the right on top; Show
   Lessons and Activities / Show Tests, then the four views (at the right) underneath. */
.rb-course-toolbar {
	row-gap: 0;
}
.rb-course-toolbar > *,
.rb-course-tools > * {
	margin-top: 5px !important;
	margin-bottom: 5px !important;
}
.rb-course-buttons {
	order: 1;
	margin-left: auto; /* the buttons and the Key at the right */
}
.rb-course-buttons .btn {
	font-weight: 700;
}
.rb-course-key {
	order: 2;
}
.rb-course-toolbar::after {
	content: '';
	order: 3;
	flex-basis: 100%;
	height: 0;
}
.rb-course-checks {
	order: 4;
}
.rb-course-view {
	order: 5;
	margin-left: auto;
}
@media (max-width: 900px) {
	.rb-course-view {
		margin-left: 0;
	}
}

/* Small screens: the four views as a dropdown instead of a row of buttons. */
.rb-course-view-select {
	display: none;
	order: 5;
	height: 32px;
	padding: 2px 28px 2px 10px;
	border: 0;
	border-radius: 6px;
	-webkit-appearance: none;
	appearance: none;
	/* Blue with white text, like the chosen view's button. */
	background: #2495eb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") right 9px center / 11px 7px no-repeat;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
@media (max-width: 767px) {
	.rb-course-view {
		display: none;
	}
	.rb-course-view-select {
		display: block;
	}
}
.rb-course-view-select:hover {
	background-color: #1d84d4;
}
.rb-course-view-select option {
	background: #fff;
	color: #022851;
}

/* Half the space above the breadcrumbs (Harry): 5px under the site's header, not 10. */
.content-wrapper:has(.rb-course) {
	padding-top: 5px;
}
/* Half the usual space at the page's sides (10px + 10px, not 10 + 15 + 15) and bottom. */
.col-xs-12:has(> #content > .rb-course) {
	padding-left: 10px;
	padding-right: 10px;
}
#content:has(> .rb-course) {
	padding-left: 0;
	padding-right: 0;
}
.rb-course .rb-course-card {
	margin-bottom: 7px;
}
@media (min-width: 901px) {
	.rb-course-one-section .rb-plan {
		margin-bottom: 7px;
	}
}

/* The card's blue title bar starts level with the Contents menu's bar (no space above it). */
.rb-course .rb-course-card {
	padding-top: 0 !important;
}

/* Half the guides' space between the Contents menu and the card (24px there). */
.rb-course .rb-plan {
	gap: 12px;
}

/* Previous is blue too, like Next. */
.rb-course-step.rb-course-prev {
	background: #2495eb;
	color: #fff !important;
}
.rb-course-step.rb-course-prev:hover {
	background: #1d84d4;
}

/* The four views never wrap inside their row of buttons: when the row doesn't fit across
   the toolbar, js/rb-course.js switches to the dropdown (rb-course-view-compact). */
.rb-course-view {
	flex-wrap: nowrap;
	white-space: nowrap;
}
.rb-course-view-compact .rb-course-view {
	display: none;
}
.rb-course-view-compact .rb-course-view-select {
	display: block;
}
.rb-course-view-select {
	margin-left: auto;
}
@media (max-width: 900px) {
	.rb-course-view-select {
		margin-left: 0;
	}
}

/* The Key sits after the last of the course's buttons and wraps with it, never alone. */
.rb-course-buttons {
	align-items: center;
	justify-content: flex-end;
}
.rb-course-key-pair {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}
.rb-course-buttons .rb-course-key {
	margin: 0 !important;
}
.rb-course-key-btn {
	white-space: nowrap;
}

/* Chapters in the Contents menu in a darker green than on the page: #008000 reads on the
   gold (Harry: 3.11:1 on #FFBF00; #00A000 is only 2.11:1). */
.rb-course-menu > li.rb-course-menu-chapter > a {
	color: #008000 !important;
}

/* The language menu, green like Instructor View (as on the guides). */
.rb-course-tools select.rb-course-language {
	order: 0;
	height: 32px;
	padding: 2px 28px 2px 10px;
	border: 0;
	border-radius: 5px;
	-webkit-appearance: none;
	appearance: none;
	background: #00a000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") right 9px center / 11px 7px no-repeat;
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 5px !important;
	margin-bottom: 5px !important;
}
.rb-course-tools select.rb-course-language:hover {
	background-color: #009300;
}
.rb-course-tools select.rb-course-language:disabled {
	opacity: .6;
}
/* The Curriculum button: this page, so shown selected (navy, like the top menu's). */
.rb-course-buttons .btn.rb-course-current {
	background-color: #022851 !important;
	border-color: #022851 !important;
	color: #fff !important;
	cursor: pointer; /* still a link: it goes to the course's page (Harry) */
}

/* Pinned while the page scrolls (wide, tall enough windows): the breadcrumbs at the top, the
   title bar and toolbar right under them, and the Contents menu under the breadcrumbs.
   js/rb-course.js sets --rb-crumbs-h and --rb-head-h to their heights. */
.rb-course-card .rb-docs-inner {
	border-top: 0;
	overflow: clip !important; /* still rounds the corners, but (unlike hidden) lets the header stick */
}
@media (min-width: 901px) and (min-height: 700px) {
	.rb-course-crumbs {
		position: sticky;
		top: 0;
		z-index: 40;
	}
	.rb-course-title {
		position: sticky;
		top: var(--rb-crumbs-h, 52px);
		z-index: 35;
	}
	.rb-course-pin {
		position: sticky;
		top: calc(var(--rb-crumbs-h, 52px) + var(--rb-title-h, 80px));
		z-index: 30;
	}
	.rb-course:not(.rb-course-one-section) .rb-plan-menu-col {
		top: calc(var(--rb-crumbs-h, 52px) + var(--rb-title-h, 80px)); /* level with the pinned toolbar */
		max-height: calc(100vh - var(--rb-crumbs-h, 52px) - var(--rb-title-h, 80px) - 14px);
	}
	/* One section at a time too (Harry: Contents always pinned): as tall as the window below
	   the header, its list scrolling inside. */
	.rb-course-one-section .rb-plan-menu-col {
		position: sticky;
		top: calc(var(--rb-crumbs-h, 52px) + var(--rb-title-h, 80px));
		align-self: flex-start;
		max-height: calc(100vh - var(--rb-crumbs-h, 52px) - var(--rb-title-h, 80px) - 14px);
		display: flex;
		flex-direction: column;
		overflow: visible;
	}
	.rb-course-one-section .rb-plan-menu-col:not(.rb-plan-menu-collapsed) .rb-plan-menu {
		position: relative;
		inset: auto;
		min-height: 0;
	}
	/* A jump to a section or chapter stops below the pinned header. */
	.rb-course-body [id] {
		scroll-margin-top: calc(var(--rb-head-h, 260px) + 10px);
	}
}

/* ---- A course's other pages (Standards, Glossary, Index) --------------------------- */
#rb-course-menu.rb-course-toc-empty {
	display: none;
}
.rb-course-page-title {
	margin: 4px 0 14px;
	color: #022851;
	font-size: 24px;
	font-weight: 700;
}
.rb-course-menu > li.rb-course-toc-entry > a {
	padding-left: 20px;
	font-size: 13px;
	font-weight: 600;
}
@media (min-width: 901px) and (min-height: 700px) {
	.rb-course-page-body .card,
	.rb-course-page-body .chapterTitle,
	.rb-course-page-body [id] {
		scroll-margin-top: calc(var(--rb-head-h, 260px) + 10px);
	}
}

/* A course's other pages sit in lessonPlan.php's / the page's own column: the same halved
   side space as the course page. */
.col-xs-12:has(> .col-xs-12 > .rb-course-page) {
	padding-left: 10px;
	padding-right: 10px;
	overflow: visible !important; /* the Workbook's column scrolls by itself, which stops the header pinning */
}
.col-xs-12:has(> .rb-course-page) {
	padding-left: 0;
	padding-right: 0;
}
/* Curriculum Overview: the PDF button, and its parts (one card per section) in the card. */
.rb-course-tools .rb-course-pdf {
	order: 0;
	margin-top: 5px !important;
	margin-bottom: 5px !important;
	background: #fff;
	border: 1px solid #c10230;
	color: #c10230 !important;
	font-weight: 700;
}
.rb-course-tools .rb-course-pdf:hover {
	background: #c10230;
	color: #fff !important;
}
.rb-overview-view {
	order: 5;
}
.rb-overview-parts .text-box {
	margin: 0 0 16px !important;
}
/* The Chapter Guide's chapter title, the Section Overview's section title (green, like the
   course page's chapter titles). */
.rb-overview-parts .rb-guide-kind { /* "Chapter Guide" / "Section Overview", red like unit titles */
	margin: 0 0 4px;
	color: #C10230;
	font-size: 24px;
	font-weight: bold;
}
.rb-overview-parts .rb-guide-title {
	margin: 0 0 12px;
	color: #00a000;
	font-size: 22px;
	font-weight: bold;
}
@media (min-width: 901px) and (min-height: 700px) {
	.rb-overview-parts .text-box {
		scroll-margin-top: calc(var(--rb-head-h, 260px) + 10px);
	}
}
/* The Glossary's Alphabetic / Chapter: at the left of the second row, level with All letters /
   One letter at a time; the language menu stays at the left of the top row (Harry). Always shown. */
.rb-course-toolbar .rb-course-view.rb-glossary-order {
	order: 4;
	margin-left: 0 !important;
	display: inline-flex !important;
}
/* Its two choices always show (they have no dropdown), wrapping on narrow screens. */
.rb-course-toolbar .rb-course-view.rb-overview-view {
	display: inline-flex !important;
	flex-wrap: wrap;
	white-space: normal;
}

/* While pinned, nothing shows through: the breadcrumbs' white edge fills the gap between them
   and the title bar (and the Contents menu), and a white backing fills the title bar's
   rounded top corners. */
@media (min-width: 901px) and (min-height: 700px) {
	.rb-course-crumbs {
		box-shadow: 0 0 0 8px #fff;
	}
	
}

/* ---- The course's title: one bar across the page, above Contents and the content ---- */
html .rb-course .rb-course-title.rb-docs {
	max-width: none !important; /* the site's sections are centered at a set width */
	width: auto !important;
	margin: 0 !important;
	padding: 0 0 6px !important; /* its gap to what's below, white, so nothing shows through when pinned */
	background: #fff;
}
.rb-course-title .rb-docs-inner {
	margin: 0 !important;
	padding: 0 !important;
	border-top: 0;
	border-radius: 8px;
	overflow: clip !important;
}
.rb-course-title .rb-course-heading {
	margin: 0;
}
.rb-course-title .rb-course-name {
	font-size: 30px;
	line-height: 1.25;
}
.rb-course-dot {
	margin: 0 .15em;
	color: #DCE7F7;
}
/* The card below now starts with the toolbar, so it has its own top edge again. */
.rb-course-card .rb-docs-inner {
	border-top: 1px solid #E1E7ED;
}
@media (max-width: 600px) {
	.rb-course-title .rb-course-name {
		font-size: 24px;
	}
}

/* Standards: its categories' buttons (the toolbar's second line, left) and the hidden ones. */
.rb-standards-cats {
	order: 4;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 5px;
	margin-bottom: 5px;
}
.rb-standards-cats .btn {
	margin: 0;
	font-weight: 700;
}
.rb-standards-cats .btn.rb-course-current {
	background-color: #022851 !important;
	border-color: #022851 !important;
	color: #fff !important;
}
.rb-std-hidden {
	display: none !important;
}
.rb-card-hidden {
	display: none !important;
}
.rb-cards-one-mode .btn-group:has(#collapseAll) {
	display: none;
}

/* ---- Standards, Glossary and Index cards (Harry) ----------------------------------- */
/* All ... / One ... at a time decides what's open, so there's no Expand All / Collapse All,
   and every card shown is open: its title is a heading, like a chapter title on the course
   page (green, no +/- box), not a bar that opens and closes. */
.rb-course-page-body .btn-group:has(#collapseAll) {
	display: none !important;
}
.rb-course-page-body .card > .card-header {
	padding: 16px 0 4px !important;
	background: none !important;
	border: 0 !important;
}
.rb-course-page-body .card > .card-header > .card-title {
	pointer-events: none; /* not a toggle any more */
	margin: 0;
	padding: 0 !important;
	color: #00a000 !important;
	font-size: 22px !important;
	font-weight: 700;
	line-height: 1.3;
}
.rb-course-page-body .card > .card-header > .card-title::before {
	display: none !important;
}
.rb-course-page-body .card > .card-header > .card-title a,
.rb-course-page-body .card > .card-header > .card-title b {
	color: inherit !important;
	font-weight: 700;
}
.rb-course-page-body .card > .collapse {
	display: block !important;
	height: auto !important;
	visibility: visible !important;
}
.rb-course-page-body .card {
	border: 0;
	box-shadow: none;
	margin-bottom: 4px;
	background: none;
}
/* The category's title (Mathematics Standards, ...): a unit's title, as on the course page
   (red); its domains or practices are like chapters under it. */
.rb-course-page-body > .chapterTitle {
	margin: 0 0 2px;
	padding: 0 !important;
	background: none;
	color: #C10230 !important;
	font-size: 24px !important;
	font-weight: 700;
	line-height: 1.35;
}
.rb-course-page-body .card {
	margin-left: 15px;
}

/* The Contents bar stays at the top of the menu (Harry): the list scrolls under it, not the
   whole menu (wide screens; one section at a time has its own, above). */
@media (min-width: 901px) {
	.rb-course:not(.rb-course-one-section) .rb-plan-menu-col:not(.rb-plan-menu-collapsed) {
		display: flex;
		flex-direction: column;
		overflow: visible;
	}
	.rb-course:not(.rb-course-one-section) .rb-plan-menu-col:not(.rb-plan-menu-collapsed) .rb-plan-menu {
		display: flex;
		flex-direction: column;
		min-height: 0;
		max-height: 100%;
	}
	.rb-course:not(.rb-course-one-section) .rb-plan-menu-col:not(.rb-plan-menu-collapsed) .rb-plan-menu-head {
		flex: 0 0 auto;
	}
	.rb-course:not(.rb-course-one-section) .rb-plan-menu-col:not(.rb-plan-menu-collapsed) .rb-plan-menu-list {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
	}
}

/* Index (and any page like it): its Expand All / Collapse All are hidden on these pages, so
   their empty blue bar and the line under it go too. */
.rb-course-page-body div:has(> .btn-group > #uncollapseAll):not(:has(input, select)),
.rb-course-page-body div:has(> .btn-group > #uncollapseAll):not(:has(input, select)) + hr.minimal {
	display: none;
}

/* A math formula wider than the card (phones) scrolls sideways in its place instead of being
   cut off at the card's edge. */
.rb-course mjx-container[display="true"] {
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
}
@media (max-width: 600px) { /* an inline one too: it needs to be a box to scroll */
	.rb-course mjx-container.MathJax:not([display="true"]) {
		display: inline-block;
		max-width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		vertical-align: middle;
	}
}
