/* PassTheBar Exam Insights 1.3.0
   Every rule is scoped under #pbei-root so nothing outside the insights
   block can be affected. */

#pbei-root {
	margin: 42px auto 18px;
	max-width: 960px;
	font-family: inherit;
	color: #1e1e1e;
}

#pbei-root .pbei-title {
	font-size: 24px;
	font-weight: 500;
	margin: 0 0 18px;
}

/* ---------- Card system ---------- */

#pbei-root .pbei-card {
	background: #ffffff;
	border: 1px solid #e7e9ef;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

#pbei-root .pbei-section {
	margin-top: 16px;
}

#pbei-root .pbei-section.pbei-card {
	padding: 18px 20px;
}

#pbei-root .pbei-h {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 12px;
	color: #1e1e1e;
}

#pbei-root .pbei-cap {
	font-size: 13.5px;
	color: #4a5361;
	line-height: 1.6;
	margin: 10px 0 0;
}

#pbei-root .pbei-note {
	font-size: 12px;
	color: #8a94a3;
	line-height: 1.5;
	margin: 5px auto 0;
	max-width: 250px;
}

/* ---------- Top area: gauge + subject bars ---------- */

#pbei-root .pbei-top {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	align-items: center;
	padding: 24px 28px;
}

#pbei-root .pbei-gauge-wrap {
	position: relative;
	width: 260px;
	flex: 0 0 auto;
	margin: 0 auto;
	text-align: center;
}

#pbei-root .pbei-gauge {
	width: 260px;
	height: 158px;
	display: block;
}

#pbei-root .pbei-gauge-track {
	stroke: #eceff4;
	stroke-width: 15;
	stroke-linecap: round;
}

#pbei-root .pbei-gauge-value {
	stroke-width: 15;
	stroke-linecap: round;
	transition: stroke-dasharray 0.6s ease;
}

#pbei-root .pbei-gauge-value.pbei-good { stroke: #2f7d4e; }
#pbei-root .pbei-gauge-value.pbei-mid  { stroke: #b07d1a; }
#pbei-root .pbei-gauge-value.pbei-low  { stroke: #b3423a; }

#pbei-root .pbei-gauge-reach {
	stroke: #d99b23;
	stroke-width: 15;
	stroke-linecap: round;
	opacity: 0.45;
}

#pbei-root .pbei-gauge-target {
	stroke: #365994;
	stroke-width: 3;
	stroke-dasharray: 3 3;
}

#pbei-root .pbei-gauge-center {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 88px;
	width: 150px;
	pointer-events: none;
}

#pbei-root .pbei-gauge-pct {
	font-size: 30px;
	font-weight: 700;
	color: #365994;
	line-height: 1.1;
}

#pbei-root .pbei-gauge-sub {
	font-size: 12px;
	color: #6b7280;
	line-height: 1.3;
	margin-top: 2px;
}

#pbei-root .pbei-gauge-delta {
	margin-top: 8px;
	font-size: 14px;
	font-weight: 600;
}

#pbei-root .pbei-good-text { color: #2f7d4e; }
#pbei-root .pbei-low-text  { color: #b3423a; }

#pbei-root .pbei-reach {
	margin-top: 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: #b07d1a;
	line-height: 1.5;
}

#pbei-root .pbei-bars {
	flex: 1 1 380px;
	min-width: 300px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

#pbei-root .pbei-bar-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

#pbei-root .pbei-bar-label {
	flex: 0 0 190px;
	font-size: 14px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	line-height: 1.25;
}

#pbei-root .pbei-bar-name {
	overflow-wrap: anywhere;
}

#pbei-root .pbei-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

#pbei-root .pbei-badge-focus {
	background: #fdecea;
	color: #b3423a;
}

#pbei-root .pbei-badge-strong {
	background: #e8f4ec;
	color: #2f7d4e;
}

#pbei-root .pbei-bar-track {
	flex: 1 1 auto;
	height: 14px;
	background: #eceff4;
	border-radius: 7px;
	overflow: hidden;
}

#pbei-root .pbei-bar-fill {
	height: 100%;
	border-radius: 7px;
	min-width: 2px;
	transition: width 0.6s ease;
}

#pbei-root .pbei-bar-fill.pbei-good { background: #2f7d4e; }
#pbei-root .pbei-bar-fill.pbei-mid  { background: #d99b23; }
#pbei-root .pbei-bar-fill.pbei-low  { background: #c0524a; }

#pbei-root .pbei-bar-value {
	flex: 0 0 92px;
	font-size: 13px;
	font-weight: 600;
	color: #444;
	text-align: right;
	white-space: nowrap;
}

/* ---------- Stat strip ---------- */

#pbei-root .pbei-strip {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 14px;
	margin-top: 16px;
}

#pbei-root .pbei-stat {
	padding: 14px 16px;
}

#pbei-root .pbei-stat-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 600;
	color: #6b7280;
}

#pbei-root .pbei-stat-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex: 0 0 auto;
	background: #98a2b3;
}

#pbei-root .pbei-stat-score .pbei-stat-dot { background: #365994; }
#pbei-root .pbei-stat-easy  .pbei-stat-dot { background: #d99b23; }
#pbei-root .pbei-stat-hard  .pbei-stat-dot { background: #c0524a; }
#pbei-root .pbei-stat-blank .pbei-stat-dot { background: #98a2b3; }

#pbei-root .pbei-stat-value {
	font-size: 26px;
	font-weight: 700;
	color: #1e1e1e;
	margin-top: 6px;
	line-height: 1.1;
}

#pbei-root .pbei-stat-sub {
	font-size: 12px;
	color: #7c8794;
	margin-top: 3px;
	line-height: 1.4;
}

/* ---------- Marks ledger ---------- */

#pbei-root .pbei-ledger {
	display: flex;
	height: 30px;
	border-radius: 8px;
	overflow: hidden;
}

#pbei-root .pbei-seg {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	color: #ffffff;
	min-width: 3px;
}

#pbei-root .pbei-seg-earned { background: #2f7d4e; }
#pbei-root .pbei-seg-quick  { background: #d99b23; }
#pbei-root .pbei-seg-hard   { background: #c0524a; }
#pbei-root .pbei-seg-blank  { background: #cfd5dd; }

#pbei-root .pbei-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 10px;
}

#pbei-root .pbei-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: #4a5361;
}

#pbei-root .pbei-swatch {
	width: 11px;
	height: 11px;
	border-radius: 3px;
	display: inline-block;
	flex: 0 0 auto;
}

/* ---------- Question map ---------- */

#pbei-root .pbei-map {
	display: grid;
	gap: 6px;
}

#pbei-root .pbei-tile {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 600;
}

#pbei-root .pbei-tile-g {
	background: #e4f1e6;
	color: #1f5c37;
}

#pbei-root .pbei-tile-r {
	background: #fbe9e8;
	color: #8c2f28;
}

#pbei-root .pbei-tile-b {
	background: #f2f4f7;
	color: #7c8794;
	border: 1px dashed #b9c2ce;
}

#pbei-root .pbei-tile-dot {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #e39a1f;
}

/* ---------- Donut ---------- */

#pbei-root .pbei-donut-wrap {
	display: flex;
	align-items: center;
	gap: 28px;
	flex-wrap: wrap;
}

#pbei-root .pbei-donut-holder {
	position: relative;
	width: 190px;
	flex: 0 0 auto;
}

#pbei-root .pbei-donut {
	width: 190px;
	height: 190px;
	display: block;
}

#pbei-root .pbei-donut-center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

#pbei-root .pbei-donut-top {
	font-size: 26px;
	font-weight: 700;
	color: #365994;
	line-height: 1.1;
}

#pbei-root .pbei-donut-sub {
	font-size: 12.5px;
	color: #5a6472;
	margin-top: 2px;
}

#pbei-root .pbei-donut-legend {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 14px;
}

/* ---------- Difficulty bands ---------- */

#pbei-root .pbei-band {
	margin-bottom: 18px;
}

#pbei-root .pbei-band-head {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 5px;
}

#pbei-root .pbei-band-vals {
	color: #5a6472;
	font-weight: 500;
}

#pbei-root .pbei-band-track {
	height: 10px;
	background: #eceff4;
	border-radius: 5px;
	overflow: hidden;
	margin-bottom: 4px;
}

#pbei-root .pbei-band-fill {
	height: 100%;
	border-radius: 5px;
	min-width: 2px;
}

#pbei-root .pbei-band-fill.pbei-good { background: #2f7d4e; }
#pbei-root .pbei-band-fill.pbei-low  { background: #c0524a; }
#pbei-root .pbei-band-fill.pbei-band-cand { background: #b4b2a9; }

/* ---------- Accuracy through the exam ---------- */

#pbei-root .pbei-stage {
	margin-bottom: 14px;
}

#pbei-root .pbei-stage-head {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 5px;
}

#pbei-root .pbei-stage-vals {
	color: #5a6472;
	font-weight: 500;
}

#pbei-root .pbei-stage-track {
	height: 12px;
	background: #eceff4;
	border-radius: 6px;
	overflow: hidden;
}

#pbei-root .pbei-stage-fill {
	height: 100%;
	border-radius: 6px;
	background: #365994;
	min-width: 2px;
}

/* ---------- Timing ---------- */

#pbei-root .pbei-time-track {
	height: 12px;
	background: #eceff4;
	border-radius: 6px;
	overflow: hidden;
}

#pbei-root .pbei-time-fill {
	height: 100%;
	border-radius: 6px;
	background: #365994;
	min-width: 2px;
}

/* ---------- Plan card + promo badge ---------- */

#pbei-root .pbei-plan {
	margin-top: 16px;
	padding: 18px 22px;
}

#pbei-root .pbei-plan-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

#pbei-root .pbei-plan-title {
	font-size: 17px;
	font-weight: 700;
}

#pbei-root .pbei-promo {
	background: #e2f7ef;
	color: #0b7a5e;
	border: 1px solid #b8ead8;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 999px;
	white-space: nowrap;
	animation: pbeiPulse 2.2s ease-in-out infinite;
	will-change: transform;
}

@keyframes pbeiPulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(23, 178, 140, 0.4);
	}
	50% {
		transform: scale(1.05);
		box-shadow: 0 0 0 9px rgba(23, 178, 140, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	#pbei-root .pbei-promo {
		animation: none;
	}
}

#pbei-root .pbei-plan-list {
	margin: 0;
	padding-left: 20px;
}

#pbei-root .pbei-plan-item {
	font-size: 14px;
	line-height: 1.75;
	color: #333;
	margin-bottom: 6px;
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
	#pbei-root .pbei-top {
		padding: 20px 16px;
	}
	#pbei-root .pbei-bar-row {
		flex-wrap: wrap;
	}
	#pbei-root .pbei-bar-label {
		flex: 1 1 100%;
	}
	#pbei-root .pbei-bar-value {
		flex: 0 0 auto;
	}
	#pbei-root .pbei-tile {
		font-size: 10px;
	}
	#pbei-root .pbei-donut-wrap {
		flex-direction: column;
		align-items: center;
	}
	#pbei-root .pbei-strip {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ====================================================================
   v1.3.0: interactivity and reveal animation layer
   The animation rules only apply when JS adds .pbei-anim to the root,
   so with JS animation unavailable everything renders fully static.
   ================================================================== */

/* ---------- Band pills and hover focus ---------- */

#pbei-root .pbei-band-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

#pbei-root .pbei-band-pill {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 9px;
	border-radius: 999px;
	white-space: nowrap;
}

#pbei-root .pbei-band-pill-gap {
	background: #fdf1dc;
	color: #8a5c0a;
	border: 1px solid #f0d9a8;
}

#pbei-root .pbei-band-pill-ahead {
	background: #e4f1e6;
	color: #1f5c37;
	border: 1px solid #c4e0cb;
}

#pbei-root .pbei-band {
	padding: 8px 10px;
	margin-left: -10px;
	margin-right: -10px;
	border-radius: 10px;
	transition: background-color 0.18s ease;
}

#pbei-root .pbei-band:hover {
	background: #f4f6fa;
}

/* ---------- Timing head with pace chip ---------- */

#pbei-root .pbei-time-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

#pbei-root .pbei-time-meta {
	font-size: 12px;
	font-weight: 600;
	color: #365994;
	background: #eef2f9;
	border: 1px solid #d8e0ef;
	padding: 3px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

/* ---------- Interactive question tiles ---------- */

#pbei-root .pbei-tile {
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#pbei-root .pbei-tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 3px 8px rgba(16, 24, 40, 0.14);
}

#pbei-root .pbei-tile:focus-visible {
	outline: 2px solid #365994;
	outline-offset: 2px;
}

#pbei-root .pbei-tile-active {
	box-shadow: 0 0 0 2px #365994;
}

/* ---------- Tile popover ---------- */

#pbei-root .pbei-pop {
	position: absolute;
	z-index: 20;
	max-width: 260px;
	background: #1e2a3d;
	color: #ffffff;
	border-radius: 10px;
	padding: 10px 14px;
	box-shadow: 0 8px 24px rgba(16, 24, 40, 0.28);
	font-size: 13px;
	line-height: 1.5;
}

#pbei-root .pbei-pop-title {
	font-weight: 700;
	margin-bottom: 3px;
}

#pbei-root .pbei-pop-body {
	color: #dbe2ee;
}

/* ---------- Reveal animation layer (only under .pbei-anim) ---------- */

#pbei-root.pbei-anim .pbei-card {
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

#pbei-root.pbei-anim .pbei-card.pbei-in {
	opacity: 1;
	transform: translateY(0);
}

#pbei-root.pbei-anim .pbei-bar-fill,
#pbei-root.pbei-anim .pbei-stage-fill,
#pbei-root.pbei-anim .pbei-band-fill,
#pbei-root.pbei-anim .pbei-time-fill {
	transition: width 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#pbei-root.pbei-anim .pbei-gauge-value,
#pbei-root.pbei-anim .pbei-gauge-reach {
	transition: stroke-dasharray 0.95s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#pbei-root.pbei-anim .pbei-tile-wait {
	opacity: 0;
	transform: scale(0.85);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

#pbei-root.pbei-anim .pbei-tile-wait.pbei-tile-show {
	opacity: 1;
	transform: scale(1);
}

/* ---------- Reduced motion: kill every transition in this layer ---------- */

@media (prefers-reduced-motion: reduce) {
	#pbei-root.pbei-anim .pbei-card,
	#pbei-root.pbei-anim .pbei-bar-fill,
	#pbei-root.pbei-anim .pbei-stage-fill,
	#pbei-root.pbei-anim .pbei-band-fill,
	#pbei-root.pbei-anim .pbei-time-fill,
	#pbei-root.pbei-anim .pbei-gauge-value,
	#pbei-root.pbei-anim .pbei-gauge-reach,
	#pbei-root.pbei-anim .pbei-tile-wait,
	#pbei-root .pbei-tile,
	#pbei-root .pbei-band {
		transition: none;
		opacity: 1;
		transform: none;
	}
}
