/* CHRI Repository Menu. Brand: Dark Blue #0E113B (text), Light Blue #449FD8 (accent only: it fails
   contrast as text on white), Green #64BF75. The theme (Salient) styles bare ul/li/button, so every
   rule here is scoped under .chri-rm and resets what the theme would add. */
.chri-rm {
	--rm-ink: #0E113B;
	--rm-muted: #4A5070;
	--rm-accent: #449FD8;
	--rm-tint: #EAF3FB;
	--rm-line: #DCE3EE;
	--rm-surface: #FFFFFF;
	--rm-shadow: 0 12px 32px rgba(14, 17, 59, .14), 0 2px 6px rgba(14, 17, 59, .06);
	position: relative;
	z-index: 50;
	max-width: 1180px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--rm-ink);
	text-align: left;
}
.chri-rm *, .chri-rm *::before, .chri-rm *::after { box-sizing: border-box; }
/* The theme fades links inside "light" rows to 70%; the menu is always fully opaque. */
.chri-rm, .chri-rm a, .chri-rm button, .chri-rm span, .chri-rm ul, .chri-rm li { opacity: 1 !important; }
.chri-rm ul, .chri-rm li { list-style: none !important; margin: 0 !important; padding: 0 !important; background: none; }
.chri-rm li::before, .chri-rm li::after { content: none !important; display: none !important; }
.chri-rm button {
	-webkit-appearance: none; appearance: none; margin: 0; border: 0 !important; box-shadow: none !important;
	background: transparent !important; font: inherit !important; letter-spacing: 0 !important;
	text-transform: none !important; line-height: 1.2 !important; cursor: pointer; color: inherit !important;
	height: auto !important; min-height: 0 !important; width: auto; border-radius: 0; opacity: 1 !important;
}

/* The bar */
.chri-rm__bar {
	display: flex; align-items: center; gap: .5rem;
	background: var(--rm-surface); border-radius: 16px; box-shadow: var(--rm-shadow);
	padding: .4rem .4rem .4rem .6rem;
}
.chri-rm__list { display: flex; align-items: center; gap: .15rem; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
.chri-rm__group { position: relative; flex: 0 0 auto; }

.chri-rm a.chri-rm__top, .chri-rm button.chri-rm__top {
	display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
	padding: .7rem .95rem !important; border-radius: 11px !important;
	font-size: 15px !important; font-weight: 600 !important; color: var(--rm-ink) !important;
	text-decoration: none !important; position: relative;
}
.chri-rm a.chri-rm__top:hover, .chri-rm button.chri-rm__top:hover,
.chri-rm__group.is-open > .chri-rm__top { background: var(--rm-tint) !important; }
.chri-rm a.chri-rm__top:focus-visible, .chri-rm button:focus-visible, .chri-rm__panel a:focus-visible, .chri-rm a.chri-rm__cta:focus-visible {
	outline: 3px solid var(--rm-accent); outline-offset: 2px;
}
/* The group holding this page carries an accent rule under its label. */
.chri-rm__group.is-active > .chri-rm__top::after {
	content: ""; position: absolute; left: .95rem; right: .95rem; bottom: .3rem;
	height: 3px; border-radius: 3px; background: var(--rm-accent);
}
.chri-rm__caret {
	width: .45rem; height: .45rem; margin-top: -.2rem;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg); transition: transform .15s ease; opacity: .7;
}
.chri-rm__group.is-open .chri-rm__caret { transform: rotate(225deg); margin-top: .2rem; }

/* Dropdown panels */
.chri-rm .chri-rm__panel {
	display: none; position: absolute; top: calc(100% + .55rem); left: 0; z-index: 60;
	width: 340px; max-width: calc(100vw - 2rem);
	background: var(--rm-surface); border-radius: 16px; box-shadow: var(--rm-shadow);
	padding: .45rem !important;
}
.chri-rm .chri-rm__group.is-open > .chri-rm__panel { display: block; }
.chri-rm__panel a {
	display: block; padding: .65rem .8rem !important; border-radius: 11px;
	text-decoration: none !important; color: var(--rm-ink) !important; border-left: 3px solid transparent;
}
.chri-rm__panel a:hover { background: var(--rm-tint); }
.chri-rm__panel a[aria-current="page"] { background: var(--rm-tint); border-left-color: var(--rm-accent); }
.chri-rm__label { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.chri-rm__desc { display: block; font-size: 13px; line-height: 1.4; color: var(--rm-muted); margin-top: .15rem; }
.chri-rm a.chri-rm__top[aria-current="page"] { background: var(--rm-tint) !important; }

/* Sign in / My Data Repository */
.chri-rm a.chri-rm__cta {
	flex: 0 0 auto; margin-left: auto; white-space: nowrap;
	padding: .7rem 1.15rem !important; border-radius: 11px !important;
	background: var(--rm-ink) !important; color: #FFFFFF !important;
	font-size: 15px !important; font-weight: 600 !important; text-decoration: none !important;
}
.chri-rm a.chri-rm__cta:hover { background: #1D2466 !important; }

/* The Menu button: only in compact mode. */
.chri-rm__toggle { display: none !important; }

/* Compact: JS sets .is-compact when the full bar would not fit; CSS does it below 720px too. */
.chri-rm.is-compact .chri-rm__bar { flex-wrap: wrap; padding: .4rem; }
.chri-rm.is-compact .chri-rm__toggle {
	display: flex !important; align-items: center; gap: .6rem; width: 100%;
	padding: .55rem .6rem !important; border-radius: 11px; text-align: left;
}
.chri-rm__toggle-kicker { white-space: nowrap; flex: 0 0 auto; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rm-muted); }
.chri-rm__toggle-current { font-size: 15px; font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chri-rm__toggle-word {
	font-size: 14px; font-weight: 600; padding: .45rem .8rem; border-radius: 9px; background: var(--rm-tint);
}
.chri-rm.is-compact .chri-rm__list,
.chri-rm.is-compact a.chri-rm__cta { display: none; }
.chri-rm.is-compact.is-open .chri-rm__list { display: flex; flex-direction: column; align-items: stretch; width: 100%; gap: .25rem; padding: .25rem 0 !important; border-top: 1px solid var(--rm-line); margin-top: .25rem !important; }
.chri-rm.is-compact.is-open a.chri-rm__cta { display: block; width: 100%; margin: .25rem 0 0; text-align: center; }
/* Inside the open compact menu every group is listed in full: no nested dropdowns on a phone. */
.chri-rm.is-compact .chri-rm__group { width: 100%; }
.chri-rm.is-compact .chri-rm__panel { display: block; position: static; width: auto; max-width: none; box-shadow: none; padding: 0 0 .25rem !important; }
.chri-rm.is-compact button.chri-rm__top { cursor: default; pointer-events: none; padding: .7rem .8rem .25rem !important; font-size: 12px !important; letter-spacing: .06em !important; text-transform: uppercase !important; color: var(--rm-muted) !important; }
.chri-rm.is-compact .chri-rm__caret,
.chri-rm.is-compact .chri-rm__group.is-active > .chri-rm__top::after { display: none; }
.chri-rm.is-compact a.chri-rm__top { width: 100%; padding: .7rem .8rem !important; border-left: 3px solid transparent; }
.chri-rm.is-compact .chri-rm__desc { display: none; }

/* Without JavaScript a narrow screen shows the whole menu stacked (it cannot be opened otherwise). */
@media (max-width: 720px) {
	.chri-rm:not(.chri-rm--js) .chri-rm__bar { flex-wrap: wrap; }
	.chri-rm:not(.chri-rm--js) .chri-rm__list { flex-direction: column; align-items: stretch; width: 100%; }
	.chri-rm:not(.chri-rm--js) .chri-rm__panel { display: block; position: static; width: auto; box-shadow: none; }
	.chri-rm:not(.chri-rm--js) a.chri-rm__cta { width: 100%; text-align: center; }
}

/* On a phone the page name matters more than the section label: drop the label when a page is named. */
@media (max-width: 480px) {
	.chri-rm .chri-rm__toggle.has-current .chri-rm__toggle-kicker { display: none; }
}

@media (prefers-reduced-motion: reduce) { .chri-rm__caret { transition: none; } }
