/* City Skills Engage — dashboard widgets */
.engage-widget {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 12px;
	padding: 1.25em 1.4em;
	margin-bottom: 1.25em;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.04 );
}
.engage-widget__title {
	margin: 0 0 0.9em;
	font-size: 1.1em;
	color: #1d2327;
}
.engage-widget__empty,
.engage-widget__note {
	color: #646970;
	font-size: 0.92em;
	margin: 0.4em 0 0;
}
.engage-widget__ok {
	color: #1a7f37;
	font-weight: 600;
}

/* Stats */
.engage-stats {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}
.engage-stat {
	flex: 1;
	min-width: 90px;
	text-align: center;
	padding: 0.8em 0.4em;
	background: #f6f9fc;
	border-radius: 10px;
}
.engage-stat__num {
	display: block;
	font-size: 1.9em;
	font-weight: 700;
	color: #2271b1;
	line-height: 1;
}
.engage-stat__num small { font-size: 0.5em; }
.engage-stat__label {
	display: block;
	margin-top: 4px;
	font-size: 0.85em;
	color: #50575e;
}

/* Radar (spiky profile) */
.engage-radar {
	width: 100%;
	max-width: 340px;
	display: block;
	margin: 0 auto;
}
.engage-radar__ring { fill: none; stroke: #e8eaed; stroke-width: 1; }
.engage-radar__axis { stroke: #e8eaed; stroke-width: 1; }
.engage-radar__shape {
	fill: rgba( 34, 113, 177, 0.25 );
	stroke: #2271b1;
	stroke-width: 2;
}
.engage-radar__label { font-size: 11px; fill: #50575e; font-weight: 600; }
.engage-radar__legend {
	list-style: none;
	margin: 1em 0 0;
	padding: 0;
	font-size: 0.85em;
	color: #50575e;
}
.engage-radar__legend li { margin-bottom: 3px; }

/* Axis bars fallback */
.engage-axisbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}
.engage-axisbar__label { flex: 0 0 130px; font-size: 0.9em; }
.engage-axisbar__track { flex: 1; height: 18px; background: #f0f0f1; border-radius: 5px; overflow: hidden; }
.engage-axisbar__fill { height: 100%; background: #2271b1; }
.engage-axisbar__pct { flex: 0 0 40px; font-weight: 600; font-size: 0.9em; }

/* Distance travelled */
.engage-dt__row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.engage-dt__label { flex: 0 0 100px; font-weight: 600; font-size: 0.9em; }
.engage-dt__track {
	flex: 1;
	position: relative;
	height: 22px;
	background: #f0f0f1;
	border-radius: 6px;
	overflow: hidden;
}
.engage-dt__base {
	position: absolute;
	top: 0; left: 0; height: 100%;
	background: #c3c4c7;
}
.engage-dt__current {
	position: absolute;
	top: 0; left: 0; height: 100%;
	background: #2271b1;
	opacity: 0.85;
}
.engage-dt__delta { flex: 0 0 44px; font-weight: 700; text-align: right; }
.engage-dt__delta.is-up { color: #1a7f37; }
.engage-dt__delta.is-down { color: #d63638; }
.engage-dt__legend { font-size: 0.82em; color: #50575e; margin-top: 0.6em; }
.engage-dt__key {
	display: inline-block;
	width: 11px; height: 11px;
	border-radius: 3px;
	margin: 0 4px 0 10px;
	vertical-align: middle;
}
.engage-dt__key--base { background: #c3c4c7; }
.engage-dt__key--current { background: #2271b1; }

/* Readiness */
.engage-readiness__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.6em 0;
	border-bottom: 1px solid #f0f0f1;
}
.engage-readiness__row:last-child { border-bottom: none; }
.engage-readiness__badge {
	padding: 0.2em 0.7em;
	border-radius: 20px;
	font-size: 0.82em;
	font-weight: 600;
}
.engage-readiness.is-green .engage-readiness__badge { background: #edf7ed; color: #1a7f37; }
.engage-readiness.is-amber .engage-readiness__badge { background: #fcf6e6; color: #996800; }
.engage-readiness.is-red .engage-readiness__badge { background: #fcf0f1; color: #b32d2e; }

/* Tables */
.engage-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92em;
}
.engage-table th, .engage-table td {
	text-align: left;
	padding: 0.55em 0.6em;
	border-bottom: 1px solid #f0f0f1;
}
.engage-table th { color: #50575e; font-weight: 600; }

/* Risk */
.engage-risk { list-style: none; margin: 0; padding: 0; }
.engage-risk li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.6em 0.8em;
	margin-bottom: 6px;
	background: #fcf0f1;
	border-left: 3px solid #d63638;
	border-radius: 6px;
}
.engage-risk li span { color: #8a1f24; font-size: 0.85em; }

/* Personal insights */
.engage-insights { list-style: none; margin: 0; padding: 0; }
.engage-insight {
	padding: 0.7em 0.9em;
	margin-bottom: 8px;
	border-radius: 8px;
	background: #f6f9fc;
	border-left: 3px solid #2271b1;
}
.engage-insight--high { border-left-color: #d63638; background: #fcf4f4; }
.engage-insight--medium { border-left-color: #dba617; background: #fdf9ee; }
.engage-insight strong { display: block; margin-bottom: 2px; }
.engage-insight span { color: #50575e; font-size: 0.9em; }

/* ============================================================
   Group Distance Travelled (hub panel + shortcode)
   ============================================================ */
.engage-gdt{--g-base:#c7d2e8;--g-curr:#2f6fed;--g-ink:#1d2733;--g-muted:#64748b;--g-line:#e6ebf2;font-family:inherit;color:var(--g-ink);}
.engage-gdt--empty{color:var(--g-muted);padding:14px 0;}

.engage-gdt__summary-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:14px;}
.engage-gdt__scope{font-weight:600;}
.engage-gdt__count{color:var(--g-muted);font-size:.85rem;}

.engage-gdt__bars{display:flex;flex-direction:column;gap:12px;}
.engage-gdt__bar-label{display:flex;justify-content:space-between;font-size:.85rem;margin-bottom:5px;}
.engage-gdt__track{position:relative;height:10px;background:#eef2f7;border-radius:999px;overflow:hidden;}
.engage-gdt__fill-base{position:absolute;inset:0 auto 0 0;height:100%;background:var(--g-base);border-radius:999px;}
.engage-gdt__fill-curr{position:absolute;inset:0 auto 0 0;height:100%;background:var(--g-curr);border-radius:999px;transition:width .4s ease;}

.engage-gdt__delta{font-weight:700;font-size:.8rem;}
.engage-gdt__delta.up{color:#16a34a;}
.engage-gdt__delta.down{color:#dc2626;}

.engage-gdt__legend{display:flex;gap:18px;margin-top:12px;font-size:.78rem;color:var(--g-muted);}
.engage-gdt__legend span{display:inline-flex;align-items:center;gap:6px;}
.engage-gdt__key{width:12px;height:12px;border-radius:3px;display:inline-block;}
.engage-gdt__key--base{background:var(--g-base);}
.engage-gdt__key--curr{background:var(--g-curr);}

.engage-gdt__list{margin-top:22px;border-top:1px solid var(--g-line);padding-top:8px;}
.engage-gdt__list-head{display:flex;justify-content:space-between;font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--g-muted);padding:6px 4px;}

.engage-gdt__student{border-bottom:1px solid var(--g-line);}
.engage-gdt__student summary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;padding:11px 4px;list-style:none;}
.engage-gdt__student summary::-webkit-details-marker{display:none;}
.engage-gdt__student summary:hover{background:#f8fafc;}
.engage-gdt__student-name{font-weight:600;}
.engage-gdt__student-prog{display:flex;align-items:center;gap:10px;}
.engage-gdt__mini-track{width:90px;height:7px;background:#eef2f7;border-radius:999px;overflow:hidden;}
.engage-gdt__mini-fill{display:block;height:100%;background:var(--g-curr);border-radius:999px;}

.engage-gdt__student-detail{padding:6px 4px 14px;}
.engage-gdt__drow{display:grid;grid-template-columns:1fr auto auto;gap:14px;align-items:center;padding:5px 0;font-size:.85rem;}
.engage-gdt__dname{color:var(--g-muted);}
.engage-gdt__dvals{font-variant-numeric:tabular-nums;}

.engage-gdt__self{display:flex;flex-direction:column;gap:12px;}

@media (prefers-color-scheme: dark){
	.engage-gdt{--g-ink:#e6edf3;--g-muted:#9aa7b4;--g-line:#283039;--g-base:#34405a;}
	.engage-gdt__track,.engage-gdt__mini-track{background:#222a33;}
	.engage-gdt__student summary:hover{background:#1b2129;}
}
