/* ============================================================
   Jeevi MBTI Mega Menu — Editorial Edition (v2)
   Themed to match the 16 personality pages:
     ink #0B1020 · cream #FBF7F0 · gold #C8973D
     coral #E85D3C · green #1F7A4D
   Typography: Fraunces (serif) + DM Sans (UI)
   ============================================================ */

:root {
	/* Editorial palette */
	--jmm-ink:        #0B1020;
	--jmm-ink-2:      #141A2E;
	--jmm-ink-3:      #1E2640;
	--jmm-cream:      #FBF7F0;
	--jmm-cream-2:    #F3ECDD;
	--jmm-cream-3:    #EDE2C7;
	--jmm-paper:      #FFFFFF;
	--jmm-gold:       #C8973D;
	--jmm-gold-deep:  #A6792A;
	--jmm-gold-light: #F4C26B;
	--jmm-coral:      #E85D3C;
	--jmm-green:      #1F7A4D;
	--jmm-muted:      #5A6074;
	--jmm-muted-2:    #7B8298;
	--jmm-line:       rgba(11, 16, 32, 0.10);
	--jmm-line-soft:  rgba(11, 16, 32, 0.06);

	/* Type */
	--jmm-serif: 'Fraunces', 'Times New Roman', serif;
	--jmm-sans:  'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	/* Shadows */
	--jmm-sh-lg: 0 30px 80px -30px rgba(11, 16, 32, 0.45), 0 12px 36px -16px rgba(11, 16, 32, 0.25);
	--jmm-sh-md: 0 12px 40px -18px rgba(11, 16, 32, 0.25);
	--jmm-sh-sm: 0 4px 16px -6px rgba(11, 16, 32, 0.18);
	--jmm-sh-gold: 0 12px 32px -12px rgba(200, 151, 61, 0.50), inset 0 1px 0 rgba(255, 255, 255, 0.4);

	--jmm-trans: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =============================================================
   PARENT MENU ITEM (positions panel + caret)
   ============================================================= */
.jeevi-mbti-mega-parent {
	position: relative;
}

.jeevi-mbti-mega-parent > a {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
}

.jeevi-mbti-mega-parent > a::after {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: rotate(45deg) translate(-1px, -1px);
	transition: transform 0.3s var(--jmm-trans);
	opacity: 0.55;
}
.jeevi-mbti-mega-parent.jmm-open > a::after,
.jeevi-mbti-mega-parent:hover > a::after {
	transform: rotate(225deg) translate(-1px, -1px);
	opacity: 0.9;
}

/* =============================================================
   PANEL — desktop floating card
   ============================================================= */
.jmm-panel {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translate(-50%, 14px);
	width: min(1180px, calc(100vw - 32px));
	margin-top: 14px;
	font-family: var(--jmm-sans);
	color: var(--jmm-ink);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 0.32s var(--jmm-trans),
		transform 0.32s var(--jmm-trans),
		visibility 0s linear 0.32s;
	z-index: 9999;
}

.jeevi-mbti-mega-parent:hover > .jmm-panel,
.jeevi-mbti-mega-parent:focus-within > .jmm-panel,
.jeevi-mbti-mega-parent.jmm-open > .jmm-panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(-50%, 0);
	transition:
		opacity 0.32s var(--jmm-trans),
		transform 0.32s var(--jmm-trans),
		visibility 0s linear;
}

/* Pointer */
.jmm-panel-arrow {
	position: absolute;
	top: -9px;
	left: 50%;
	width: 18px;
	height: 18px;
	background: var(--jmm-cream);
	border-left: 1px solid var(--jmm-line);
	border-top: 1px solid var(--jmm-line);
	transform: translateX(-50%) rotate(45deg);
	border-radius: 4px 0 0 0;
	z-index: 1;
}

.jmm-panel-inner {
	position: relative;
	background: var(--jmm-cream);
	border: 1px solid var(--jmm-line);
	border-radius: 22px;
	padding: 32px 36px 28px;
	box-shadow: var(--jmm-sh-lg);
	overflow: hidden;
}

/* Editorial paper texture — gold blueprint grid */
.jmm-panel-inner::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.45;
	background-image:
		linear-gradient(rgba(200, 151, 61, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(200, 151, 61, 0.06) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: radial-gradient(ellipse at 50% 30%, #000 35%, transparent 90%);
	-webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 35%, transparent 90%);
}

/* Soft gold halo top-right */
.jmm-panel-inner::after {
	content: "";
	position: absolute;
	top: -120px;
	right: -120px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(200, 151, 61, 0.18) 0%, transparent 70%);
	filter: blur(20px);
	pointer-events: none;
}

/* =============================================================
   BRAND LOGO (Insight Metrics)
   ============================================================= */
.jmm-brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	line-height: 0;
}
.jmm-brand-logo {
	display: block;
	height: 30px;
	width: auto;
	object-fit: contain;
}
/* =============================================================
   PANEL HEADER — eyebrow + serif title
   ============================================================= */
.jmm-panel-head {
	position: relative;
	margin-bottom: 24px;
	text-align: left;
}

.jmm-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	color: var(--jmm-gold-deep);
	text-transform: uppercase;
	margin-bottom: 10px;
}
.jmm-rule {
	width: 36px;
	height: 1px;
	background: var(--jmm-gold);
}

.jmm-panel-title {
	font-family: var(--jmm-serif);
	font-weight: 500;
	font-size: 30px;
	letter-spacing: -0.015em;
	line-height: 1.1;
	margin: 0 0 8px;
	color: var(--jmm-ink);
}
.jmm-panel-title em {
	font-style: italic;
	font-weight: 500;
	color: var(--jmm-gold);
}

.jmm-panel-subtitle {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--jmm-muted);
	max-width: 640px;
}

/* =============================================================
   GRID — 2 columns desktop, 1 mobile
   ============================================================= */
.jmm-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 24px;
}

/* =============================================================
   GROUP CARD
   ============================================================= */
.jmm-group {
	position: relative;
	background: var(--jmm-paper);
	padding: 20px 22px 18px;
	border-radius: 18px;
	border: 1px solid var(--jmm-line-soft);
	box-shadow: var(--jmm-sh-sm);
	overflow: hidden;
	transition: box-shadow 0.3s var(--jmm-trans), transform 0.3s var(--jmm-trans);
}

/* Group color accent — left edge */
.jmm-group::before {
	content: "";
	position: absolute;
	top: 18px;
	bottom: 18px;
	left: 0;
	width: 3px;
	background: var(--jmm-accent);
	border-radius: 0 4px 4px 0;
	opacity: 0.85;
}

/* Group tint background */
.jmm-group::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 90px;
	background: linear-gradient(180deg, var(--jmm-tint), transparent);
	pointer-events: none;
}

.jmm-group-head {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 14px;
	align-items: start;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px dashed var(--jmm-line);
}

.jmm-group-emblem {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--jmm-ink);
	color: var(--jmm-accent);
	box-shadow:
		var(--jmm-sh-sm),
		inset 0 1px 0 rgba(255, 255, 255, 0.06),
		inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}
.jmm-group-emblem svg { width: 26px; height: 26px; }

.jmm-group-meta {
	min-width: 0;
	position: relative;
}

.jmm-group-roman {
	position: absolute;
	top: -2px;
	right: 0;
	font-family: var(--jmm-serif);
	font-style: italic;
	font-weight: 500;
	font-size: 22px;
	color: var(--jmm-accent);
	opacity: 0.4;
	letter-spacing: -0.02em;
}

.jmm-group-kicker {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.18em;
	color: var(--jmm-accent);
	text-transform: uppercase;
	margin-bottom: 4px;
}

.jmm-group-title {
	font-family: var(--jmm-serif);
	font-weight: 500;
	font-size: 22px;
	letter-spacing: -0.012em;
	line-height: 1.1;
	margin: 0 0 4px;
	color: var(--jmm-ink);
}

.jmm-group-subtitle {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--jmm-muted);
}

/* =============================================================
   TYPE CARD (4 per group)
   ============================================================= */
.jmm-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	position: relative;
}

.jmm-card {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 10px 12px 10px 10px;
	background: var(--jmm-cream);
	border-radius: 12px;
	border: 1px solid var(--jmm-line-soft);
	text-decoration: none !important;
	color: var(--jmm-ink);
	transition: transform 0.25s var(--jmm-trans), background 0.25s var(--jmm-trans), border-color 0.25s var(--jmm-trans), box-shadow 0.25s var(--jmm-trans);
	overflow: hidden;
}

/* Type code monogram (the "logo") */
.jmm-card-mono {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	background: var(--jmm-ink);
	color: var(--jmm-cream);
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.08),
		inset 0 -1px 0 rgba(0, 0, 0, 0.4),
		0 4px 10px -4px rgba(11, 16, 32, 0.4);
}
.jmm-card-mono::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(135deg, var(--jmm-accent) 0%, transparent 50%);
	opacity: 0.22;
	pointer-events: none;
}
.jmm-card-mono::after {
	content: "";
	position: absolute;
	bottom: 4px;
	left: 8px;
	right: 8px;
	height: 1px;
	background: var(--jmm-accent);
	opacity: 0.55;
}
.jmm-card-mono-letters {
	font-family: var(--jmm-serif);
	font-style: italic;
	font-weight: 500;
	font-size: 14.5px;
	letter-spacing: 0.06em;
	color: var(--jmm-cream);
	position: relative;
	z-index: 1;
}

.jmm-card-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 1px;
}

.jmm-card-name {
	font-family: var(--jmm-serif);
	font-weight: 500;
	font-size: 16px;
	letter-spacing: -0.012em;
	color: var(--jmm-ink);
	line-height: 1.15;
}

.jmm-card-tag {
	font-size: 11px;
	color: var(--jmm-muted-2);
	letter-spacing: 0.02em;
	font-style: italic;
}

.jmm-card-go {
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--jmm-accent);
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity 0.25s var(--jmm-trans), transform 0.25s var(--jmm-trans);
}
.jmm-card-go svg { width: 18px; height: 18px; }

/* Hover: gold lift */
.jmm-card:hover,
.jmm-card:focus-visible {
	transform: translateY(-2px);
	background: var(--jmm-paper);
	border-color: var(--jmm-accent);
	box-shadow:
		0 12px 28px -12px rgba(11, 16, 32, 0.20),
		0 0 0 1px var(--jmm-accent) inset;
}
.jmm-card:hover .jmm-card-go,
.jmm-card:focus-visible .jmm-card-go {
	opacity: 1;
	transform: translateX(0);
}
.jmm-card:hover .jmm-card-mono,
.jmm-card:focus-visible .jmm-card-mono {
	background: var(--jmm-accent);
}
.jmm-card:hover .jmm-card-mono::before {
	opacity: 0.0;
}
.jmm-card:hover .jmm-card-mono::after {
	background: var(--jmm-cream);
}

/* =============================================================
   CTA STRIP — editorial, ink card with gold accents
   ============================================================= */
.jmm-cta {
	position: relative;
	margin-top: 22px;
	padding: 22px 26px;
	background: var(--jmm-ink);
	color: var(--jmm-cream);
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	overflow: hidden;
	box-shadow: var(--jmm-sh-md);
}
.jmm-cta::before {
	content: "";
	position: absolute;
	top: -80px;
	right: -80px;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(200, 151, 61, 0.32) 0%, transparent 65%);
	filter: blur(20px);
	pointer-events: none;
}
.jmm-cta::after {
	content: "";
	position: absolute;
	inset: 6px;
	border: 1px dashed rgba(244, 194, 107, 0.18);
	border-radius: 14px;
	pointer-events: none;
}

.jmm-cta-copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	position: relative;
	z-index: 1;
}
.jmm-cta-eyebrow {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.22em;
	color: var(--jmm-gold-light);
	text-transform: uppercase;
}
.jmm-cta-title {
	font-family: var(--jmm-serif);
	font-style: normal;
	font-weight: 500;
	font-size: 22px;
	letter-spacing: -0.012em;
	color: var(--jmm-cream);
	line-height: 1.15;
}
.jmm-cta-sub {
	font-size: 12.5px;
	color: rgba(251, 247, 240, 0.65);
}

.jmm-cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--jmm-gold);
	color: var(--jmm-ink) !important;
	font-family: var(--jmm-sans);
	font-weight: 600;
	font-size: 13.5px;
	letter-spacing: 0.02em;
	padding: 13px 22px;
	border-radius: 100px;
	text-decoration: none !important;
	box-shadow: var(--jmm-sh-gold);
	transition: transform 0.25s var(--jmm-trans), box-shadow 0.25s var(--jmm-trans), background 0.25s var(--jmm-trans);
	white-space: nowrap;
	position: relative;
	z-index: 1;
}
.jmm-cta-btn svg { width: 14px; height: 14px; }
.jmm-cta-btn:hover {
	transform: translateY(-1px);
	background: var(--jmm-gold-light);
	box-shadow: 0 16px 36px -10px rgba(200, 151, 61, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
	color: var(--jmm-ink) !important;
}

/* =============================================================
   MOBILE HEADER (hidden on desktop)
   ============================================================= */
.jmm-mobile-header { display: none; }

/* Page-level dim backdrop */
.jmm-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(11, 16, 32, 0.50);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s var(--jmm-trans), visibility 0s linear 0.3s;
	/* Sit above the pill nav drawer (10000) but below the mega panel (10020)
	   so the backdrop dims the drawer behind the panel on mobile. */
	z-index: 10010;
	pointer-events: none;
}
.jmm-backdrop.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.3s var(--jmm-trans);
}

/* =============================================================
   RESPONSIVE — Tablet
   ============================================================= */
@media (max-width: 1100px) {
	.jmm-panel { width: min(940px, calc(100vw - 24px)); }
	.jmm-panel-inner { padding: 26px 24px 22px; }
	.jmm-panel-title { font-size: 26px; }
	.jmm-grid { gap: 16px; }
	.jmm-cards { gap: 6px; }
}

/* =============================================================
   RESPONSIVE — Mobile (full-screen drawer)
   ============================================================= */
@media (max-width: 782px) {

	/* Let the parent row honour the host menu's mobile flex layout
	   (full width with the chevron pushed to the right edge) instead of
	   the desktop's inline-flex caret-pinned-to-text behaviour. */
	.jeevi-mbti-mega-parent > a {
		display: flex !important;
		justify-content: space-between;
		width: 100%;
	}

	/* Mobile chevron — swap the desktop CSS-rotated square for a clean
	   SVG right-arrow that signals "tap to slide a panel in from the right". */
	.jeevi-mbti-mega-parent > a::after {
		content: "";
		width: 22px;
		height: 22px;
		border: none;
		transform: none;
		opacity: 1;
		background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1020' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 6 15 12 9 18'/></svg>") center/22px no-repeat;
		transition: transform 0.2s var(--jmm-trans), opacity 0.2s var(--jmm-trans);
	}
	.jeevi-mbti-mega-parent:hover > a::after,
	.jeevi-mbti-mega-parent.jmm-open > a::after {
		transform: translateX(2px);
		opacity: 0.85;
	}

	/* On mobile the mega panel slides in from the right and is full viewport
	   width (min(440px, 100vw)). The .jmm-backdrop is a sibling of the pill
	   nav drawer — and .imp-nav-drawer has position:fixed which (in modern
	   browsers) ALWAYS creates a stacking context, regardless of z-index.
	   That means the mega panel (a descendant of the drawer) is trapped
	   inside the drawer's context and cannot climb above the root-level
	   .jmm-backdrop (z:10010), no matter how large its own z-index is.
	   Result: backdrop renders ON TOP of the panel, dimming it AND
	   intercepting touches (so the panel can't be scrolled).
	   Fix: hide the backdrop on mobile. The panel covers the full viewport
	   on phones, so no backdrop is needed for visual focus. */
	.jmm-backdrop,
	.jmm-backdrop.is-active {
		display: none !important;
	}

	.jmm-panel {
		position: fixed;
		top: 0;
		right: 0;
		left: auto;
		transform: translateX(100%);
		width: 100vw;
		max-width: 100vw;
		height: 100vh;
		height: 100dvh;
		margin: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		opacity: 1;
		visibility: hidden;
		pointer-events: none;
		z-index: 10020;
		transition: transform 0.34s var(--jmm-trans), visibility 0s linear 0.34s;
	}

	.jeevi-mbti-mega-parent:hover > .jmm-panel,
	.jeevi-mbti-mega-parent:focus-within > .jmm-panel {
		transform: translateX(100%);
		visibility: hidden;
		pointer-events: none;
	}
	.jeevi-mbti-mega-parent.jmm-open > .jmm-panel,
	.jmm-panel.jmm-panel--portaled {
		transform: translateX(0);
		visibility: visible;
		pointer-events: auto;
		transition: transform 0.34s var(--jmm-trans), visibility 0s linear;
	}

	/* Portaled panel: lives at <body> root, must override any inherited
	   positioning and sit above EVERY possible theme/Elementor overlay.
	   The z-index is intentionally enormous — themes often use 9999 or
	   10000 on sticky headers, and we want to win against all of them. */
	body > .jmm-panel.jmm-panel--portaled {
		position: fixed !important;
		inset: 0 !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		width: 100vw !important;
		max-width: 100vw !important;
		height: 100vh !important;
		height: 100dvh !important;
		margin: 0 !important;
		z-index: 2147483000 !important;
	}

	/* Trim the first page section's mobile top padding so the sticky theme
	   header doesn't leave a visible whitespace gap below the nav. Scoped
	   to sites using the Pixfort/Pxl theme's #pxl-header-elementor so we
	   don't disturb unrelated installs. Target both Elementor flex-container
	   (.e-con.e-parent) and section markup. */
	#pxl-header-elementor ~ #pxl-main .elementor > .e-con.e-parent:first-child,
	#pxl-header-elementor ~ #pxl-main .elementor > .elementor-section:first-child {
		--padding-top: 16px !important;
		padding-top: 16px !important;
	}

	/* Collapse the Elementor container padding *inside* the Pixfort sticky
	   header on mobile. Without this, .e-con-inner adds ~10px top + ~10px
	   bottom chrome around our nav pill, producing a visible white gap
	   between the nav and the page content below. */
	#pxl-header-elementor .e-con > .e-con-inner,
	#pxl-header-elementor .e-con-inner {
		--padding-block-start: 0 !important;
		--padding-block-end: 0 !important;
		--padding-top: 0 !important;
		--padding-bottom: 0 !important;
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}

	/* Our .imp-nav-wrap is position:fixed on mobile (to escape Elementor
	   Theme Builder's zero-width mobile-header wrapper), so it no longer
	   occupies flow. Without this reservation the theme header collapses
	   to 0 height and the page hero renders under our fixed nav. 72px =
	   our nav's min-height. */
	#pxl-header-elementor {
		min-height: 72px !important;
	}

	.jmm-panel-arrow { display: none; }

	.jmm-panel-inner {
		padding: 18px 18px 36px;
		background: var(--jmm-cream);
		border: 0;
		border-radius: 0;
		min-height: 100%;
		box-shadow: -20px 0 40px -10px rgba(0, 0, 0, 0.3);
	}

	/* Mobile header bar */
	.jmm-mobile-header {
		position: sticky;
		top: 0;
		z-index: 5;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: -18px -18px 14px;
		padding: 14px 18px;
		background: var(--jmm-cream);
		border-bottom: 1px solid var(--jmm-line);
	}

	.jmm-mobile-eyebrow {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		font-family: var(--jmm-sans);
		font-size: 10.5px;
		font-weight: 600;
		letter-spacing: 0.22em;
		color: var(--jmm-gold-deep);
		text-transform: uppercase;
	}
	.jmm-mobile-rule {
		width: 24px;
		height: 1px;
		background: var(--jmm-gold);
	}

	.jmm-mobile-header .jmm-brand-logo { height: 28px; }

	.jmm-close {
		width: 38px;
		height: 38px;
		border-radius: 50%;
		border: 1px solid var(--jmm-line);
		background: var(--jmm-paper);
		display: inline-flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		color: var(--jmm-ink);
		transition: background 0.2s var(--jmm-trans), border-color 0.2s var(--jmm-trans);
	}
	.jmm-close:hover { background: var(--jmm-cream-2); border-color: var(--jmm-gold); }
	.jmm-close svg { width: 16px; height: 16px; }

	/* Compress hero */
	.jmm-panel-head { margin-bottom: 18px; }
	.jmm-eyebrow { display: none; } /* duplicated by mobile header */
	.jmm-panel-title { font-size: 26px; }
	.jmm-panel-subtitle { font-size: 13px; }

	.jmm-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.jmm-group { padding: 16px 16px 14px; }
	.jmm-group-emblem { width: 42px; height: 42px; }
	.jmm-group-emblem svg { width: 22px; height: 22px; }
	.jmm-group-roman { font-size: 18px; }
	.jmm-group-title { font-size: 19px; }
	.jmm-group-subtitle { font-size: 11.5px; }

	.jmm-cards {
		grid-template-columns: 1fr;
		gap: 6px;
	}
	.jmm-card { padding: 12px 14px 12px 12px; }
	.jmm-card-go { opacity: 1; transform: none; }

	.jmm-cta {
		flex-direction: column;
		align-items: stretch;
		text-align: left;
		padding: 20px 22px;
		margin-top: 16px;
	}
	.jmm-cta-title { font-size: 20px; }
	.jmm-cta-btn {
		justify-content: center;
		padding: 14px 20px;
		font-size: 14px;
	}
}

/* =============================================================
   ACCESSIBILITY
   ============================================================= */
.jmm-card:focus-visible,
.jmm-cta-btn:focus-visible {
	outline: 2px solid var(--jmm-gold);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.jmm-panel,
	.jmm-card,
	.jmm-group,
	.jmm-cta-btn,
	.jeevi-mbti-mega-parent > a::after { transition: none !important; }
}

/* =============================================================
   IMP NAV — full pill navbar (used by [insight_metrics_nav] shortcode)
   ============================================================= */
.imp-nav-wrap {
	padding: 18px 24px;
	background: transparent;
	font-family: var(--jmm-sans);
}
.imp-nav-wrap *,
.imp-nav-wrap *::before,
.imp-nav-wrap *::after { box-sizing: border-box; }

.imp-nav {
	max-width: 1280px;
	margin: 0 auto;
	background: var(--jmm-paper);
	border-radius: 100px;
	border: 1px solid rgba(11,16,32,.08);
	box-shadow: 0 12px 40px -18px rgba(11,16,32,.18);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 8px 8px 22px;
	gap: 12px;
}
.imp-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: inherit;
}
.imp-brand-logo {
	display: block;
	height: 36px;
	width: auto;
	object-fit: contain;
}

.imp-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
	justify-content: center;
}
.imp-nav-menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	border-radius: 100px;
	font-family: var(--jmm-sans);
	font-size: 14px;
	font-weight: 500;
	color: var(--jmm-ink);
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}
.imp-nav-menu > li > a:hover { background: rgba(200,151,61,.10); color: var(--jmm-gold-deep); }
.imp-nav-menu > li.current-menu-item > a,
.imp-nav-menu > li.current_page_item > a {
	border: 1px solid var(--jmm-ink);
	padding: 9px 17px;
}

.imp-nav-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--jmm-ink);
	color: var(--jmm-cream) !important;
	font-family: var(--jmm-sans);
	font-weight: 500;
	font-size: 14px;
	padding: 12px 8px 12px 22px;
	border-radius: 100px;
	text-decoration: none;
	transition: background 0.2s ease;
	white-space: nowrap;
}
.imp-nav-cta:hover { background: var(--jmm-ink-3); }
.imp-nav-cta-arrow {
	width: 30px; height: 30px;
	background: var(--jmm-cream);
	color: var(--jmm-ink);
	border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
}
.imp-nav-cta-arrow svg { width: 14px; height: 14px; }

/* Mobile burger + drawer */
.imp-burger { display: none; }
.imp-drawer-head { display: none; }
.imp-nav-drawer { display: contents; }
.imp-nav-backdrop {
	position: fixed; inset: 0;
	background: rgba(11,16,32,.45);
	opacity: 0; pointer-events: none;
	transition: opacity .25s ease;
	z-index: 9990;
}
.imp-nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

@media (max-width: 1100px) {
	.imp-nav { padding: 8px 8px 8px 18px; }
	.imp-nav-menu { gap: 2px; }
	.imp-nav-menu > li > a { padding: 9px 12px; font-size: 13px; }
	.imp-nav-cta { padding: 10px 8px 10px 18px; font-size: 13px; }
}

@media (max-width: 782px) {
	/* Defensive: zero out common Elementor / theme wrappers if they contain our nav.
	   When the user drops [insight_metrics_nav] inside an Elementor container that
	   has its own padding, border-radius, or background, those leak through and
	   create a cream strip above the white bar. Reach up and neutralize them. */
	.elementor-widget-shortcode:has(.imp-nav-wrap),
	.elementor-element:has(> .elementor-widget-container > .imp-nav-wrap),
	.e-con:has(> .e-con-inner > .elementor-element .imp-nav-wrap),
	header:has(> .imp-nav-wrap) {
		padding: 0 !important;
		margin: 0 !important;
		border-radius: 0 !important;
		background: #fff !important;
		border: 0 !important;
	}
	/* Full-bleed: Elementor Theme Builder frequently renders the mobile nav
	   inside a container whose computed width is 0 (hidden desktop/mobile
	   variants are stacked in the same header). The margin-based
	   `calc(50% - 50vw)` trick breaks in that case (pulls the bar halfway
	   off-screen to the left). Using position:fixed escapes the parent's
	   box entirely and pins the bar to the viewport's top edge, which is
	   what the user sees on the sticky mobile header anyway. */
	.imp-nav-wrap {
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
		background: var(--jmm-paper) !important;
		border-radius: 0 !important;
		z-index: 9990;
	}
	.imp-nav {
		max-width: none !important;
		width: 100% !important;
		margin: 0 !important;
		border-radius: 0 !important;
		border: none !important;
		box-shadow: none !important;
		padding: 10px 16px !important;
		gap: 12px;
		min-height: 72px;
	}

	/* Drawer covers the full viewport on mobile, so the backdrop is
	   redundant AND it sits above the drawer because it escapes the
	   wrap's fixed stacking context (wrap z:9990 caps its descendants).
	   Hiding it kills the grey dim the user saw as "blur". */
	.imp-nav-backdrop,
	.imp-nav-backdrop.is-open {
		display: none !important;
	}
	/* Logo — multiple selectors so theme overrides can't beat us. */
	.imp-nav .imp-brand-logo,
	.imp-nav img.imp-brand-logo {
		height: 44px !important;
		max-height: 44px !important;
		width: auto !important;
		max-width: 260px !important;
	}

	/* Hide the desktop pill CTA on mobile — it lives inside the drawer instead. */
	.imp-nav > .imp-nav-cta { display: none; }

	.imp-burger {
		display: inline-flex !important;
		align-items: center; justify-content: center;
		width: 40px; height: 40px;
		background: var(--jmm-cream);
		border-radius: 12px;
		border: 1px solid rgba(11,16,32,.10);
		cursor: pointer;
		color: var(--jmm-ink);
		flex-direction: column;
		gap: 4px;
		margin-left: auto;
		padding: 0;
		flex-shrink: 0;
	}
	.imp-burger span {
		width: 16px; height: 1.6px;
		background: var(--jmm-ink);
		display: block;
		border-radius: 2px;
		transition: transform .2s ease, opacity .2s ease;
	}
	.imp-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
	.imp-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.imp-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

	/* Primary nav becomes a right-slide drawer.
	   Animate `right` (not transform) so the drawer does NOT become
	   a containing block for the nested mega panel's position:fixed.
	   IMPORTANT: z-index is only set when .is-open is applied, so the
	   closed drawer does NOT create a stacking context. If it did, the
	   mega panel (a descendant) would be capped at the drawer's z-index
	   in the root stacking order and end up behind the .jmm-backdrop. */
	.imp-nav-drawer {
		display: flex;
		flex-direction: column;
		position: fixed; top: 0; bottom: 0;
		width: 100vw;
		right: -100vw;
		background: var(--jmm-cream);
		transition: right .3s cubic-bezier(.2,.8,.2,1);
		box-shadow: -20px 0 40px -10px rgba(0,0,0,.30);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
	.imp-nav-drawer.is-open {
		right: 0 !important;
		visibility: visible !important;
		opacity: 1 !important;
		pointer-events: auto !important;
		z-index: 10000;
	}

	.imp-drawer-head {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		padding: 14px 18px;
		border-bottom: 1px solid rgba(11,16,32,.08);
		position: sticky; top: 0;
		background: var(--jmm-cream);
		z-index: 2;
		min-height: 72px;
	}
	.imp-drawer-head .imp-brand-logo,
	.imp-drawer-head img.imp-brand-logo {
		height: 38px !important;
		max-height: 38px !important;
		width: auto !important;
		max-width: 240px !important;
	}
	.imp-drawer-close {
		width: 36px; height: 36px;
		border-radius: 10px;
		border: 1px solid rgba(11,16,32,.10);
		background: #fff;
		display: inline-flex; align-items: center; justify-content: center;
		cursor: pointer;
		color: var(--jmm-ink);
	}
	.imp-drawer-close svg { width: 16px; height: 16px; }

	.imp-nav-drawer nav { padding: 4px 0; }
	.imp-nav-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0;
		justify-content: flex-start;
		width: 100%;
	}
	.imp-nav-menu > li { width: 100%; }
	.imp-nav-menu > li > a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 14px 20px;
		border-radius: 0;
		font-size: 15px;
		font-weight: 500;
		color: var(--jmm-ink);
		border-bottom: 1px solid rgba(11,16,32,.06);
	}
	.imp-nav-menu > li > a:hover { background: rgba(200,151,61,.08); color: var(--jmm-gold-deep); }
	.imp-nav-menu > li.current-menu-item > a,
	.imp-nav-menu > li.current_page_item > a {
		border: none;
		border-bottom: 1px solid rgba(11,16,32,.06);
		color: var(--jmm-gold-deep);
	}

	/* CTA inside the drawer — only this one shows on mobile. */
	.imp-nav-drawer > .imp-nav-cta {
		display: inline-flex;
		margin: 18px 18px 22px;
		justify-content: space-between;
		padding: 12px 8px 12px 20px;
	}
}
