/*
 * RoboBlocky page design: blue heading bar, cards, and the Portal menu.
 *
 * First built by Mary for the Documentation page (the DOCUMENT entry in Global
 * Values, which carries its own copy of the card rules). Every page loads this
 * file (base.php); its rules only touch elements with these class names, or pages
 * that set $GLOBALS['rbFluidPage'] = true (html/body class rb-fluid), which fit
 * the screen instead of the site's fixed 1228px width.
 *
 * Card markup (Global Values pages: Documents, Portal Overview, Announcements, Download):
 *   <section class="rb-docs">
 *     <div class="rb-docs-inner">
 *       <h2 class="rb-docs-heading"><svg ...></svg>Title</h2>
 *       <p class="rb-docs-intro">One-line description.</p>
 *       <div class="rb-docs-grid">            (3 columns; rb-docs-grid-2 / rb-docs-grid-1)
 *         <article class="rb-docs-card">
 *           <div class="rb-docs-card-head"><span class="rb-docs-icon"><svg ...></svg></span><h3>Card title</h3></div>
 *           <ul class="rb-docs-links"><li><a href="...">Link<span class="rb-ext" aria-hidden="true">↗</span></a></li></ul>
 *           or text: <div class="rb-docs-text"><p>...</p></div>
 *         </article>
 *       </div>
 *     </div>
 *   </section>
 * Extras: rb-docs-card-wide (a card that spans the whole row), rb-chip (a label
 * styled like the button it names, e.g. <span class="rb-chip">Search</span>),
 * rb-docs-steps (a row of steps), rb-docs-body (free content under the heading),
 * rb-docs-date (a date label on a card), rb-docs-figure (a picture that fits the
 * card), rb-docs-button (a large link button), rb-docs-actions (a row of them).
 *
 * Portal pages: the menu (templates/html/portal/sidebar.html.twig, .rb-pnav) and
 * a main column <div class="col-xs-8 rb-portal-main"> that starts with
 * rb_portal_title() (base_portal.php).
 */

/* ---- Fit the screen ------------------------------------------------------------
   The rest of the site is a fixed 1228px desktop layout (style.css on <html>,
   base.php on <body>). Fluid pages lift that, so phones and narrow windows get
   the page at their own width, not a 1228px page to scroll sideways. */
html.rb-fluid,
body.rb-fluid {
	min-width: 0 !important;
}
/* Fixed-width pages scroll because base.php puts overflow:scroll !important on
   <body>; fluid pages drop that, so they set their own (otherwise the page
   cannot scroll at all). */
body.rb-fluid {
	overflow-x: hidden !important;
	overflow-y: auto !important;
}
/* Bootstrap rows hang 15px past the content area; on a fluid page that is 5px past the screen. */
.rb-fluid .content-wrapper > .row {
	margin-left: 0;
	margin-right: 0;
}
/* A Global Values page's column fills the content area. Content in the card
   design brings its own spacing; older content gets a margin. */
.rb-fluid .rb-page-col {
	float: none;
	width: 100%;
	margin-left: 0;
	padding: 0 4%;
}
.rb-fluid .rb-page-col:has(> .rb-docs) {
	padding-left: 0;
	padding-right: 0;
}
/* Pictures and tables in older content shrink to fit. */
.rb-fluid .rb-page-col img,
.rb-fluid .rb-portal-main img,
.rb-docs img {
	max-width: 100%;
	height: auto;
}
.rb-fluid .rb-page-col table {
	max-width: 100%;
}

/* ---- Portal menu ---------------------------------------------------------------
   A card with a blue heading beside the page. On fluid pages under 900px wide it
   moves above the page as a row of buttons. */
.rb-pnav-col {
	padding: 10px 6px 0 15px !important;
}
.rb-pnav {
	font-family: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
	background: none;
	text-indent: 0;
	/* Menu text never wraps, also while the menu opens or closes. */
	white-space: nowrap;
	overflow: hidden;
}
/* Title: the blue bar with its icon, rounded at the top. */
.rb-pnav .rb-pnav-head {
	background: #2495eb;
	color: #fff;
	border-radius: 8px 8px 0 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	padding: 12px 14px;
	margin-bottom: 2px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.rb-pnav .rb-pnav-title {
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
}
/* The outlined four-square icon, as in the Portal page's title. */
.rb-pnav .rb-pnav-icon {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	vertical-align: -3px;
	fill: none;
	stroke: #fff;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
/* Buttons in the bar: minimize (wide fluid pages) and menu (narrow fluid pages). */
.rb-pnav .rb-pnav-btn {
	display: none;
	flex: none;
	background: none;
	border: 0;
	border-radius: 4px;
	color: #fff;
	font-size: 17px;
	line-height: 1;
	padding: 2px 6px;
	cursor: pointer;
}
.rb-pnav .rb-pnav-btn:hover {
	background: rgba(255,255,255,.18);
}
.rb-pnav .rb-pnav-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 1px;
}
/* Items: square blocks with thin white gaps, in the RoboPlay Challenge menu's
   colors: light yellow, a deeper yellow on hover, the site's yellow for the current page. */
#rb-pnav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
#rb-pnav li {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
}
#rb-pnav a {
	display: block;
	padding: 6.5px 16px;
	border-radius: 0;
	background: #FFECB2;
	color: #022851;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}
/* Menu items show text only (the icons are in the template, hidden here). */
#rb-pnav a .fa {
	display: none;
}
#rb-pnav a:hover,
#rb-pnav a:focus-visible {
	background: #FFD24C;
	color: #022851;
}
#rb-pnav a:focus-visible {
	outline: 2px solid #022851;
	outline-offset: 1px;
}
#rb-pnav li.current_page_item > a {
	background: #FFBF00;
	color: #022851;
}
/* A count beside an item (e.g. pending shared classes), and a gap before a group of items. */
#rb-pnav .rb-pnav-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 7px;
	border-radius: 10px;
	background: #2495eb;
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	vertical-align: 1px;
}
#rb-pnav li.rb-pnav-group {
	margin-top: 8px;
}

/* Wide fluid pages: menu at a fixed width, the page fills the rest. */
@media (min-width: 901px) {
	.rb-fluid .content-wrapper > .row:has(> .rb-pnav-col) {
		display: flex;
		align-items: flex-start;
	}
	.rb-fluid .content-wrapper > .row:has(> .rb-pnav-col)::before,
	.rb-fluid .content-wrapper > .row:has(> .rb-pnav-col)::after {
		display: none;
	}
	.rb-fluid .rb-pnav-col {
		flex: 0 0 270px;
		width: 270px;
		position: sticky;
		top: 0;
		transition: flex-basis .25s ease, width .25s ease;
	}
	/* Minimized: only a thin strip the height of the bar, with an arrow to open it. */
	.rb-fluid .rb-pnav .rb-pnav-collapse {
		display: inline-block;
	}
	.rb-fluid .rb-pnav-col.rb-pnav-collapsed {
		flex-basis: 50px;
		width: 50px;
		padding-right: 0 !important;
	}
	.rb-fluid .rb-pnav-collapsed .rb-pnav-title,
	.rb-fluid .rb-pnav-collapsed #rb-pnav ul {
		display: none;
	}
	.rb-fluid .rb-pnav-collapsed .rb-pnav .rb-pnav-head {
		justify-content: center;
		padding: 12px 0;
		border-radius: 8px;
	}
	.rb-fluid .rb-pnav-collapsed .rb-pnav-collapse .fa {
		transform: rotate(180deg);
	}
	.rb-fluid .content-wrapper > .row:has(> .rb-pnav-col) > [class*='col-xs-']:not(.rb-pnav-col) {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
		float: none;
		margin-left: 0;
	}
	.rb-fluid .content-wrapper > .row:has(> .rb-pnav-col) > .rb-portal-main[class*='col-xs-']:not(.rb-pnav-col) {
		margin-left: 15px;
		margin-right: 15px;
	}
}
/* Narrow fluid pages: everything stacks; the menu becomes a row of buttons. */
@media (max-width: 900px) {
	.rb-fluid .content-wrapper > .row > [class*='col-xs-'] {
		float: none;
		width: 100%;
		margin-left: 0;
	}
	.rb-fluid .rb-pnav-col {
		padding: 6px 15px 4px !important;
	}
	.rb-fluid .rb-pnav .rb-pnav-head {
		font-size: 14px;
		padding: 9px 12px;
		border-radius: 8px;
		margin-bottom: 0;
	}
	.rb-fluid #rb-pnav.rb-pnav-open .rb-pnav-head {
		border-radius: 8px 8px 0 0;
		margin-bottom: 2px;
	}
	.rb-fluid .rb-pnav .rb-pnav-burger {
		display: inline-block;
	}
	.rb-fluid #rb-pnav ul {
		display: none;
	}
	.rb-fluid #rb-pnav.rb-pnav-open ul {
		display: flex;
	}
}

/* Phones: the menu button sits at the right end of the page's blue title bar
   (added by the menu's script), and the menu opens under that bar. The Portal
   Menu bar itself is hidden then; pages without a title bar keep it. */
.rb-title-burger {
	display: none;
	flex: none;
	margin-left: auto;
	background: #FFECB2;
	border: 0;
	border-radius: 6px;
	color: #022851;
	font-size: 18px;
	line-height: 1;
	padding: 6px 9px;
	cursor: pointer;
}
.rb-title-burger:hover {
	background: #FFD24C;
}
.rb-title-burger:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 1px;
}
@media (max-width: 900px) {
	.rb-fluid .rb-title-burger {
		display: inline-block;
	}
	.rb-fluid .rb-pnav-col.rb-pnav-empty {
		display: none;
	}
	.rb-fluid #rb-pnav.rb-pnav-in-page .rb-pnav-head {
		display: none;
	}
	/* Open: full width of the page card, just under its title bar. */
	.rb-fluid #rb-pnav.rb-pnav-in-page.rb-pnav-open {
		margin: -18px -24px 20px;
	}
	.rb-fluid .rb-docs-inner > #rb-pnav.rb-pnav-in-page.rb-pnav-open {
		margin: 2px 0 0;
	}
}

/* ---- Portal page column ------------------------------------------------------------
   A white card whose first line is the blue heading (rb_portal_title()). */
.rb-portal-main {
	background: #fff;
	border: 1px solid #E1E7ED;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(18,58,99,.10);
	padding: 0 24px 24px;
	margin: 10px 15px 30px;
}
/* A card that starts with its blue title has no top border, so the title starts at
   the card's top edge, level with the top of the menu's bar. */
.rb-portal-main:has(> .rb-portal-title:first-child),
.rb-docs .rb-docs-inner:has(> .rb-docs-heading:first-child) {
	border-top: 0;
}
/* Same edges as the Portal and Overview cards, which sit inside a padded column. */
.rb-fluid .content-wrapper > .row > .rb-portal-main[class*='col-xs-'] {
	width: auto;
	margin-left: 15px;
	margin-right: 15px;
}
.rb-portal-main > h3.rb-portal-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	margin: 0 -24px 20px;
	padding: 17.3px 24px; /* 67px tall, the same as the other page title bars */
	background: #2495eb;
	border-radius: 8px 8px 0 0;
	color: #fff !important;
	font-family: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
	font-size: 24px !important;
	font-weight: 700;
	line-height: 1.35;
}
.rb-portal-title > .fa {
	font-size: 24px;
}
.rb-portal-title .rb-portal-title-text {
	flex: 0 1 auto;
	min-width: 0;
}
.rb-portal-title .rb-portal-title-note {
	flex-basis: 100%;
	color: #DCE7F7;
	font-size: 14px !important;
	font-weight: 400;
}
/* Buttons side by side get a gap (joined button groups stay joined). */
.rb-portal-main .btn + .btn:not(.btn-group > .btn),
.rb-portal-main .btn + .btn-group,
.rb-portal-main .btn-group + .btn {
	margin-left: 8px;
}

/* ---- Card pages (.rb-cards) --------------------------------------------------------
   A main column whose boxes (AdminLTE .box) become white cards with a gray heading,
   e.g. My Classes. Their own markup is unchanged. */
.rb-cards {
	padding-top: 10px;
}
.rb-cards > .box.box-solid {
	margin: 0 0 24px;
	background: #fff;
	border: 1px solid #E1E7ED;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(18,58,99,.10);
}
.rb-cards > .box.box-solid > .box-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	/* Exactly as tall as the menu's bar beside it, and level with it: it covers
	   the card's 1px border instead of sitting inside it. */
	box-sizing: border-box;
	min-height: 46px;
	margin: -1px -1px 0;
	padding: 0 24px;
	background: #DDE2E8 !important;
	border: 0;
	border-radius: 8px 8px 0 0;
	color: #1F2D3D;
}
/* Bootstrap's clearfix pieces would be extra flex items (an extra gap before the title). */
.rb-cards > .box.box-solid > .box-header::before,
.rb-cards > .box.box-solid > .box-header::after {
	display: none;
}
.rb-cards > .box > .box-header .box-title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: #1F2D3D;
	font-family: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
}
.rb-cards > .box > .box-header > .pull-right {
	float: none !important;
	margin-left: auto;
}
.rb-cards > .box > .box-body {
	padding: 20px 24px 24px;
}
.rb-cards .btn + .btn:not(.btn-group > .btn),
.rb-cards .btn + .btn-group,
.rb-cards .btn-group + .btn {
	margin-left: 8px;
}
.rb-cards .btn {
	font-family: sans-serif !important;
}
/* A toolbar row (e.g. Show Archived with its buttons): wraps with even gaps. */
.rb-cards .flexBox {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
}
.rb-cards .flexBox > .flex-1 {
	white-space: nowrap;
}
.rb-cards .flexBox > div:not(.flex-1) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.rb-cards .flexBox > div:not(.flex-1) > .btn {
	margin-left: 0 !important;
}
/* Buttons stacked in a column (btn-group-vertical) get no side gap; a cell's
   columns of buttons line up side by side, each button as wide as its column. */
.rb-cards .btn-group-vertical > .btn {
	margin-left: 0 !important;
}
.rb-cards td > div:has(> .btn-group-vertical) {
	display: flex;
	align-items: flex-start;
	gap: 4px;
}
.rb-cards td .btn-group-vertical {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.rb-cards td .btn-group-vertical > .btn {
	width: 100%;
	margin: 0 !important;
	border-radius: 5px !important;
}
/* Tables: a date range may break after its dash, so the table fits a laptop screen. */
.rb-cards table.table td.text-nowrap:not(:first-child) {
	white-space: normal !important;
}
.rb-cards table.table > thead > tr > th {
	vertical-align: bottom;
}

/* Sharing pages (Shared/Sharing Classes and Assignments, .rb-sharing): each box sits in
   its own col-xs-12 holder (inside a .row), so the .rb-cards rules above (direct
   children) miss it; the same white card with the gray heading, as on My Classes. */
.rb-sharing > .row {
	margin-left: 0;
	margin-right: 0;
}
.rb-sharing .col-xs-12:has(> .box) {
	float: none;
	width: auto;
	padding: 0;
}
.rb-sharing .col-xs-12 > .box.box-solid {
	margin: 0 0 24px;
	background: #fff;
	border: 1px solid #E1E7ED;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(18,58,99,.10);
}
.rb-sharing .col-xs-12 > .box.box-solid > .box-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	box-sizing: border-box;
	min-height: 46px;
	margin: -1px -1px 0;
	padding: 0 24px;
	background: #DDE2E8 !important;
	border: 0;
	border-radius: 8px 8px 0 0;
	color: #1F2D3D;
}
.rb-sharing .col-xs-12 > .box.box-solid > .box-header::before,
.rb-sharing .col-xs-12 > .box.box-solid > .box-header::after {
	display: none;
}
.rb-sharing .col-xs-12 > .box > .box-header .box-title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: #1F2D3D;
	font-family: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
}
.rb-sharing .col-xs-12 > .box > .box-body {
	padding: 20px 24px 24px;
}

.rb-empty-note {
	margin: 0;
	color: #52677C;
	font-size: 15px;
}

/* A table too wide for its card (js/rb-cards.js adds rb-table-cards): each row is
   a small card; every cell shows its column's name (data-label), the first cell
   is the card's title. */
.rb-cards table.table.rb-table-cards,
.rb-cards table.table.rb-table-cards > tbody {
	display: block;
	width: 100% !important;
	border: 0;
}
.rb-cards table.table.rb-table-cards > tbody {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: 12px;
	align-items: start;
}
.rb-cards table.table.rb-table-cards > thead {
	display: none;
}
.rb-cards table.table.rb-table-cards > tbody > tr:not(.archived) {
	display: block;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid #E1E7ED;
	border-radius: 8px;
	background: #fff;
}
.rb-cards table.table.rb-table-cards > tbody > tr.bg-closed {
	background: #F3F4F6;
}
/* A full-width row (e.g. Show Archived Classes) is just its button, not a card. */
.rb-cards table.table.rb-table-cards > tbody > tr:has(> td[colspan]:only-child) {
	grid-column: 1 / -1;
	padding: 0;
	border: 0;
	background: none;
}
.rb-cards table.table.rb-table-cards > tbody > tr > td[colspan]:only-child {
	border-bottom: 0 !important;
	font-size: inherit;
}
.rb-cards table.table.rb-table-cards > tbody > tr > td {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	justify-items: start;
	padding: 5px 0 !important;
	border: 0 !important;
	white-space: normal !important;
}
.rb-cards table.table.rb-table-cards > tbody > tr > td::before {
	content: attr(data-label);
	color: #5B6B7B;
	font-weight: 600;
	font-size: 13px;
}
.rb-cards table.table.rb-table-cards > tbody > tr > td:not([data-label])::before,
.rb-cards table.table.rb-table-cards > tbody > tr > td[data-label='']::before {
	display: none;
}
.rb-cards table.table.rb-table-cards > tbody > tr > td:not([data-label]) {
	display: block;
}
/* The first cell (the class) is the card's title. */
.rb-cards table.table.rb-table-cards > tbody > tr > td:first-child {
	display: block;
	padding-bottom: 8px !important;
	margin-bottom: 4px;
	border-bottom: 1px solid #EEF2F6 !important;
	font-size: 16px;
	font-weight: 700;
}
.rb-cards table.table.rb-table-cards > tbody > tr > td:first-child::before {
	display: none;
}
.rb-cards table.table.rb-table-cards > tbody > tr > td:empty {
	display: none;
}
/* Buttons in a card wrap onto more lines when they need to. */
.rb-cards table.rb-table-cards td > div:has(> .btn-group-vertical) {
	flex-wrap: wrap;
}

@media (max-width: 900px) {
	/* The menu opens under the first card's heading. */
	.rb-fluid .rb-cards > .box > #rb-pnav.rb-pnav-in-page.rb-pnav-open {
		margin: 2px 0 0;
	}
}
@media (max-width: 680px) {
	.rb-cards > .box.box-solid > .box-header {
		min-height: 0;
		padding: 7px 16px;
	}
	.rb-cards > .box > .box-header .box-title {
		font-size: 19px;
	}
	.rb-cards > .box > .box-body {
		padding: 16px;
	}
}

/* A message shown beside the Portal menu instead of a page (e.g. "You must login"):
   the same card and spacing as a page, so it never touches the menu. */
.rb-fluid .content-wrapper > .row:has(> .rb-pnav-col) > :is(h1, h2, h3, h4, p, div):not([class*='col-xs-']):not(.modal) {
	flex: 1 1 0;
	min-width: 0;
	margin: 10px 15px 30px;
	padding: 20px 24px;
	background: #fff;
	border: 1px solid #E1E7ED;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(18,58,99,.10);
}

/* A dropdown with its button: side by side with a gap, the button below on narrow screens. */
.rb-portal-main .rb-select-action {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
}
.rb-portal-main .rb-select-action > .form-group {
	flex: 1 1 280px;
	max-width: 640px;
	margin: 0;
}
.rb-portal-main .rb-select-action > select,
.rb-portal-main .rb-select-action > .select2-container {
	flex: 1 1 280px;
	min-width: 0;
	max-width: 640px;
}
.rb-portal-main .rb-select-action > .btn {
	flex: none;
	margin-left: 0 !important;
}

/* Site Administration: the menu boxes become cards in a grid; links are rows. */
.rb-admin-menus {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	align-items: start;
	margin: 0;
}
.rb-admin-menus::before,
.rb-admin-menus::after {
	display: none;
}
.rb-admin-menus > [class*='col-xs-'] {
	float: none;
	width: auto;
	padding: 0;
}
.rb-admin-menus .box.box-solid {
	margin: 0;
	border: 1px solid #E1E7ED;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(18,58,99,.10);
	overflow: hidden;
	background: #fff;
}
.rb-admin-menus .box.box-solid > .box-header {
	background: #F3F6FA;
	border-bottom: 1px solid #E1E7ED;
	color: #123A63;
	padding: 12px 16px;
}
.rb-admin-menus .box.box-solid > .box-header .box-title {
	font-family: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #123A63;
}
.rb-admin-menus .box.box-solid > .box-header .box-title::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 16px;
	margin-right: 10px;
	vertical-align: -2px;
	border-radius: 2px;
	background: #FFCC33;
}
.rb-admin-menus .nav-stacked > li {
	border: 0 !important;
	border-top: 1px solid #EEF2F6 !important;
	margin: 0;
}
.rb-admin-menus .nav-stacked > li:first-child {
	border-top: 0 !important;
}
.rb-admin-menus .nav-stacked > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 16px;
	border: 0;
	border-radius: 0;
	color: #2495eb;
	font-weight: 600;
	font-size: 14px;
}
.rb-admin-menus .nav-stacked > li > a::after {
	content: '\203A';
	flex: none;
	color: #9AAABB;
	font-size: 18px;
	line-height: 1;
}
.rb-admin-menus .nav-stacked > li > a:hover,
.rb-admin-menus .nav-stacked > li > a:focus-visible {
	background: #EAF1FB;
	color: #022851;
}

/* Tables scroll inside the card rather than widening the page. */
.rb-fluid .rb-portal-main .dataTables_wrapper,
.rb-fluid .rb-portal-main .table-responsive {
	overflow-x: auto;
}
@media (max-width: 900px) {
	.rb-fluid .rb-portal-main table.table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
	}
}
@media (max-width: 680px) {
	.rb-portal-main {
		padding: 0 14px 18px;
	}
	.rb-fluid #rb-pnav.rb-pnav-in-page.rb-pnav-open {
		margin: -14px -14px 16px;
	}
	.rb-portal-main > h3.rb-portal-title {
		margin: 0 -14px 16px;
		padding: 13.15px 16px; /* 56.8px with the menu button, like the other title bars */
		font-size: 21px !important;
	}
	/* Side-by-side form fields and boxes stack. */
	.rb-fluid .rb-portal-main .row > [class*='col-xs-'] {
		float: none;
		width: 100%;
		margin-left: 0;
	}
	.rb-fluid .rb-portal-main .text-right {
		text-align: left;
	}
}

/* ---- The design (Mary's rules, same values) ----------------------------------- */
/* The site's colors, also over a copy of Mary's rules inside a page's content
   (e.g. the Documents page), hence "html" in front. */
/* Blue title bars end in a swoop on the right, as on the curriculum front page: a thin
   yellow ribbon with the waves right under it (no blue between), fading in from the left.
   It keeps its own proportions (contain) and never crops. Drawn inline (the server doesn't serve .svg files from img/). */
.rb-portal-main > h3.rb-portal-title,
html .rb-docs .rb-docs-heading {
	background: #2495eb;
}
/* The swoop fills the room the title leaves on the right (a flex item after it), so it
   never runs under the words; it reaches the bar's top, right and bottom edges. */
.rb-portal-main > h3.rb-portal-title::after,
html .rb-docs .rb-docs-heading::after {
	content: '';
	flex: 1 1 0;
	min-width: 0;
	align-self: stretch;
	margin: -17.3px -24px -17.3px 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 100' preserveAspectRatio='xMaxYMid slice'%3E%3Cdefs%3E%3ClinearGradient id='teal' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%231a9bf0' stop-opacity='0'/%3E%3Cstop offset='0.35' stop-color='%231fa8f2' stop-opacity='0.55'/%3E%3Cstop offset='1' stop-color='%232fd0ff'/%3E%3C/linearGradient%3E%3ClinearGradient id='teal2' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%2343c2ff' stop-opacity='0'/%3E%3Cstop offset='0.5' stop-color='%2343c2ff' stop-opacity='0.35'/%3E%3Cstop offset='1' stop-color='%237fdcff' stop-opacity='0.6'/%3E%3C/linearGradient%3E%3ClinearGradient id='gold' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23ffbf00' stop-opacity='0'/%3E%3Cstop offset='0.3' stop-color='%23ffbf00'/%3E%3Cstop offset='1' stop-color='%23ffd966'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M236 100 C444 97 612 66 800 28 L800 100 Z' fill='url(%23teal2)'/%3E%3Cpath d='M260 100 C470 96 640 72 800 52 L800 100 Z' fill='url(%23teal)'/%3E%3Cpath d='M230 100 C440 92 610 58 800 22 L800 28.5 C612 66.5 444 97.5 236 100 Z' fill='url(%23gold)'/%3E%3C/svg%3E") right bottom / contain no-repeat;
}
html .rb-docs .rb-docs-heading::after {
	margin-top: -16px;
	margin-bottom: -16px;
}
/* A note under the title (its own line) stays after the swoop. */
.rb-portal-title .rb-portal-title-note {
	order: 2;
}
@media (max-width: 680px) {
	.rb-portal-main > h3.rb-portal-title::after {
		margin: -13.15px -16px -13.15px 0;
	}
	html .rb-docs .rb-docs-heading::after {
		margin: -13px -20px -13px 0;
	}
}
html .rb-docs {
	--rb-blue: #2495eb;
	--rb-link: #2495eb;
}
.rb-docs, .rb-docs * { box-sizing: border-box; }
.rb-docs {
	--rb-blue: #2495eb;
	--rb-navy: #123A63;
	--rb-link: #2495eb;
	--rb-muted: #52677C;
	--rb-line: #E1E7ED;
	--rb-yellow: #FFCC33;
	/* Roboto is built into Chromebooks and Android; elsewhere the device's own UI font. */
	font-family: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important;
	color: var(--rb-navy);
	background: #FFFFFF !important;
	background-image: none !important;
	padding: 25px 100px 40px;
	width: 100%;
}
/* Beside the portal sidebar the page is already narrower: less side padding. */
.rb-docs.rb-docs-tight { padding: 10px 0 30px; }
.rb-docs .rb-docs-inner { width: 100%; max-width: none; margin: 0; overflow: hidden; border: 1px solid var(--rb-line); border-radius: 8px; background: #FFFFFF !important; box-shadow: 0 4px 14px rgba(18,58,99,.10); }
.rb-docs .rb-docs-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; background: var(--rb-blue); color: #fff !important; border-radius: 0; padding: 20px 24px; margin: 0; font-size: 25px !important; line-height: 1.4; font-weight: 700; }
html .rb-docs .rb-docs-heading { padding-top: 16px; padding-bottom: 16px; }
.rb-docs .rb-docs-heading svg { flex: none; width: 26px; height: 26px; stroke: #FFFFFF !important; fill: none !important; color: #FFFFFF !important; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rb-docs .rb-docs-heading svg * { stroke: #FFFFFF !important; fill: none !important; }
.rb-docs .rb-docs-intro { color: var(--rb-muted) !important; font-size: 14px !important; line-height: 1.7; margin: 0; padding: 24px 24px 0; }
.rb-docs .rb-docs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; padding: 20px; background: #FFFFFF !important; }
.rb-docs .rb-docs-grid.rb-docs-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rb-docs .rb-docs-card { min-width: 0; background: #fff !important; border: 1px solid var(--rb-line); border-radius: 8px; box-shadow: 0 4px 14px rgba(18,58,99,.10); padding: 20px 20px 22px; }
.rb-docs .rb-docs-card.rb-docs-card-wide { grid-column: 1 / -1; }
.rb-docs .rb-docs-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rb-docs .rb-docs-icon { flex: 0 0 43px; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 9px; background: var(--rb-yellow); color: #022851; }
.rb-docs .rb-docs-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rb-docs .rb-docs-card h3 { padding: 0; margin: 0; color: var(--rb-navy) !important; font-size: 17px !important; font-weight: 700; line-height: 1.35; }
.rb-docs .rb-docs-links { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.rb-docs .rb-docs-links li { padding: 0; margin: 0; line-height: 1.45; }
.rb-docs .rb-docs-links a { display: inline; color: var(--rb-link) !important; font-size: 14px !important; font-weight: 600; text-decoration: none !important; overflow-wrap: anywhere; }
.rb-docs .rb-docs-links a:hover, .rb-docs .rb-docs-links a:focus-visible { text-decoration: underline !important; color: var(--rb-blue) !important; }
.rb-docs .rb-docs-links .rb-ext { display: inline-block; margin-left: 4px; font-size: 13px; vertical-align: baseline; color: var(--rb-link); }
.rb-docs .rb-docs-links .rb-detail { display: block; padding-top: 2px; color: var(--rb-muted); font-size: 12px; font-weight: 400; }
.rb-docs .rb-docs-links a:focus-visible { outline: 2px solid var(--rb-blue); outline-offset: 3px; }

/* ---- Text cards, labels and steps (for pages like Overview) ------------------- */
.rb-docs .rb-docs-text { font-size: 14px; line-height: 1.65; color: #2c4157; }
.rb-docs .rb-docs-text p { margin: 0 0 10px; }
.rb-docs .rb-docs-text p:last-child { margin-bottom: 0; }
.rb-docs .rb-docs-text ul { margin: 0 0 10px; padding-left: 20px; }
.rb-docs .rb-docs-text li { margin-bottom: 6px; }
.rb-docs .rb-docs-text a { color: var(--rb-link); font-weight: 600; }
.rb-docs .rb-chip { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #EAF1FB; color: var(--rb-blue); font-weight: 700; font-size: 13px; white-space: nowrap; }
.rb-docs .rb-chip.rb-chip-orange { background: #e67e22; color: #fff; }
.rb-docs .rb-chip.rb-chip-blue { background: #2495eb; color: #fff; }
a.rb-chip, a.rb-chip:hover, a.rb-chip:focus { text-decoration: none; }
.rb-docs a.rb-chip:hover, .rb-docs a.rb-chip:focus { filter: brightness(0.92); }
.rb-docs .rb-docs-label { color: #b8860b; font-weight: 700; }
.rb-docs .rb-docs-highlight { background: #ffff99; padding: 0 3px; }
/* An intro with more than one paragraph or a picture. */
.rb-docs .rb-docs-intro + .rb-docs-intro { padding-top: 10px; }
.rb-docs div.rb-docs-intro p { margin: 0 0 10px; }
.rb-docs .rb-docs-links + .rb-docs-text-after { margin-top: 14px; }
/* One line at every width: the row is sized in em and its font follows the row's width
   (14px when there is room, smaller on narrow screens), so it shrinks as a whole. */
.rb-docs .rb-docs-steps { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; container-type: inline-size; }
.rb-docs .rb-docs-steps li { flex: none; font-size: min(14px, 2.3cqi); white-space: nowrap; }
/* Steps are labels, not links: black text. The arrow sits between the ovals, outside them. */
.rb-docs .rb-docs-steps li { position: relative; padding: 0.43em 1em; border-radius: 999px; background: #EAF1FB; color: #000; font-weight: 700; }
.rb-docs .rb-docs-steps li + li { margin-left: 2.14em; }
.rb-docs .rb-docs-steps li + li::before { content: '\2192'; position: absolute; left: -1.6em; top: 50%; transform: translateY(-50%); color: #000; font-weight: 400; }
/* Free content under the heading (e.g. the Portal's legend and activity tiles). */
.rb-docs .rb-docs-body { padding: 20px 24px 24px; }

/* ---- Lists of dated cards, pictures and buttons (Announcements, Download) ------- */
.rb-docs .rb-docs-grid.rb-docs-grid-1 { grid-template-columns: minmax(0, 1fr); }
.rb-docs .rb-docs-date { display: inline-block; margin-bottom: 4px; padding: 2px 8px; border-radius: 6px; background: #FFF4DA; color: #7A5300; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.rb-docs .rb-docs-card-head .rb-docs-card-title { min-width: 0; }
.rb-docs .rb-docs-figure { margin: 14px 0; text-align: center; }
.rb-docs .rb-docs-figure img { display: inline-block; max-width: 100%; height: auto; border: 1px solid var(--rb-line); border-radius: 6px; }
.rb-docs .rb-docs-figure-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.rb-docs .rb-docs-figure-row img { flex: 1 1 260px; max-width: 520px; min-width: 0; }
.rb-docs .rb-docs-text h4 { margin: 14px 0 6px; color: var(--rb-navy); font-size: 15px; font-weight: 700; }
.rb-docs .rb-docs-text ul ul { margin: 6px 0 0; }
.rb-docs .rb-docs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 18px 24px 0; }
/* Buttons, form fields and labels keep the site's standard look (btn btn-barobo, its font). */
.rb-docs .btn, .rb-docs button, .rb-docs input, .rb-docs select, .rb-docs textarea, .rb-pnav-col ~ * .btn { font-family: sans-serif !important; }
.rb-docs .rb-docs-actions .rb-docs-note { color: var(--rb-muted); font-size: 13px; }
.rb-docs .rb-docs-actions .rb-docs-note a { color: var(--rb-link); font-weight: 600; }

/* Code, a list of addresses, and a fold-out section (Downloads). */
.rb-docs code { padding: 1px 5px; border-radius: 4px; background: #F3F6FA; border: 1px solid var(--rb-line); color: #123A63; font-size: 12.5px; white-space: normal; overflow-wrap: anywhere; }
.rb-docs .rb-docs-text ul.rb-docs-code-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; padding-left: 0; list-style: none; }
.rb-docs .rb-docs-text ul.rb-docs-code-list li { margin: 0; font-family: Menlo, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
.rb-docs .rb-docs-text + .rb-docs-links { margin-top: 14px; }
.rb-docs .rb-docs-details { margin-top: 14px; border: 1px solid var(--rb-line); border-radius: 8px; padding: 10px 14px; background: #FAFCFE; }
.rb-docs .rb-docs-details summary { cursor: pointer; color: var(--rb-navy); font-weight: 700; }
.rb-docs .rb-docs-details[open] summary { margin-bottom: 8px; }

/* ---- Narrower screens (Mary's breakpoints) ------------------------------------ */
@media (max-width: 1100px) { .rb-docs { padding: 25px 48px 35px; } .rb-docs.rb-docs-tight { padding: 10px 0 30px; } }
@media (max-width: 1050px) { .rb-docs .rb-docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
	.rb-docs { padding: 20px 12px 30px; }
	.rb-docs.rb-docs-tight { padding: 6px 0 24px; }
	.rb-docs .rb-docs-heading { padding: 16px 20px; font-size: 22px !important; }
	html .rb-docs .rb-docs-heading { padding-top: 13px; padding-bottom: 13px; }
	.rb-docs .rb-docs-intro { padding: 18px 16px 0; font-size: 15px !important; }
	.rb-docs .rb-docs-grid, .rb-docs .rb-docs-grid.rb-docs-grid-2 { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
	.rb-docs .rb-docs-card { padding: 17px; }
	.rb-docs .rb-docs-links a { font-size: 15px !important; }
	.rb-docs .rb-docs-body { padding: 16px; }
	.rb-docs .rb-docs-actions { padding: 16px 16px 0; }
}

/* ---- Portal page ---------------------------------------------------------------
   Activity tiles come in rows of five (portal/js/portal.js pads short rows with
   empty boxes). On narrow screens each row becomes a grid of equal tiles that
   wraps, instead of squeezing five across. The text-nowrap legend may scroll. */
@media (max-width: 900px) {
	.rb-fluid .rb-docs .portalRow { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
	.rb-fluid .rb-docs .portalItemContainer:empty { display: none; }
}
.rb-fluid .rb-docs .rb-docs-body .text-nowrap { overflow-x: auto; }
.rb-fluid .rb-docs .rb-docs-intro a { color: var(--rb-link); font-weight: 600; }

/* Card rows: long values (email addresses) wrap inside the card. */
.rb-cards table.table.rb-table-cards > tbody > tr > td {
	overflow-wrap: anywhere;
}
