/**
 * BuddyBoss overrides.
 *
 * Most brand colour comes free from the --bb-* mapping in tokens.css. What is
 * left here is shape and type: BuddyBoss defaults to smaller radii and its own
 * font stack, and the RCM design uses rounder cards and the Jakarta/DM pairing.
 */

.buddypanel,
.site-header,
.bb-single-course-sidebar {
	font-family: var(--rcm-font-sans);
}

/* ----------------------------------------------------------- site header */

.site-header .site-title,
.site-header .bb-logo {
	font-family: var(--rcm-font-display);
	letter-spacing: -0.03em;
}

.site-header .header-aside .button.small,
.site-header .bb-header-buttons .button {
	border-radius: var(--rcm-radius);
	font-weight: 600;
}

/* The registration CTA is BuddyBoss's own .signup button, relabelled to
   "Join now" in inc/buddyboss.php. It carries gold because it is the primary
   conversion on the marketing site; everything else in the header stays navy. */
.site-header .bb-header-buttons .button.signup {
	background: var(--rcm-gold);
	border-color: var(--rcm-gold);
	color: var(--rcm-gold-fg);
	border-radius: var(--rcm-radius);
	font-weight: 600;
}

.site-header .bb-header-buttons .button.signup:hover,
.site-header .bb-header-buttons .button.signup:focus {
	background: var(--rcm-gold-bright);
	border-color: var(--rcm-gold-bright);
	color: var(--rcm-gold-fg);
}

.site-header .bb-header-buttons .signin-button {
	border-radius: var(--rcm-radius);
	font-weight: 600;
}

/* ---------------------------------------------------------- cards, lists */

.bb-card,
.bs-item-wrap,
.bb-grid-item,
#buddypress .bb-card {
	border-radius: var(--rcm-radius-lg);
	border-color: var(--rcm-border);
}

#buddypress .standard-form input[type="text"],
#buddypress .standard-form input[type="email"],
#buddypress .standard-form input[type="password"],
#buddypress .standard-form textarea,
#buddypress .standard-form select,
.bb-search-input {
	border-radius: var(--rcm-radius);
	border-color: var(--rcm-border);
}

/* ------------------------------------------------------------- profile */

#buddypress .bb-profile-header,
.bb-profile-cover-wrapper {
	border-radius: var(--rcm-radius-lg);
	overflow: hidden;
}

#buddypress div.item-list-tabs ul li.current a,
#buddypress div.item-list-tabs ul li.selected a,
.bb-primary-nav li.current a {
	color: var(--rcm-navy);
	box-shadow: inset 0 -2px 0 var(--rcm-navy);
}

/* --------------------------------------------------------------- groups */

/* Study groups map to BuddyBoss groups, so the group card gets the same
   treatment as a course card for visual consistency across the two areas. */
#buddypress .groups-list .bb-card,
#buddypress #groups-list .item-entry {
	border-radius: var(--rcm-radius-lg);
	border: 1px solid var(--rcm-border);
	background: var(--rcm-card);
}

.rcm-group-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.5rem;
}

/* --------------------------------------------------------------- forums */

#buddypress .bbp-topic-title,
#bbpress-forums .bbp-topic-permalink {
	font-family: var(--rcm-font-display);
	font-weight: 700;
	letter-spacing: -0.02em;
}

#bbpress-forums div.bbp-forum-header,
#bbpress-forums div.bbp-topic-header,
#bbpress-forums div.bbp-reply-header {
	background: var(--rcm-muted);
	border-color: var(--rcm-border);
}

/* --------------------------------------------------------- LMS sidebar */

/* BuddyBoss's course sidebar sits next to LearnDash content; align its radius
   and border with .rcm-card so the two never disagree by 4px. */
.bb-single-course-sidebar .bb-course-section,
.bb-lms-content .bb-card {
	border-radius: var(--rcm-radius-lg);
	border-color: var(--rcm-border);
}

.bb-course-progress-bar span {
	background: var(--rcm-navy);
}

/* ----------------------------------------------------------- dashboard */

.rcm-dashboard {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 64rem) {
	.rcm-dashboard {
		grid-template-columns: 2fr 1fr;
		align-items: start;
	}
}

.rcm-dashboard__panel {
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-lg);
	padding: 1.25rem;
}

.rcm-dashboard__panel > h2 {
	font-size: var(--rcm-text-xl);
	margin: 0 0 1rem;
}

/* Continue-learning card: the single most-used control in the student area. */
.rcm-continue {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.15rem 1.25rem;
	background: var(--rcm-navy-mid);
	border-radius: var(--rcm-radius-lg);
	color: #fff;
}

.rcm-continue h3 {
	color: #fff;
	margin: 0;
	font-size: var(--rcm-text-lg);
}

.rcm-continue p {
	margin: 0.15rem 0 0;
	color: rgb(255 255 255 / 0.7);
	font-size: var(--rcm-text-sm);
}

.rcm-continue .rcm-progress {
	background: rgb(255 255 255 / 0.2);
	width: min(100%, 12rem);
}

.rcm-continue .rcm-progress__bar {
	background: var(--rcm-gold);
}

/* =========================================================================
 * SITE CHROME — header, navigation, dropdowns, footer, auth
 *
 * All of this styles BuddyBoss's own markup. Nothing here forks a template:
 * the header, footer, navigation and login/register screens stay BuddyBoss's,
 * so plugin and theme updates keep working and only the paint is ours.
 *
 * Class names verified against buddyboss-theme/template-parts/header.php,
 * site-navigation.php, header-aside.php and footer.php.
 * ====================================================================== */

/* ----------------------------------------------------------- site header */

/* The mockup header is sticky, translucent and 3.5rem tall on phones, 4rem up.
   BuddyBoss's header height is a Theme Option (--bb-header-height), so set it
   there too; this is the visual treatment on top. */
.site-header {
	background: rgb(255 255 255 / 0.9);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgb(227 231 240 / 0.7);
}

/* Two-line brand lockup beside the mark, as in the mockup. BuddyBoss prints
   the tagline only if it is set under Theme Options → Logo. */
.site-header .site-title a,
.site-header .bb-logo a {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-sm);
	font-weight: 800;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: var(--rcm-navy);
	line-height: 1.15;
}

.site-header .site-description {
	font-size: var(--rcm-text-xs);
	font-weight: 500;
	letter-spacing: 0.01em;
	color: rgb(0 51 160 / 0.7);
}

/* --------------------------------------------------------- primary nav */

.main-navigation > ul > li > a,
.bb-primary-nav > li > a {
	font-size: var(--rcm-text-sm);
	font-weight: 600;
	color: var(--rcm-fg);
	border-radius: var(--rcm-radius);
	padding: 0.5rem 0.75rem;
	transition: background-color 0.16s ease, color 0.16s ease;
}

.main-navigation > ul > li > a:hover,
.bb-primary-nav > li > a:hover {
	background: var(--rcm-muted);
	color: var(--rcm-navy);
}

/* Active section gets navy text on a tinted pill rather than an underline —
   an underline reads as a link, a pill reads as "you are here". */
.main-navigation > ul > li.current-menu-item > a,
.main-navigation > ul > li.current-menu-ancestor > a,
.bb-primary-nav > li.current-menu-item > a {
	background: var(--rcm-navy-08);
	color: var(--rcm-navy);
}

/* ------------------------------------------------------------ dropdowns */

/* Covers the nav mega-menus, the account menu and the notification and
   message dropdowns — BuddyBoss renders all of them as .sub-menu. */
.main-navigation .sub-menu,
.header-aside .sub-menu,
.bb-dropdown,
.notification-dropdown,
.bb-messages-dropdown {
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-lg);
	box-shadow: var(--rcm-shadow-lift);
	padding: 0.4rem;
	min-width: 14rem;
}

.main-navigation .sub-menu a,
.header-aside .sub-menu a,
.bb-dropdown a {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--rcm-text-sm);
	font-weight: 500;
	color: var(--rcm-fg);
	padding: 0.55rem 0.7rem;
	border-radius: var(--rcm-radius-sm);
	line-height: 1.35;
}

.main-navigation .sub-menu a:hover,
.header-aside .sub-menu a:hover,
.bb-dropdown a:hover {
	background: var(--rcm-muted);
	color: var(--rcm-navy);
}

/* The mockup's mega-menus list programmes as "CPA — Certified Public
   Accountants", which wraps on narrow dropdowns. Let it wrap rather than
   truncating a qualification name. */
.main-navigation .sub-menu a {
	white-space: normal;
}

.main-navigation .sub-menu li.menu-item-has-children > a::after {
	color: var(--rcm-muted-fg);
}

/* Header dropdown headings and separators. */
.header-aside .sub-menu .dropdown-title,
.bb-dropdown .bb-dropdown-title {
	font-size: var(--rcm-text-xs);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rcm-muted-fg);
	padding: 0.5rem 0.7rem 0.35rem;
}

.header-aside .sub-menu li.bb-sep,
.bb-dropdown hr {
	border: 0;
	border-top: 1px solid var(--rcm-border);
	margin: 0.35rem 0;
}

/* ------------------------------------------------------- account avatar */

.header-aside .user-link,
.header-aside .user-wrap {
	border-radius: var(--rcm-radius-pill);
	padding: 0.2rem 0.5rem 0.2rem 0.2rem;
}

.header-aside .user-link:hover,
.header-aside .user-wrap:hover {
	background: var(--rcm-muted);
}

.header-aside .user-wrap .user-name,
.header-aside .user-link .user-name {
	font-size: var(--rcm-text-sm);
	font-weight: 600;
	color: var(--rcm-navy);
	max-width: 7rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Fallback initials avatar, matching the mockup when no photo is set. */
.header-aside .avatar {
	border-radius: 50%;
	object-fit: cover;
}

/* Search trigger in the header. */
.site-header .header-search-link {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	color: var(--rcm-navy);
}

.site-header .header-search-link:hover {
	background: var(--rcm-muted);
}

/* ------------------------------------------------------------- footer */

/* The mockup footer is navy-deep with gold column headings. BuddyBoss builds
   it from widget areas (area-1…area-6) plus a logo, socials and copyright row,
   all configured under Appearance → Widgets and Theme Options → Footer. */
.footer-widget-area.bb-footer,
.footer-bottom.bb-footer {
	background: var(--rcm-navy-deep);
	color: rgb(255 255 255 / 0.75);
}

.footer-widget-area.bb-footer .widget-title,
.footer-widget-area.bb-footer h2,
.footer-widget-area.bb-footer h3 {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-xs);
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--rcm-gold);
	margin-bottom: 1rem;
}

.footer-widget-area.bb-footer a,
.footer-bottom.bb-footer a {
	color: rgb(255 255 255 / 0.75);
	text-decoration: none;
}

.footer-widget-area.bb-footer a:hover,
.footer-bottom.bb-footer a:hover {
	color: #fff;
}

.footer-widget-area.bb-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-widget-area.bb-footer li {
	margin-bottom: 0.5rem;
	font-size: var(--rcm-text-sm);
	line-height: 1.5;
}

.footer-widget-area.bb-footer .footer-widget {
	margin-bottom: 2rem;
}

.footer-bottom.bb-footer {
	border-top: 1px solid rgb(255 255 255 / 0.12);
}

.footer-bottom.bb-footer .copyright,
.footer-bottom.bb-footer .footer-tagline,
.footer-bottom.bb-footer .footer-desc {
	font-size: var(--rcm-text-xs);
	color: rgb(255 255 255 / 0.6);
}

.footer-socials a {
	display: inline-grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.08);
	color: #fff;
	margin-right: 0.5rem;
	transition: background-color 0.16s ease;
}

.footer-socials a:hover {
	background: var(--rcm-gold);
	color: var(--rcm-gold-fg);
}

/* ----------------------------------------------------- login / register */

/* Covers wp-login.php, the BuddyBoss login widget and the BuddyPress
   registration screen. BuddyBoss generates its own login palette from Theme
   Options (inc/theme/login.php), so setting the colours there does most of the
   work; this is shape and type. */
body.login #login h1 a {
	background-size: contain;
	width: 100%;
	height: 4rem;
	margin-bottom: 1.5rem;
}

body.login form,
#buddypress .register-section,
#buddypress #signup-form,
.bb-login-form,
.bb-register-section {
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
	box-shadow: var(--rcm-shadow-soft);
	padding: clamp(1.5rem, 1rem + 2vw, 2rem);
}

body.login label,
#buddypress .register-section label,
#buddypress #signup-form label {
	font-size: var(--rcm-text-sm);
	font-weight: 600;
	color: var(--rcm-fg);
}

body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"],
#buddypress #signup-form input[type="text"],
#buddypress #signup-form input[type="email"],
#buddypress #signup-form input[type="password"] {
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius);
	padding: 0.7rem 0.9rem;
	font-size: var(--rcm-text-base);
	background: var(--rcm-bg);
	box-shadow: none;
}

body.login input:focus,
#buddypress #signup-form input:focus {
	border-color: var(--rcm-navy);
	box-shadow: 0 0 0 3px rgb(0 51 160 / 0.12);
	outline: none;
}

body.login .button-primary,
#buddypress #signup-form .button,
#buddypress .register-section .button {
	background: var(--rcm-navy);
	border-color: var(--rcm-navy);
	border-radius: var(--rcm-radius);
	color: #fff;
	font-family: var(--rcm-font-sans);
	font-weight: 600;
	text-shadow: none;
	box-shadow: none;
	padding: 0.7rem 1.4rem;
	height: auto;
}

body.login .button-primary:hover,
#buddypress #signup-form .button:hover {
	background: var(--rcm-navy-hover);
	border-color: var(--rcm-navy-hover);
}

body.login #backtoblog a,
body.login #nav a {
	color: var(--rcm-navy);
	font-weight: 600;
}

body.login {
	background: var(--rcm-bg);
	font-family: var(--rcm-font-sans);
}

/* =========================================================================
 * RCM FOOTER
 * Mockup layout: max-w-7xl, py-14, a 12-column grid split 4 / 2 / 3 / 3,
 * over a legal bar separated by a 10%-white rule.
 * ====================================================================== */

.rcm-footer {
	background: var(--rcm-navy-deep);
	color: #fff;
	margin-top: auto;
}

.rcm-footer__grid {
	max-width: var(--rcm-container);
	margin-inline: auto;
	padding: 3.5rem var(--rcm-gutter);
	display: grid;
	gap: 2.5rem;
}

@media (min-width: 40rem) {
	.rcm-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 64rem) {
	.rcm-footer__grid {
		grid-template-columns: 4fr 2fr 3fr 3fr;
	}
}

.rcm-footer__lockup {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.rcm-footer__lockup img {
	height: 3.5rem;
	width: auto;
}

.rcm-footer__name {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-lg);
	font-weight: 800;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: #fff;
	margin: 0;
}

.rcm-footer__tagline {
	font-size: var(--rcm-text-xs);
	color: rgb(255 255 255 / 0.7);
	margin: 0;
}

.rcm-footer__mission {
	margin: 1rem 0 0;
	max-width: 24rem;
	font-size: var(--rcm-text-sm);
	line-height: 1.65;
	color: rgb(255 255 255 / 0.75);
}

.rcm-footer__heading {
	font-size: var(--rcm-text-xs);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rcm-gold);
	margin: 0 0 0.75rem;
}

.rcm-footer__brand .rcm-footer__heading {
	margin-top: 1.25rem;
}

.rcm-footer__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* Inverse store badges: outlined on navy rather than solid white, so the
   footer does not end up with two bright blocks fighting the logo. */
.rcm-store--inverse {
	background: rgb(255 255 255 / 0.1);
	color: #fff;
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2);
}

.rcm-store--inverse:hover {
	background: rgb(255 255 255 / 0.2);
	color: #fff;
}

.rcm-footer__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.rcm-footer__socials a {
	border-radius: var(--rcm-radius-pill);
	background: rgb(255 255 255 / 0.1);
	padding: 0.375rem 0.75rem;
	font-size: var(--rcm-text-xs);
	font-weight: 600;
	color: #fff;
	text-decoration: none;
}

.rcm-footer__socials a:hover {
	background: rgb(255 255 255 / 0.2);
	color: #fff;
}

.rcm-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
	font-size: var(--rcm-text-sm);
}

.rcm-footer__list a {
	color: rgb(255 255 255 / 0.8);
	text-decoration: none;
}

.rcm-footer__list a:hover {
	color: #fff;
}

.rcm-footer__list--contact {
	gap: 0.75rem;
	color: rgb(255 255 255 / 0.8);
}

.rcm-footer__list--contact li {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	line-height: 1.5;
}

.rcm-footer__list--contact .rcm-icon {
	color: var(--rcm-gold);
	width: 1rem;
	height: 1rem;
	margin-top: 0.15rem;
}

.rcm-footer__list--contact a {
	margin-right: 0.5rem;
}

.rcm-footer__paybills {
	margin-top: 1rem;
	padding: 0.75rem;
	border-radius: var(--rcm-radius-lg);
	background: rgb(255 255 255 / 0.1);
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
	font-size: var(--rcm-text-xs);
	color: rgb(255 255 255 / 0.8);
}

.rcm-footer__paybills p {
	margin: 0.25rem 0 0;
}

.rcm-footer__paybills-title {
	font-weight: 600;
	color: var(--rcm-gold);
	margin: 0 !important;
}

.rcm-footer__bar {
	border-top: 1px solid rgb(255 255 255 / 0.1);
}

.rcm-footer__bar-inner {
	max-width: var(--rcm-container);
	margin-inline: auto;
	padding: 1.25rem var(--rcm-gutter);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	font-size: var(--rcm-text-xs);
	color: rgb(255 255 255 / 0.55);
}

.rcm-footer__bar-inner p {
	margin: 0;
}

@media (min-width: 40rem) {
	.rcm-footer__bar-inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.rcm-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
}

.rcm-footer__legal a {
	color: rgb(255 255 255 / 0.55);
	text-decoration: none;
}

.rcm-footer__legal a:hover {
	color: #fff;
}

/* =========================================================================
 * RCM HEADER
 * Sticky, 3.5rem tall (4rem from sm), max-w-7xl, translucent card with blur.
 * Logo lockup left, centred nav with mega-menus, actions right.
 * ====================================================================== */

.rcm-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid rgb(227 231 240 / 0.7);
	background: rgb(255 255 255 / 0.9);
	backdrop-filter: blur(12px);
}

.rcm-header__bar {
	max-width: var(--rcm-container);
	margin-inline: auto;
	padding-inline: var(--rcm-gutter);
	min-height: 3.5rem;
	padding-block: 0.25rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

@media (min-width: 40rem) {
	.rcm-header__bar {
		min-height: 4rem;
		gap: 1rem;
	}
}

/* ------------------------------------------------------------- brand */

.rcm-header__brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	flex-shrink: 0;
	text-decoration: none;
}

.rcm-header__brand img {
	height: 2.25rem;
	width: auto;
}

@media (min-width: 40rem) {
	.rcm-header__brand img {
		height: 2.75rem;
	}
}

/* The wordmark is hidden on phones: at 360px it competes with the actions
   for space and the mark alone is enough to identify the site. */
.rcm-header__lockup {
	display: none;
	line-height: 1.15;
}

@media (min-width: 40rem) {
	.rcm-header__lockup {
		display: block;
	}
}

.rcm-header__name {
	display: block;
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-sm);
	font-weight: 800;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--rcm-navy);
}

.rcm-header__tagline {
	display: block;
	font-size: var(--rcm-text-xs);
	font-weight: 500;
	letter-spacing: 0.01em;
	color: rgb(0 51 160 / 0.7);
}

/* --------------------------------------------------------------- nav */

/* NO overflow:hidden here. It was added to stop a long menu label pushing the
   header actions off screen, and it clipped the mega-menu panels — which are
   absolutely positioned children of this element — so no dropdown could open.
   The label is constrained on .rcm-navlink instead, which contains the same
   problem without trapping the panels. */
/* Wraps to a second line rather than crushing its items. A taller header is a
   far better failure than an unreadable one, and wrapping keeps the dropdown
   panels able to escape — overflow:hidden here is what broke them in 1.7.3. */
.rcm-header__nav {
	display: none;
	align-items: center;
	flex-wrap: wrap;
	row-gap: 0.15rem;
	gap: 0.125rem;
	margin-inline: auto;
	min-width: 0;
}

@media (min-width: 64rem) {
	.rcm-header__nav {
		display: flex;
	}
}

/* Menu icons from a menu-icon plugin sit inline with the label. */
.rcm-navlink i,
.rcm-mega__panel a i {
	margin-right: 0.35rem;
	font-style: normal;
}

/* flex-shrink:0 is the important one. Without it, a menu with twenty items
   squeezed every label down to a single letter — the header rendered as a
   column of stray characters. The max-width still stops one runaway label
   widening the bar; the nav wraps rather than compressing. */
.rcm-navlink {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	flex: 0 0 auto;
	max-width: 14rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding: 0.5rem 0.7rem;
	border: 0;
	background: transparent;
	border-radius: var(--rcm-radius);
	font-family: var(--rcm-font-sans);
	font-size: var(--rcm-text-sm);
	font-weight: 600;
	color: var(--rcm-fg);
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}

.rcm-navlink:hover {
	background: var(--rcm-muted);
	color: var(--rcm-navy);
}

/* Active section is marked with a gold underline under the label, not a filled
   pill — the pill reads as a button and competes with the header CTAs. */
.rcm-navlink.is-active {
	color: var(--rcm-navy);
	background: transparent;
	position: relative;
}

.rcm-navlink.is-active::after {
	content: "";
	position: absolute;
	left: 0.7rem;
	right: 0.7rem;
	bottom: 0.15rem;
	height: 2px;
	border-radius: var(--rcm-radius-pill);
	background: var(--rcm-gold);
}

.rcm-mega__trigger[aria-expanded="true"] {
	background: var(--rcm-muted);
	color: var(--rcm-navy);
}

.rcm-navlink .rcm-icon {
	width: 0.875rem;
	height: 0.875rem;
	opacity: 0.6;
}

/* -------------------------------------------------------- mega menus */

.rcm-mega {
	position: relative;
}

.rcm-mega__panel {
	position: absolute;
	top: calc(100% + 0.4rem);
	left: 0;
	display: grid;
	gap: 0.125rem;
	min-width: 14rem;
	padding: 0.4rem;
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-lg);
	box-shadow: var(--rcm-shadow-lift);
	z-index: 50;
}

/* Courses lists "CPA — Certified Public Accountants", which needs the room. */
.rcm-mega__panel--wide {
	min-width: 22rem;
}

.rcm-mega__panel[hidden] {
	display: none;
}

.rcm-mega__panel a {
	display: block;
	padding: 0.55rem 0.7rem;
	border-radius: var(--rcm-radius-sm);
	font-size: var(--rcm-text-sm);
	font-weight: 500;
	color: var(--rcm-fg);
	text-decoration: none;
	line-height: 1.35;
}

.rcm-mega__panel a:hover {
	background: var(--rcm-muted);
	color: var(--rcm-navy);
}

.rcm-mega__all {
	margin-top: 0.25rem;
	border-top: 1px solid var(--rcm-border);
	border-radius: 0 0 var(--rcm-radius-sm) var(--rcm-radius-sm) !important;
	font-weight: 600 !important;
	color: var(--rcm-navy) !important;
}

/* ------------------------------------------------------------ actions */

.rcm-header__aside {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	min-width: 0;
	flex-shrink: 0;
}

@media (min-width: 40rem) {
	.rcm-header__aside {
		gap: 0.5rem;
	}
}

.rcm-header__icon {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	padding: 0;
	background: transparent;
	border-radius: 50%;
	color: var(--rcm-navy);
	cursor: pointer;
}

@media (min-width: 40rem) {
	.rcm-header__icon {
		width: 2.75rem;
		height: 2.75rem;
	}
}

.rcm-header__icon:hover {
	background: var(--rcm-muted);
}

/* Auth buttons appear from md; below that the sheet carries them. */
.rcm-header__cta {
	display: none;
}

@media (min-width: 48rem) {
	.rcm-header__cta {
		display: inline-flex;
	}
}

.rcm-header__burger {
	display: grid;
}

@media (min-width: 64rem) {
	.rcm-header__burger {
		display: none;
	}
}

/* ------------------------------------------------------ account menu */

.rcm-account {
	position: relative;
}

.rcm-account__trigger {
	display: grid;
	place-items: center;
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding: 0.15rem;
	border: 0;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
}

.rcm-account__trigger:hover {
	background: var(--rcm-muted);
}

.rcm-account__avatar {
	border-radius: 50%;
	display: block;
}

.rcm-account__panel {
	position: absolute;
	top: calc(100% + 0.4rem);
	right: 0;
	min-width: 12rem;
	padding: 0.4rem;
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-lg);
	box-shadow: var(--rcm-shadow-lift);
	z-index: 50;
}

.rcm-account__panel[hidden] {
	display: none;
}

.rcm-account__name {
	font-size: var(--rcm-text-xs);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rcm-muted-fg);
	padding: 0.5rem 0.7rem 0.35rem;
	margin: 0;
}

.rcm-account__panel a {
	display: block;
	padding: 0.55rem 0.7rem;
	border-radius: var(--rcm-radius-sm);
	font-size: var(--rcm-text-sm);
	font-weight: 500;
	color: var(--rcm-fg);
	text-decoration: none;
}

.rcm-account__panel a:hover {
	background: var(--rcm-muted);
	color: var(--rcm-navy);
}

.rcm-account__out {
	margin-top: 0.25rem;
	border-top: 1px solid var(--rcm-border);
}

/* ------------------------------------------------------------ search */

.rcm-search {
	border-top: 1px solid var(--rcm-border);
	background: var(--rcm-card);
}

.rcm-search[hidden] {
	display: none;
}

.rcm-search__form {
	max-width: var(--rcm-container);
	margin-inline: auto;
	padding: 0.75rem var(--rcm-gutter);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.rcm-search__form .rcm-icon {
	color: var(--rcm-muted-fg);
	flex: 0 0 auto;
}

.rcm-search__form input {
	flex: 1;
	min-width: 0;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius);
	background: var(--rcm-bg);
	font-size: var(--rcm-text-base);
	color: var(--rcm-fg);
}

/* ------------------------------------------------------- mobile sheet */

.rcm-sheet {
	position: fixed;
	inset: 0;
	z-index: 100;
}

.rcm-sheet[hidden] {
	display: none;
}

.rcm-sheet__scrim {
	position: absolute;
	inset: 0;
	background: rgb(7 21 58 / 0.5);
}

.rcm-sheet__panel {
	position: absolute;
	inset-block: 0;
	right: 0;
	width: min(20rem, 88vw);
	overflow-y: auto;
	background: var(--rcm-card);
	padding: 3.5rem 1.25rem 2rem;
	box-shadow: var(--rcm-shadow-lift);
}

.rcm-sheet__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	background: transparent;
	border-radius: 50%;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--rcm-fg);
	cursor: pointer;
}

.rcm-sheet__close:hover {
	background: var(--rcm-muted);
}

.rcm-sheet__title {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-lg);
	font-weight: 700;
	color: var(--rcm-navy);
	margin: 0 0 1.25rem;
}

.rcm-sheet__auth {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}

.rcm-sheet__nav {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	margin-top: 1rem;
}

.rcm-sheet__nav a {
	padding: 0.75rem;
	border-radius: var(--rcm-radius);
	font-size: var(--rcm-text-sm);
	font-weight: 600;
	color: var(--rcm-fg);
	text-decoration: none;
}

.rcm-sheet__nav a:hover {
	background: var(--rcm-muted);
}

/* =========================================================================
 * STUDENT DASHBOARD
 * From routes/dashboard/index.tsx: space-y-6 stack, 2/4-up stats, a navy
 * Continue panel spanning two of three columns beside the week strip, then
 * My papers and a two-up row.
 * ====================================================================== */

/* Grid items default to min-width:auto, so a child that will not wrap — the
   truncated paper titles below — pushes its track wider than the viewport and
   the whole page scrolls sideways. Every grid here pins its tracks to
   minmax(0, …) and zeroes the children's minimum. */
.rcm-dash {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.5rem;
}

.rcm-dash > * {
	min-width: 0;
}

.rcm-dash__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75rem;
}

.rcm-dash__title {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-3xl);
	font-weight: 700;
	letter-spacing: -0.03em;
	margin: 0.15rem 0 0;
}

.rcm-dash__date {
	font-size: var(--rcm-text-sm);
	color: var(--rcm-muted-fg);
	margin: 0.15rem 0 0;
}

.rcm-dash__sitting {
	border-radius: var(--rcm-radius-pill);
	background: var(--rcm-navy-08);
	padding: 0.375rem 0.75rem;
	font-size: var(--rcm-text-xs);
	font-weight: 600;
	color: var(--rcm-navy);
	white-space: nowrap;
}

/* --------------------------------------------------------------- stats */

.rcm-dash__stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.rcm-dash__stats > * {
	min-width: 0;
}

@media (min-width: 64rem) {
	.rcm-dash__stats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.rcm-dash__stat {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
}

.rcm-dash__stat-icon {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: var(--rcm-radius);
	background: var(--rcm-navy-08);
	color: var(--rcm-navy);
	flex: 0 0 auto;
}

.rcm-dash__stat-value {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-xl);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	margin: 0;
	line-height: 1.1;
}

.rcm-dash__stat-label {
	font-size: var(--rcm-text-xs);
	color: var(--rcm-muted-fg);
	margin: 0;
}

/* ------------------------------------------------------------- rows */

.rcm-dash__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

.rcm-dash__row > * {
	min-width: 0;
}

@media (min-width: 64rem) {
	.rcm-dash__row {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	}

	.rcm-dash__row--even {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.rcm-dash__continue {
	background: var(--rcm-navy-deep);
	border-radius: var(--rcm-radius-2xl);
	padding: 1.5rem;
	color: #fff;
}

.rcm-dash__continue-body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.75rem;
}

.rcm-dash__code {
	font-size: var(--rcm-text-xs);
	color: rgb(255 255 255 / 0.6);
	margin: 0;
}

.rcm-dash__course {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-2xl);
	font-weight: 700;
	color: #fff;
	margin: 0;
	line-height: 1.2;
}

.rcm-dash__next {
	font-size: var(--rcm-text-sm);
	color: rgb(255 255 255 / 0.7);
	margin: 0.35rem 0 0;
	max-width: 30rem;
}

.rcm-dash__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.rcm-dash__card {
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
	padding: 1.25rem;
}

.rcm-dash__card-eyebrow {
	font-size: var(--rcm-text-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rcm-muted-fg);
	margin: 0;
}

.rcm-dash__note {
	font-size: var(--rcm-text-sm);
	color: var(--rcm-muted-fg);
	margin: 1rem 0 0;
	line-height: 1.55;
}

.rcm-dash__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.rcm-dash__h2 {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-lg);
	font-weight: 600;
	margin: 0;
}

.rcm-dash__more {
	font-size: var(--rcm-text-sm);
	font-weight: 600;
	color: var(--rcm-navy);
	text-decoration: none;
}

/* ------------------------------------------------------------- week */

.rcm-week {
	display: flex;
	justify-content: space-between;
	margin-top: 1rem;
}

.rcm-week__day {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.rcm-week__dot {
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--rcm-muted);
}

.rcm-week__dot.is-active {
	background: var(--rcm-navy);
}

/* Today is ringed rather than recoloured, so "today" and "studied" stay two
   separate pieces of information. */
.rcm-week__dot.is-today {
	box-shadow: 0 0 0 2px var(--rcm-card), 0 0 0 4px var(--rcm-gold);
}

.rcm-week__label {
	font-size: var(--rcm-text-xs);
	color: var(--rcm-muted-fg);
}

/* ------------------------------------------------------------ papers */

.rcm-dash__papers {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
	margin-top: 0.75rem;
}

.rcm-dash__papers > * {
	min-width: 0;
}

@media (min-width: 40rem) {
	.rcm-dash__papers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.rcm-paper {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.16s ease;
}

.rcm-paper:hover {
	border-color: var(--rcm-navy-12);
}

.rcm-paper__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.rcm-paper__code {
	font-size: var(--rcm-text-xs);
	font-weight: 600;
	color: var(--rcm-navy);
}

.rcm-paper__title {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rcm-paper__level {
	font-size: var(--rcm-text-xs);
	color: var(--rcm-muted-fg);
}

/* ------------------------------------------------------------- lists */

.rcm-dash__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.rcm-dash__list > * {
	min-width: 0;
}

.rcm-dash__row-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.65rem 0.75rem;
	border-radius: var(--rcm-radius);
	background: rgb(238 240 246 / 0.7);
	text-decoration: none;
	color: inherit;
}

.rcm-dash__list--plain .rcm-dash__row-item {
	background: transparent;
	padding-inline: 0.25rem;
}

.rcm-dash__row-item:hover {
	background: var(--rcm-muted);
}

.rcm-dash__row-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.rcm-dash__row-title {
	font-size: var(--rcm-text-sm);
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rcm-dash__row-meta {
	font-size: var(--rcm-text-xs);
	color: var(--rcm-muted-fg);
}

@media (max-width: 22.5rem) {
	.rcm-dash__row-item {
		flex-wrap: wrap;
		row-gap: 0.15rem;
	}
}

.rcm-dash__row-time {
	flex: 0 0 auto;
	font-size: var(--rcm-text-xs);
	font-weight: 600;
	color: var(--rcm-navy);
}

.rcm-dash__row-item .rcm-icon {
	flex: 0 0 auto;
	color: var(--rcm-navy);
	width: 1rem;
	height: 1rem;
}

/* Ring variant used on the navy Continue panel. */
.rcm-ring--dark .rcm-ring__track {
	stroke: rgb(255 255 255 / 0.15);
}

.rcm-ring--dark .rcm-ring__label {
	color: #fff;
}

.rcm-ring__track {
	stroke: var(--rcm-muted);
}

.rcm-ring__value {
	stroke: var(--rcm-navy);
	stroke-linecap: round;
}

.rcm-ring--dark .rcm-ring__value {
	stroke: var(--rcm-gold);
}

.rcm-ring__label {
	color: var(--rcm-fg);
}

/* --------------------------------------------------- dashboard shell

   max-w-7xl, a 15rem sticky sidebar from lg, and a min-width:0 content
   column. The min-width matters: without it the content column refuses to
   shrink and the sidebar gets squeezed instead.                            */

.rcm-deskshell {
	max-width: var(--rcm-container);
	margin-inline: auto;
	padding: 1.5rem var(--rcm-gutter);
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
}

.rcm-desk {
	flex: 1;
	min-width: 0;
}

/* Belt and braces: any flex child here that forgets min-width:0 would widen
   the shell rather than scroll inside it. */
.rcm-deskshell > * {
	min-width: 0;
}

.rcm-dashnav {
	display: none;
	width: 15rem;
	flex-shrink: 0;
}

@media (min-width: 64rem) {
	.rcm-dashnav {
		display: block;
	}
}

.rcm-dashnav__sticky {
	position: sticky;
	top: 6rem;
	display: grid;
	gap: 1rem;
}

.rcm-dashnav__profile {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
}

.rcm-dashnav__avatar,
.rcm-dashnav__initials {
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	flex: 0 0 auto;
	object-fit: cover;
}

.rcm-dashnav__initials {
	display: grid;
	place-items: center;
	background: var(--rcm-navy);
	color: #fff;
	font-size: var(--rcm-text-xs);
	font-weight: 700;
}

.rcm-dashnav__who {
	min-width: 0;
}

.rcm-dashnav__name {
	font-size: var(--rcm-text-sm);
	font-weight: 600;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rcm-dashnav__role {
	font-size: var(--rcm-text-xs);
	color: var(--rcm-muted-fg);
	margin: 0;
}

.rcm-dashnav__list {
	display: grid;
	gap: 0.25rem;
}

.rcm-dashnav__link {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 0.75rem;
	border-radius: var(--rcm-radius);
	font-size: var(--rcm-text-sm);
	font-weight: 600;
	color: var(--rcm-fg);
	text-decoration: none;
	transition: background-color 0.16s ease;
}

.rcm-dashnav__link:hover {
	background: var(--rcm-muted);
}

.rcm-dashnav__link.is-active {
	background: var(--rcm-navy);
	color: #fff;
}

.rcm-dashnav__link .rcm-icon {
	width: 1rem;
	height: 1rem;
}

.rcm-dashnav__sitting {
	padding: 1rem;
	border-radius: var(--rcm-radius-2xl);
	background: var(--rcm-navy-deep);
	color: #fff;
}

.rcm-dashnav__sitting-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: var(--rcm-text-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rcm-gold);
	margin: 0;
}

.rcm-dashnav__sitting-eyebrow .rcm-icon {
	width: 0.875rem;
	height: 0.875rem;
}

.rcm-dashnav__sitting-label {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-lg);
	font-weight: 700;
	color: #fff;
	margin: 0.5rem 0 0;
}

.rcm-dashnav__sitting-days {
	font-size: var(--rcm-text-sm);
	color: rgb(255 255 255 / 0.7);
	margin: 0.25rem 0 0;
}

/* Chip nav below lg, replacing the sidebar. */
.rcm-dashchips {
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	scrollbar-width: none;
	margin-bottom: 1rem;
}

.rcm-dashchips::-webkit-scrollbar {
	display: none;
}

@media (min-width: 64rem) {
	.rcm-dashchips {
		display: none;
	}
}

.rcm-dashchip {
	flex: 0 0 auto;
	padding: 0.5rem 0.75rem;
	border-radius: var(--rcm-radius-pill);
	background: var(--rcm-muted);
	font-size: var(--rcm-text-xs);
	font-weight: 600;
	color: var(--rcm-fg);
	text-decoration: none;
	white-space: nowrap;
}

.rcm-dashchip.is-active {
	background: var(--rcm-navy);
	color: #fff;
}

/* Stat card: icon above the figure, not beside it. */
.rcm-dash__stat {
	display: block;
	padding: 1rem;
}

.rcm-dash__stat-icon {
	display: block;
	background: none;
	width: auto;
	height: auto;
	color: var(--rcm-navy);
}

.rcm-dash__stat-icon .rcm-icon {
	width: 1rem;
	height: 1rem;
}

.rcm-dash__stat-value {
	font-size: var(--rcm-text-2xl);
	margin-top: 0.75rem;
}

/* -------------------------------------------------------- study rooms */

.rcm-dash__rooms {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.5rem;
	margin-top: 0.75rem;
}

@media (min-width: 40rem) {
	.rcm-dash__rooms {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.rcm-room {
	display: block;
	padding: 0.75rem;
	border-radius: var(--rcm-radius);
	background: rgb(238 240 246 / 0.7);
	text-decoration: none;
	color: inherit;
}

.rcm-room:hover {
	background: var(--rcm-muted);
}

.rcm-room__name {
	display: block;
	font-size: var(--rcm-text-sm);
	font-weight: 600;
}

.rcm-room__meta {
	display: block;
	font-size: var(--rcm-text-xs);
	color: var(--rcm-muted-fg);
	margin-top: 0.125rem;
}

/* ------------------------------------------------------ dashboard app */

.rcm-dashapp {
	display: grid;
	gap: 1.5rem;
	align-items: center;
	padding: 1.75rem;
	border-radius: var(--rcm-radius-2xl);
	background: var(--rcm-navy-deep);
	color: #fff;
	overflow: hidden;
}

@media (min-width: 48rem) {
	.rcm-dashapp {
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

.rcm-dashapp__title {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-2xl);
	font-weight: 700;
	color: #fff;
	margin: 0.5rem 0 0;
	line-height: 1.2;
}

.rcm-dashapp__lede {
	font-size: var(--rcm-text-sm);
	color: rgb(255 255 255 / 0.75);
	margin: 0.5rem 0 0;
}

.rcm-dashapp__device .rcm-device {
	width: 10rem;
}

.rcm-dashapp__device img {
	max-width: 10rem;
	height: auto;
}

/* =========================================================================
 * BUDDYBOSS PAGES AND SINGLE TEMPLATES
 *
 * Everything BuddyBoss renders that the RCM design never specified: blog
 * archive and single post, search results, 404, comments, author box and the
 * LearnDash lesson shell. None of it is forked — these are its own class
 * names, restyled so a student who wanders off the designed pages does not
 * land somewhere that looks like a different site.
 *
 * Class names taken from buddyboss-theme/template-parts/content.php,
 * content-single.php, blog-header.php, comments.php, search.php and 404.php.
 * ====================================================================== */

/* ------------------------------------------------------- page headers */

/* BuddyBoss's own page/archive header, given the same treatment as
   .rcm-page-header so an archive title and a designed page title are the
   same size and weight. */
.page-header .page-title,
.bb-blog-dir-header__title,
.entry-header .entry-title {
	font-family: var(--rcm-font-display);
	font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.15;
	color: var(--rcm-fg);
}

.bb-blog-dir-header__description,
.page-header .archive-description {
	font-size: var(--rcm-text-base);
	line-height: 1.6;
	color: var(--rcm-muted-fg);
	max-width: 42rem;
}

.bb-blog-dir-header__divider {
	background: var(--rcm-border);
}

/* ------------------------------------------------------------- articles */

article.post,
article.type-post,
.bb-grid-item.post {
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
	overflow: hidden;
}

article.post .entry-media img,
.bb-grid-item.post .entry-media img {
	width: 100%;
	height: auto;
	display: block;
}

.entry-content-wrap,
.primary-entry-content {
	padding: 1.25rem 1.5rem 1.5rem;
}

/* Long-form reading measure. An unconstrained article on a 1280px container
   runs to about 150 characters a line, which is roughly twice comfortable. */
.single-post .entry-content > p,
.single-post .entry-content > ul,
.single-post .entry-content > ol,
.single-post .entry-content > blockquote {
	max-width: 68ch;
	line-height: 1.75;
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
	font-family: var(--rcm-font-display);
	letter-spacing: -0.02em;
	margin-top: 2rem;
}

.single-post .entry-content blockquote {
	border-left: 3px solid var(--rcm-gold);
	padding-left: 1.25rem;
	margin-left: 0;
	font-style: normal;
	color: var(--rcm-muted-fg);
}

.cat-links a,
.tags-links a {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	margin: 0 0.25rem 0.25rem 0;
	border-radius: var(--rcm-radius-pill);
	background: var(--rcm-navy-08);
	font-size: var(--rcm-text-xs);
	font-weight: 600;
	color: var(--rcm-navy);
	text-decoration: none;
}

.cat-links a:hover,
.tags-links a:hover {
	background: var(--rcm-navy-12);
}

.post-format-icon {
	color: var(--rcm-navy);
}

/* ---------------------------------------------------------- author box */

.bb-sharing-box,
.author-box-share-wrap {
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
	padding: 1.25rem 1.5rem;
}

.authors-avatar img {
	border-radius: 50%;
}

/* ------------------------------------------------------------ comments */

.comments-area {
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
	padding: 1.5rem;
	margin-top: 2rem;
}

.comments-title,
.comment-reply-title {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-xl);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.comment-list {
	list-style: none;
	padding: 0;
}

.comment-list .comment-body {
	border-bottom: 1px solid var(--rcm-border);
	padding: 1rem 0;
}

.comment-author .name,
.comment-author .vcard {
	font-weight: 600;
	color: var(--rcm-fg);
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius);
	background: var(--rcm-bg);
	padding: 0.75rem 0.9rem;
	font-family: inherit;
}

.comment-form textarea:focus,
.comment-form input:focus {
	border-color: var(--rcm-navy);
	box-shadow: 0 0 0 3px rgb(0 51 160 / 0.12);
	outline: none;
}

.comment-form .submit {
	background: var(--rcm-navy);
	border-color: var(--rcm-navy);
	border-radius: var(--rcm-radius);
	color: #fff;
	font-weight: 600;
	padding: 0.7rem 1.4rem;
}

.no-comments,
.logged-in-as {
	font-size: var(--rcm-text-sm);
	color: var(--rcm-muted-fg);
}

/* ------------------------------------------------------ search and 404 */

.search-results .page-title,
.error-404 .page-title {
	font-family: var(--rcm-font-display);
	letter-spacing: -0.03em;
}

.error-404.not-found {
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
	padding: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.error-404 .page-content .search-form input[type="search"],
.search-results .search-form input[type="search"] {
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius);
	background: var(--rcm-bg);
	padding: 0.75rem 0.9rem;
}

/* ------------------------------------------------------------ pagination */

.bb-pagination .page-numbers,
.page-links .page-number,
.navigation .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.5rem;
	border-radius: var(--rcm-radius);
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	color: var(--rcm-fg);
	font-weight: 600;
	text-decoration: none;
}

.bb-pagination .page-numbers.current,
.navigation .page-numbers.current {
	background: var(--rcm-navy);
	border-color: var(--rcm-navy);
	color: #fff;
}

/* --------------------------------------------------- LearnDash lesson */

/* The lesson shell BuddyBoss wraps around LearnDash content: info bar,
   status pills and the header above the player. */
.bb-lms-header {
	background: var(--rcm-card);
	border-bottom: 1px solid var(--rcm-border);
}

.bb-lms-header .entry-title,
.bb-lms-header h1 {
	font-family: var(--rcm-font-display);
	letter-spacing: -0.02em;
}

.bb-ld-info-bar {
	background: var(--rcm-muted);
	border-radius: var(--rcm-radius-lg);
	color: var(--rcm-muted-fg);
	font-size: var(--rcm-text-sm);
}

.bb-ld-status {
	font-weight: 600;
	color: var(--rcm-navy);
}

.bb-ld-info-bar .bb-icon-l {
	color: var(--rcm-navy);
}

/* Assignments and certificates listings inherit the same card. */
.learndash-wrapper .ld-table-list,
.learndash-wrapper .ld-alert {
	border-radius: var(--rcm-radius-lg);
	border-color: var(--rcm-border);
}

.learndash-wrapper .ld-alert-warning {
	background: var(--rcm-gold-12);
	border-color: rgb(232 163 23 / 0.35);
	color: #7a5300;
}

.learndash-wrapper .ld-alert-success {
	background: rgb(6 118 71 / 0.08);
	border-color: var(--rcm-success);
	color: var(--rcm-success);
}

/* ------------------------------------------------------- dashboard profile */

.rcm-profile {
	display: grid;
	gap: 1.5rem;
	max-width: 36rem;
}

.rcm-dash__h1 {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-2xl);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0;
}

.rcm-profile__identity {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.rcm-profile__avatar,
.rcm-profile__initials {
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	flex: 0 0 auto;
	object-fit: cover;
}

.rcm-profile__initials {
	display: grid;
	place-items: center;
	background: var(--rcm-navy);
	color: #fff;
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-lg);
	font-weight: 700;
}

.rcm-profile__name {
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-lg);
	font-weight: 600;
	margin: 0;
}

.rcm-profile__papers {
	font-size: var(--rcm-text-xs);
	color: var(--rcm-muted-fg);
	margin: 0.25rem 0 0;
}

.rcm-profile__label {
	font-weight: 600;
	margin: 0;
}

.rcm-profile__sittings {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

/* The sitting choices are submit buttons, not links, so they need the chip
   look applied to a <button> as well. */
.rcm-profile__sittings .rcm-chip {
	border: 1px solid transparent;
	background: var(--rcm-muted);
	cursor: pointer;
	font-family: inherit;
}

.rcm-profile__sittings .rcm-chip.is-active {
	background: var(--rcm-navy);
	color: #fff;
}

.rcm-profile__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

/* ------------------------------------------------------------ room cards
 *
 * Named roomcard, not room: the dashboard overview already uses .rcm-room for
 * a plain link with a name and a member count. Two different components under
 * one class is how a `white-space: nowrap` written for the link ended up
 * truncating a card title that had a second line to use.
 */

.rcm-roomgrid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	margin-top: 1rem;
}

@media (min-width: 48rem) {
	.rcm-roomgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 75rem) {
	.rcm-roomgrid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.rcm-roomcard {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.1rem;
	background: var(--rcm-card);
	border: 1px solid var(--rcm-border);
	border-radius: var(--rcm-radius-2xl);
	min-width: 0;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.rcm-roomcard:hover {
	border-color: var(--rcm-navy-12);
	box-shadow: var(--rcm-shadow-soft);
}

.rcm-roomcard__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: inherit;
	text-decoration: none;
	min-width: 0;
}

.rcm-roomcard__avatar {
	flex: 0 0 auto;
	width: 3rem;
	height: 3rem;
	border-radius: var(--rcm-radius);
	object-fit: cover;
}

/* A room with no avatar gets its initial rather than a grey square. */
.rcm-roomcard__avatar--blank {
	display: grid;
	place-items: center;
	background: var(--rcm-navy);
	color: #fff;
	font-family: var(--rcm-font-display);
	font-size: var(--rcm-text-lg);
	font-weight: 700;
}

.rcm-roomcard__body {
	display: grid;
	gap: 0.15rem;
	min-width: 0;
}

/* Two lines then ellipsis. Room names run long, and a card that grows to fit
   one of them leaves the whole row ragged. */
.rcm-roomcard__name {
	font-weight: 600;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rcm-roomcard__meta {
	font-size: var(--rcm-text-xs);
	color: var(--rcm-muted-fg);
}

.rcm-roomcard__desc {
	font-size: var(--rcm-text-sm);
	line-height: 1.5;
	color: var(--rcm-muted-fg);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rcm-roomcard__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: auto;
}

.rcm-dash__empty {
	padding: 1.25rem 1.5rem;
	background: var(--rcm-muted);
	border-radius: var(--rcm-radius-2xl);
	font-size: var(--rcm-text-sm);
	color: var(--rcm-muted-fg);
}

.rcm-dash__empty p {
	margin: 0;
}

/* ------------------------------------------------- mobile sheet submenus */

.rcm-sheet__group {
	border-bottom: 1px solid var(--rcm-border);
}

.rcm-sheet__group summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.85rem 0;
	font-size: var(--rcm-text-base);
	font-weight: 600;
	color: var(--rcm-fg);
	cursor: pointer;
	list-style: none;
	/* A summary is a 44px target only if it is given the height. */
	min-height: 2.75rem;
}

/* Safari draws its own triangle unless this is cleared. */
.rcm-sheet__group summary::-webkit-details-marker {
	display: none;
}

.rcm-sheet__group summary svg {
	width: 1.1rem;
	height: 1.1rem;
	flex: 0 0 auto;
	color: var(--rcm-muted-fg);
	transition: transform 0.18s ease;
}

.rcm-sheet__group[open] summary svg {
	transform: rotate(180deg);
}

.rcm-sheet__sub {
	display: grid;
	padding: 0 0 0.6rem 0.9rem;
	border-left: 2px solid var(--rcm-navy-12);
	margin-left: 0.15rem;
}

.rcm-sheet__sub a {
	/* Right padding matters here: a long course title ran to the edge of the
	   panel with nothing to stop it. */
	padding: 0.6rem 0.75rem 0.6rem 0;
	font-size: var(--rcm-text-sm);
	font-weight: 500;
	line-height: 1.4;
	color: var(--rcm-muted-fg);
	min-height: 2.5rem;
	display: flex;
	align-items: center;
	overflow-wrap: anywhere;
}

.rcm-sheet__sub a:hover {
	color: var(--rcm-navy);
}

/* A day still to come is not a missed day, so it is drawn as pending rather
   than as an empty slot the student has already failed. */
.rcm-week__day.is-future .rcm-week__dot {
	opacity: 0.45;
	border-style: dashed;
}

.rcm-week__day.is-future .rcm-week__label {
	opacity: 0.5;
}

.rcm-week__dot {
	cursor: default;
}
