/* =============================================================
 * Entity Profile — compact dark dashboard.
 *
 * Two-column layout: main (relationships/mentions) + sidebar (facts).
 * Solid dark cards, tight spacing, lime accents. RTL-first.
 * --schema-color set inline per entity type.
 * =========================================================== */

/* ---- Canvas ---- */
body.single-eekad_entity {
	background: var(--c-bg-alt);
}
body.single-eekad_entity .eekad-main {
	background: var(--c-bg-alt);
}

/* ---- Draft bar ---- */
.eekad-entity__draft-bar {
	background: rgba(209, 54, 54, .08);
	border-bottom: 1px solid rgba(209, 54, 54, .2);
	color: var(--c-text);
	font-size: 14px;
	padding: 10px 24px;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}
.eekad-entity__draft-badge {
	background: #d13636;
	color: var(--c-text);
	padding: 3px 10px;
	font-weight: 700;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.eekad-entity__draft-bar a {
	color: var(--c-lime, #CDFE64);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* =============================================================
 * HERO — compact header
 * =========================================================== */
.eekad-entity__hero {
	position: relative;
	padding: 100px 0 0;
	background: var(--c-bg-surface);
	border-bottom: 1px solid rgba(var(--c-border-rgb), .06);
}
/* With cover artwork the header grows: 88px of photo plate over a full-bleed
   scene needs room to read as a header rather than a banner accident. */
.eekad-entity__hero.has-cover {
	padding-top: 148px;
	overflow: hidden;
}
.eekad-entity__hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: .5;
	z-index: 0;
}
/* Same scrim shape as the workspace header — solid at the floor where the name
   sits, lifting quickly above it so the artwork survives. */
.eekad-entity__hero-bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		var(--c-bg-surface) 0%,
		rgba(var(--c-bg-surface-rgb), .55) 45%,
		rgba(var(--c-bg-surface-rgb), .18) 100%
	);
}

.eekad-entity__hero-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 24px;
	padding-bottom: 28px;
}

/* Photo */
.eekad-entity__photo {
	flex-shrink: 0;
	width: 88px;
	height: 88px;
	overflow: hidden;
	background: var(--c-bg-elevated);
	border: 1px solid rgba(var(--c-border-rgb), .08);
}
.eekad-entity__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.eekad-entity__photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
}
.eekad-entity__photo--placeholder svg {
	width: 36px;
	height: 36px;
	opacity: .15;
}

/* Schema pill */
.eekad-entity__schema-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 600;
	color: var(--pill-color);
	background: color-mix(in srgb, var(--pill-color) 8%, var(--c-bg-elevated));
	border: 1px solid color-mix(in srgb, var(--pill-color) 12%, transparent);
	margin-bottom: 6px;
	line-height: 1;
	letter-spacing: .03em;
}
.eekad-entity__schema-pill-icon {
	display: flex;
	width: 12px;
	height: 12px;
}
.eekad-entity__schema-pill-icon svg {
	width: 100%;
	height: 100%;
	stroke: var(--pill-color);
}

/* Hero pills row */
.eekad-entity__hero-pills {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
}
.eekad-entity__inv-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 500;
	color: var(--c-text-muted);
	background: rgba(var(--c-border-rgb), .03);
	border: 1px solid rgba(var(--c-border-rgb), .06);
	text-decoration: none;
	transition: background .15s, color .15s;
}
.eekad-entity__inv-pill svg {
	width: 11px;
	height: 11px;
	opacity: .5;
}
.eekad-entity__inv-pill:hover {
	background: rgba(88, 81, 207, .1);
	color: var(--c-text-2);
}

/* Hero text */
.eekad-entity__hero-text {
	flex: 1;
	min-width: 0;
}
.eekad-entity__name {
	font-size: clamp(26px, 3vw, 38px);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 4px;
	color: var(--c-text);
}
.eekad-entity__name-en {
	font-size: 14px;
	color: var(--c-text-faint);
	margin: 0 0 6px;
	font-weight: 400;
	direction: ltr;
	text-align: right;
}
.eekad-entity__summary {
	font-size: 14px;
	color: var(--c-text-muted);
	margin: 0;
	line-height: 1.55;
}
.eekad-entity__hero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}
.eekad-entity__hero-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: rgba(var(--c-border-rgb), .035);
	border: 1px solid rgba(var(--c-border-rgb), .06);
	color: var(--c-text-faint);
	font-size: 13px;
	line-height: 1.35;
}
.eekad-entity__hero-meta-item svg {
	width: 16px;
	height: 16px;
	color: var(--schema-color);
	flex-shrink: 0;
}
.eekad-entity__hero-meta-item strong {
	color: var(--c-text);
	font-weight: 600;
}
.eekad-entity__hero-meta-item a,
.eekad-entity__fact-row dd a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid rgba(var(--c-lime-rgb), .35);
}
.eekad-entity__hero-meta-item a:hover,
.eekad-entity__fact-row dd a:hover {
	color: var(--c-lime, #CDFE64);
	border-bottom-color: currentColor;
}

/* Hero stats */
.eekad-entity__hero-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex-shrink: 0;
}
.eekad-entity__stat-card {
	background: rgba(var(--c-border-rgb), .025);
	border: 1px solid rgba(var(--c-border-rgb), .05);
	padding: 9px 12px;
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.eekad-entity__stat-num {
	font-family: "itf Somaya Arabic";
	font-size: 16px;
	font-weight: 700;
	color: var(--c-lime, #CDFE64);
	line-height: 1;
}
.eekad-entity__stat-label {
	font-size: 11px;
	color: var(--c-text-faint);
	white-space: nowrap;
}

/* =============================================================
 * BODY — two-column grid
 * =========================================================== */
.eekad-entity__body {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 18px;
	padding: 22px 0 64px;
	align-items: start;
}
.eekad-entity__col-main {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}
.eekad-entity__col-side {
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: sticky;
	top: 92px;
}

/* =============================================================
 * CARD — shared container for all sections
 * =========================================================== */
.eekad-entity__card {
	background: var(--c-bg-surface);
	border: 1px solid rgba(var(--c-border-rgb), .045);
	padding: 24px;
}
.eekad-entity__card-title {
	font-size: 17px;
	font-weight: 700;
	color: var(--c-text);
	margin: 0 0 18px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(var(--c-border-rgb), .045);
}
.eekad-entity__card-title svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: var(--c-text-faint);
}
.eekad-entity__card-count {
	margin-inline-start: auto;
	font-family: "itf Somaya Arabic";
	font-size: 12px;
	font-weight: 700;
	color: var(--c-text-faint);
	background: transparent;
	padding: 0;
	line-height: 1;
}

/* =============================================================
 * KEY FACTS — definition list in sidebar
 * =========================================================== */
.eekad-entity__facts-list {
	margin: 0;
}
.eekad-entity__fact-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(var(--c-border-rgb), .03);
}
.eekad-entity__fact-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}
.eekad-entity__fact-row:first-child {
	padding-top: 0;
}
.eekad-entity__fact-row dt {
	font-size: 13px;
	color: var(--c-text-faint);
	font-weight: 500;
	flex-shrink: 0;
}
.eekad-entity__fact-row dd {
	font-size: 14px;
	color: var(--c-text);
	margin: 0;
	text-align: start;
	font-weight: 500;
}

/* =============================================================
 * RELATIONSHIPS — compact rows inside card
 * =========================================================== */
.eekad-entity__card--relationships {
	position: relative;
	display: flex;
	flex-direction: column;
	max-height: min(620px, calc(100vh - 120px));
	overflow: hidden;
}
.eekad-entity__card--relationships .eekad-entity__card-title {
	flex-shrink: 0;
}
.eekad-entity__card--relationships.is-connections-mode {
	max-height: none;
	overflow: visible;
}
.eekad-entity__card--relationships.is-connections-mode .eekad-entity__link-panel {
	flex: none;
	min-height: auto;
}
.eekad-entity__card--relationships.is-connections-mode .eekad-entity__connections-scroll {
	flex: none;
	overflow: visible;
	padding-inline-end: 0;
	margin-inline-end: 0;
}
.eekad-entity__link-modes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0 0 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(var(--c-border-rgb), .06);
}
.eekad-entity__link-mode {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 42px;
	padding: 8px 14px;
	background: rgba(var(--c-border-rgb), .025);
	border: 1px solid rgba(var(--c-border-rgb), .08);
	color: var(--c-text-faint);
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.eekad-entity__link-mode:hover {
	color: var(--c-text);
	border-color: rgba(var(--c-lime-rgb), .24);
}
.eekad-entity__link-mode.is-active {
	background: rgba(var(--c-lime-rgb), .1);
	border-color: rgba(var(--c-lime-rgb), .38);
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__link-mode:only-child {
	grid-column: 1 / -1;
}
.eekad-entity__link-mode-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 22px;
	padding: 0 7px;
	background: rgba(var(--c-border-rgb), .07);
	color: inherit;
	font-family: "itf Somaya Arabic";
	font-size: 12px;
	line-height: 1;
}
.eekad-entity__link-panel {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
}
.eekad-entity__link-panel[hidden] {
	display: none;
}
.eekad-entity__rel-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(var(--c-border-rgb), .06);
}
.eekad-entity__rel-filter {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 6px 12px;
	background: rgba(var(--c-border-rgb), .035);
	border: 1px solid rgba(var(--c-border-rgb), .08);
	color: var(--c-text-faint);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.eekad-entity__rel-filter:hover {
	color: var(--c-text);
	border-color: rgba(var(--c-lime-rgb), .28);
}
.eekad-entity__rel-filter.is-active {
	background: rgba(var(--c-lime-rgb), .11);
	border-color: rgba(var(--c-lime-rgb), .42);
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__rel-select {
	display: none;
	width: 100%;
	min-height: 42px;
	padding: 8px 12px;
	background: rgba(var(--c-border-rgb), .035);
	border: 1px solid rgba(var(--c-border-rgb), .12);
	color: var(--c-text);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	direction: rtl;
}
.eekad-entity__relationships-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding-inline-end: 10px;
	margin-inline-end: -6px;
	scrollbar-color: rgba(var(--c-lime-rgb), .52) rgba(var(--c-border-rgb), .08);
	scrollbar-width: thin;
}
.eekad-entity__relationships-scroll::-webkit-scrollbar {
	width: 8px;
}
.eekad-entity__relationships-scroll::-webkit-scrollbar-track {
	background: rgba(var(--c-border-rgb), .08);
}
.eekad-entity__relationships-scroll::-webkit-scrollbar-thumb {
	background: rgba(var(--c-lime-rgb), .45);
	border-radius: 999px;
}

/* Indirect connections — curated two-hop paths through an entity. */
.eekad-entity__connection-note {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 12px;
	padding: 0;
	color: color-mix(in srgb, var(--c-text) 66%, transparent);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.55;
}
.eekad-entity__connection-note svg {
	flex: 0 0 17px;
	width: 17px;
	height: 17px;
	color: #e8a838;
}
.eekad-entity__connection-filters {
	display: flex;
	gap: 18px;
	margin: 0 0 12px;
	border-bottom: 1px solid rgba(var(--c-border-rgb), .055);
}
.eekad-entity__connection-filter {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 36px;
	padding: 6px 2px 8px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid transparent;
	color: var(--c-text-faint);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.eekad-entity__connection-filter span {
	font-family: "itf Somaya Arabic";
	font-size: 11px;
}
.eekad-entity__connection-filter:hover,
.eekad-entity__connection-filter.is-active {
	color: var(--c-lime, #CDFE64);
	border-bottom-color: var(--c-lime, #CDFE64);
	background: transparent;
}
.eekad-entity__connection-select {
	display: none;
	width: 100%;
	min-height: 42px;
	padding: 8px 12px;
	background: rgba(var(--c-border-rgb), .035);
	border: 1px solid rgba(var(--c-border-rgb), .12);
	color: var(--c-text);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	direction: rtl;
}
.eekad-entity__connections-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding-inline-end: 10px;
	margin-inline-end: -6px;
	scrollbar-color: rgba(var(--c-lime-rgb), .52) rgba(var(--c-border-rgb), .08);
	scrollbar-width: thin;
}
.eekad-entity__connections-scroll::-webkit-scrollbar {
	width: 8px;
}
.eekad-entity__connections-scroll::-webkit-scrollbar-track {
	background: rgba(var(--c-border-rgb), .08);
}
.eekad-entity__connections-scroll::-webkit-scrollbar-thumb {
	background: rgba(var(--c-lime-rgb), .45);
	border-radius: 999px;
}
.eekad-entity__connection-via {
	margin: 0 0 14px;
	background: rgba(var(--c-border-rgb), .018);
	border: 1px solid rgba(var(--c-border-rgb), .055);
}
.eekad-entity__connection-via--organization {
	background: transparent;
	border: 0;
}
.eekad-entity__connection-via:last-child {
	margin-bottom: 0;
}
/* Profile constellation — deterministic, explanatory two-hop graph. */
.eekad-entity__constellation {
	position: relative;
	height: var(--connection-constellation-height, 540px);
	min-height: 420px;
	overflow: hidden;
	background: transparent;
	direction: ltr;
}
.eekad-entity__constellation-meta {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--c-text-faint);
	direction: rtl;
	font-size: 10px;
	font-weight: 700;
}
.eekad-entity__constellation-meta::before {
	width: 5px;
	height: 5px;
	background: var(--c-lime, #CDFE64);
	border-radius: 50%;
	content: "";
}
.eekad-entity__constellation-meta strong {
	color: var(--c-lime, #CDFE64);
	font-family: "itf Somaya Arabic";
	font-size: 11px;
}
.eekad-entity__constellation-edges {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
.eekad-entity__constellation-edge {
	stroke: rgba(var(--c-lime-rgb), .16);
	stroke-width: 1;
	transition: opacity .2s ease, stroke .2s ease, stroke-width .2s ease;
}
.eekad-entity__constellation-edge--trunk {
	stroke: rgba(var(--c-lime-rgb), .4);
}
.eekad-entity__constellation-edge--member.is-preview,
.eekad-entity__constellation-edge--member.is-selected {
	stroke: rgba(var(--c-lime-rgb), .86);
	stroke-width: 1.8;
}
.eekad-entity__constellation.has-selection .eekad-entity__constellation-edge--member:not(.is-selected) {
	opacity: .12;
}
.eekad-entity__constellation-members {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}
.eekad-entity__constellation-node {
	position: absolute;
	left: var(--node-x);
	top: var(--node-y);
	z-index: 2;
	display: flex;
	align-items: center;
	width: 124px;
	padding: 0;
	background: transparent;
	border: 0;
	color: inherit;
	direction: rtl;
	font: inherit;
	text-align: center;
	text-decoration: none;
	transform: translate(-50%, -28px);
	transition: opacity .2s ease;
	flex-direction: column;
}
.eekad-entity__constellation-node--subject {
	transform: translate(-50%, -34px);
}
.eekad-entity__constellation-node--organization {
	width: 180px;
	transform: translate(-50%, -40px);
}
.eekad-entity__constellation-node--member {
	pointer-events: auto;
	cursor: pointer;
}
.eekad-entity__constellation-portrait {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 54px;
	width: 54px;
	height: 54px;
	background: var(--c-bg-elevated);
	border: 1.5px solid rgba(var(--c-lime-rgb), .58);
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(var(--c-lime-rgb), .025);
	color: var(--c-lime, #CDFE64);
	overflow: visible;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.eekad-entity__constellation-node--subject .eekad-entity__constellation-portrait {
	flex-basis: 66px;
	width: 66px;
	height: 66px;
	border-color: rgba(var(--c-lime-rgb), .8);
	box-shadow: 0 0 0 5px rgba(var(--c-lime-rgb), .04);
}
.eekad-entity__constellation-node--organization .eekad-entity__constellation-portrait {
	flex-basis: 78px;
	width: 78px;
	height: 78px;
	background: rgba(88, 81, 207, .08);
	border-color: rgba(88, 81, 207, .7);
	box-shadow: none;
}
.eekad-entity__constellation-portrait img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}
.eekad-entity__constellation-portrait > svg {
	width: 21px;
	height: 21px;
}
.eekad-entity__constellation-node--organization .eekad-entity__constellation-portrait > svg {
	width: 29px;
	height: 29px;
}
.eekad-entity__constellation-node--member:hover .eekad-entity__constellation-portrait,
.eekad-entity__constellation-node--member:focus-visible .eekad-entity__constellation-portrait,
.eekad-entity__constellation-node--member.is-selected .eekad-entity__constellation-portrait {
	border-color: var(--c-lime, #CDFE64);
	box-shadow: 0 0 0 5px rgba(var(--c-lime-rgb), .09), 0 0 22px rgba(var(--c-lime-rgb), .08);
	transform: scale(1.06);
}
.eekad-entity__constellation-node--member:focus-visible {
	outline: 0;
}
.eekad-entity__constellation-node--killed .eekad-entity__constellation-portrait {
	border-color: rgba(255, 77, 79, .78);
}
.eekad-entity__constellation-node--arrested .eekad-entity__constellation-portrait {
	border-color: rgba(250, 140, 22, .78);
}
.eekad-entity__constellation.has-selection .eekad-entity__constellation-node--member:not(.is-selected) {
	opacity: .24;
}
.eekad-entity__constellation-label {
	display: block;
	width: 100%;
	margin-top: 7px;
	overflow: hidden;
	color: var(--c-text);
	font-size: 11px;
	font-weight: 800;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.eekad-entity__constellation-node--subject .eekad-entity__constellation-label,
.eekad-entity__constellation-node--organization .eekad-entity__constellation-label {
	font-size: 13px;
}
.eekad-entity__constellation-node--member:hover .eekad-entity__constellation-label,
.eekad-entity__constellation-node--member:focus-visible .eekad-entity__constellation-label,
.eekad-entity__constellation-node--member.is-selected .eekad-entity__constellation-label,
.eekad-entity__constellation-node--organization:hover .eekad-entity__constellation-label {
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__constellation-kicker {
	display: block;
	width: 100%;
	margin-top: 1px;
	overflow: hidden;
	color: var(--c-text-faint);
	font-size: 9px;
	font-weight: 600;
	line-height: 1.3;
	opacity: 0;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: opacity .18s ease;
}
.eekad-entity__constellation-node--subject .eekad-entity__constellation-kicker,
.eekad-entity__constellation-node--organization .eekad-entity__constellation-kicker,
.eekad-entity__constellation-node--member:hover .eekad-entity__constellation-kicker,
.eekad-entity__constellation-node--member:focus-visible .eekad-entity__constellation-kicker,
.eekad-entity__constellation-node--member.is-selected .eekad-entity__constellation-kicker {
	opacity: 1;
}
.eekad-entity__constellation-edge-label {
	position: absolute;
	left: var(--node-x);
	top: var(--node-y);
	z-index: 3;
	padding: 1px 6px;
	background: #202126;
	color: var(--c-lime, #CDFE64);
	direction: rtl;
	font-size: 9px;
	font-weight: 800;
	line-height: 1.5;
	transform: translate(-50%, -50%);
}
.eekad-entity__constellation-evidence-dot {
	position: absolute;
	top: 0;
	right: 0;
	width: 9px;
	height: 9px;
	background: var(--c-lime, #CDFE64);
	border: 2px solid var(--c-bg-elevated);
	border-radius: 50%;
	box-shadow: 0 0 0 2px rgba(var(--c-lime-rgb), .16);
}
.eekad-entity__constellation-inspector {
	position: absolute;
	top: 28px;
	left: 20px;
	z-index: 8;
	width: min(320px, calc(100% - 40px));
	max-height: calc(100% - 56px);
	padding: 16px;
	overflow-y: auto;
	background: rgba(var(--c-bg-alt-rgb), .96);
	border: 1px solid rgba(var(--c-border-rgb), .1);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
	backdrop-filter: blur(8px);
	direction: rtl;
	scrollbar-color: rgba(var(--c-border-rgb), .28) rgba(var(--c-border-rgb), .06);
	scrollbar-width: thin;
}
.eekad-entity__constellation-inspector[hidden] {
	display: none;
}
.eekad-entity__constellation-detail-close {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var(--c-text-faint);
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.eekad-entity__constellation-detail-close:hover,
.eekad-entity__constellation-detail-close:focus-visible {
	background: rgba(var(--c-border-rgb), .05);
	color: var(--c-text);
}
.eekad-entity__constellation-detail-close svg {
	width: 14px;
	height: 14px;
}
.eekad-entity__constellation-detail {
	display: flex;
	gap: 16px;
	flex-direction: column;
}
.eekad-entity__constellation-detail[hidden] {
	display: none;
}
.eekad-entity__constellation-detail-person {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	padding-inline-end: 2px;
	padding-inline-start: 34px;
}
.eekad-entity__constellation-detail-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	background: var(--c-bg-elevated);
	border: 1px solid rgba(var(--c-border-rgb), .1);
	border-radius: 50%;
	color: var(--c-lime, #CDFE64);
	overflow: hidden;
}
.eekad-entity__constellation-detail-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.eekad-entity__constellation-detail-avatar svg {
	width: 15px;
	height: 15px;
}
.eekad-entity__constellation-detail-person > span:last-child {
	display: flex;
	min-width: 0;
	flex-direction: column;
}
.eekad-entity__constellation-detail-person strong {
	color: var(--c-text);
	font-size: 13px;
	font-weight: 800;
}
.eekad-entity__constellation-detail-person small,
.eekad-entity__constellation-detail-evidence time {
	color: var(--c-text-faint);
	font-size: 9px;
	font-weight: 600;
}
.eekad-entity__constellation-detail-events {
	display: flex;
	gap: 7px;
	padding-top: 13px;
	border-top: 1px solid rgba(var(--c-border-rgb), .07);
	flex-direction: column;
}
.eekad-entity__constellation-detail-events-title {
	margin-bottom: 1px;
	color: var(--c-lime, #CDFE64);
	font-size: 10px;
	font-weight: 800;
}
.eekad-entity__constellation-detail-evidence {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding: 5px 0;
	background: transparent;
	border: 0;
	color: inherit;
	text-decoration: none;
	transition: opacity .15s ease;
}
.eekad-entity__constellation-detail-evidence:hover {
	opacity: .82;
}
.eekad-entity__constellation-detail-evidence-media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: var(--c-bg-elevated);
	color: var(--c-lime, #CDFE64);
	overflow: hidden;
}
.eekad-entity__constellation-detail-evidence-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.eekad-entity__constellation-detail-evidence-media svg {
	width: 18px;
	height: 18px;
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__constellation-detail-evidence > span:last-child {
	display: flex;
	min-width: 0;
	gap: 2px;
	flex-direction: column;
}
.eekad-entity__constellation-detail-evidence strong {
	overflow: hidden;
	color: var(--c-text);
	font-size: 11px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.eekad-entity__constellation-detail-evidence:hover strong {
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__constellation-detail-evidence time {
	font-family: "itf Somaya Arabic";
}
.eekad-entity__constellation-detail-no-evidence {
	display: block;
	padding: 13px 0 0;
	background: transparent;
	border: 0;
	border-top: 1px solid rgba(var(--c-border-rgb), .07);
	color: var(--c-text-faint);
	font-size: 10px;
	font-weight: 600;
}
.eekad-entity__constellation-detail-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	align-self: flex-start;
	color: var(--c-lime, #CDFE64);
	font-size: 10px;
	font-weight: 800;
	text-decoration: none;
}
.eekad-entity__constellation-detail-link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.eekad-entity__connection-via-header {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 12px;
	background: rgba(var(--c-border-rgb), .025);
	border-bottom: 1px solid rgba(var(--c-border-rgb), .05);
}
.eekad-entity__connection-via-icon,
.eekad-entity__connection-via-image {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	background: color-mix(in srgb, currentColor 8%, transparent);
	border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
	overflow: hidden;
}
.eekad-entity__connection-via-icon svg {
	width: 19px;
	height: 19px;
}
.eekad-entity__connection-via-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.eekad-entity__connection-via-info {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	gap: 1px;
}
.eekad-entity__connection-via-label {
	color: var(--c-text-faint);
	font-size: 11px;
	font-weight: 700;
}
.eekad-entity__connection-via-title {
	overflow: hidden;
	color: var(--c-text);
	font-size: 15px;
	font-weight: 800;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.eekad-entity__connection-via-title:hover {
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__connection-subject-role {
	color: var(--c-text-faint);
	font-size: 12px;
	font-weight: 600;
}
.eekad-entity__connection-via-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	background: rgba(var(--c-lime-rgb), .08);
	color: var(--c-lime, #CDFE64);
	font-family: "itf Somaya Arabic";
	font-size: 12px;
	font-weight: 800;
}
.eekad-entity__connection-people {
	display: flex;
	flex-direction: column;
}
.eekad-entity__connection-people > .eekad-entity__connection-person-main {
	border-bottom: 1px solid rgba(var(--c-border-rgb), .035);
}
.eekad-entity__connection-people > .eekad-entity__connection-person-main:last-child {
	border-bottom: 0;
}
.eekad-entity__connection-person-main {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 12px;
	color: inherit;
	text-decoration: none;
	transition: background .15s ease;
}
.eekad-entity__connection-person-main:hover {
	background: rgba(var(--c-border-rgb), .025);
}
.eekad-entity__connection-person-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	background: rgba(var(--c-lime-rgb), .055);
	border: 1px solid rgba(var(--c-lime-rgb), .11);
	color: var(--c-lime, #CDFE64);
	overflow: hidden;
}
.eekad-entity__connection-person-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.eekad-entity__connection-person-avatar svg {
	width: 17px;
	height: 17px;
}
.eekad-entity__connection-person-info {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	gap: 1px;
}
.eekad-entity__connection-person-name {
	overflow: hidden;
	color: var(--c-text);
	font-size: 14px;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.eekad-entity__connection-person-main:hover .eekad-entity__connection-person-name {
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__connection-person-role {
	color: color-mix(in srgb, var(--c-text) 58%, transparent);
	font-size: 11px;
	font-weight: 700;
}
.eekad-entity__connection-path {
	overflow: hidden;
	color: var(--c-text-faint);
	font-size: 11px;
	opacity: .66;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.eekad-entity__rel-group {
	position: relative;
	margin-bottom: 16px;
}
.eekad-entity__rel-group:last-child {
	margin-bottom: 0;
}
.eekad-entity__rel-group--locked {
	min-height: 180px;
	padding-block: 6px;
	overflow: hidden;
}
.eekad-entity__rel-group--locked > :not(.eekad-entity__rel-lock) {
	filter: blur(5px);
	opacity: .42;
	pointer-events: none;
	user-select: none;
}
.eekad-entity__rel-lock {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 28px 18px;
	text-align: center;
	color: var(--c-text);
}
.eekad-entity__rel-lock-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	color: var(--c-lime, #CDFE64);
	background: rgba(var(--c-lime-rgb), .1);
	border: 1px solid rgba(var(--c-lime-rgb), .28);
}
.eekad-entity__rel-lock-icon svg {
	width: 24px;
	height: 24px;
}
.eekad-entity__rel-lock-title {
	font-family: "itf Somaya Arabic";
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--c-text);
}

.eekad-entity__rel-type {
	font-size: 12px;
	font-weight: 600;
	color: var(--c-text-faint);
	text-transform: none;
	letter-spacing: 0;
	margin: 0 0 4px;
	padding: 8px 4px 4px;
	border-top: 1px solid rgba(var(--c-border-rgb), .04);
}
.eekad-entity__rel-group:first-child .eekad-entity__rel-type {
	border-top: none;
	padding-top: 0;
}

.eekad-entity__rel-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 6px;
	text-decoration: none;
	color: inherit;
	transition: background .15s ease;
	border-bottom: 1px solid rgba(var(--c-border-rgb), .025);
}
.eekad-entity__rel-row:last-child {
	border-bottom: none;
}
.eekad-entity__rel-row:hover {
	background: rgba(var(--c-border-rgb), .03);
}

.eekad-entity__rel-icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, currentColor 8%, transparent);
	border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}
.eekad-entity__rel-icon svg {
	width: 16px;
	height: 16px;
	opacity: .8;
}
/* Portrait fills the tile edge to edge — the tinted glyph chrome would
   otherwise read as a frame around the face. */
.eekad-entity__rel-icon.has-photo {
	background: none;
	border-color: rgba(var(--c-border-rgb), .16);
	overflow: hidden;
}
.eekad-entity__rel-icon.has-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.eekad-entity__rel-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.eekad-entity__rel-name {
	font-size: 15px;
	font-weight: 600;
	color: var(--c-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.eekad-entity__rel-role {
	font-size: 13px;
	color: var(--c-text-faint);
}

/* Command type sits on the trailing edge so the row scans as "who → in what
   capacity". The organizational anchor stays under the name, where it reads
   as part of identifying the entity rather than as a property of the edge.
   Wraps under the name on narrow screens rather than squeezing both columns. */
.eekad-entity__rel-meta {
	margin-inline-start: auto;
	flex-shrink: 0;
	max-width: 42%;
	text-align: end;
	font-size: 13px;
	line-height: 1.45;
	color: var(--c-text-faint);
}
.eekad-entity__rel-meta .eekad-entity__rel-role {
	font-size: inherit;
}

/* Organizational anchor on an edge (e.g. command scoped to a militia).
   Its own line under the name, no longer trailing the role. */
.eekad-entity__rel-context {
	font-size: 13px;
	color: var(--c-text-muted);
}

@media (max-width: 640px) {
	.eekad-entity__rel-row {
		flex-wrap: wrap;
	}
	.eekad-entity__rel-meta {
		flex-basis: 100%;
		max-width: none;
		margin-inline-start: 48px;
		text-align: start;
	}
}

/* Editorial description written on the edge — quiet, clamped. */
.eekad-entity__rel-note {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin-block-start: 4px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--c-text-muted);
}

.eekad-entity__rel-badges {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.eekad-entity__rel-event-timeline {
	position: relative;
	padding: 6px 22px 2px 0;
}
.eekad-entity__rel-event-line {
	position: absolute;
	inset-inline-start: 5px;
	top: 8px;
	bottom: 8px;
	width: 1px;
	background: rgba(var(--c-border-rgb), .08);
}
.eekad-entity__rel-event-year {
	position: relative;
	margin: 10px 0 8px;
	font-family: "itf Somaya Arabic";
	font-size: 13px;
	font-weight: 700;
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__rel-event-year::before {
	content: '';
	position: absolute;
	inset-inline-start: -22px;
	top: 7px;
	width: 10px;
	height: 10px;
	background: var(--c-bg-surface);
	border: 2px solid var(--c-lime, #CDFE64);
}
.eekad-entity__rel-event {
	position: relative;
	display: block;
	padding: 7px 0;
	color: inherit;
	text-decoration: none;
}
.eekad-entity__rel-event-dot {
	position: absolute;
	inset-inline-start: -20px;
	top: 22px;
	width: 7px;
	height: 7px;
	background: var(--event-color, var(--c-lime, #CDFE64));
	border: 1px solid var(--c-bg-surface);
}
.eekad-entity__rel-event-body {
	display: grid;
	grid-template-columns: minmax(92px, max-content) minmax(0, 1fr);
	align-items: center;
	gap: 18px;
	padding: 12px 14px;
	background: rgba(var(--c-border-rgb), .018);
	border: 1px solid rgba(var(--c-border-rgb), .035);
	direction: ltr;
	transition: background .15s ease, border-color .15s ease;
}
.eekad-entity__rel-event:hover .eekad-entity__rel-event-body {
	background: rgba(var(--c-border-rgb), .035);
	border-color: rgba(var(--c-lime-rgb), .12);
}
.eekad-entity__rel-event-date {
	font-family: "itf Somaya Arabic";
	font-size: 12px;
	font-weight: 700;
	color: var(--c-text-faint);
	white-space: nowrap;
	text-align: left;
}
.eekad-entity__rel-event-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	text-align: right;
	direction: rtl;
}
.eekad-entity__rel-event-title {
	color: var(--c-text);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.45;
}
.eekad-entity__rel-event:hover .eekad-entity__rel-event-title {
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__rel-event-role {
	color: var(--c-text-faint);
	font-size: 13px;
	font-weight: 600;
}

/* Badges */
.eekad-entity__badge {
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	line-height: 1;
	letter-spacing: .02em;
}
.eekad-entity__badge--active {
	background: rgba(var(--c-lime-rgb), .08);
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__badge--past {
	background: rgba(var(--c-border-rgb), .04);
	color: var(--c-text-faint);
}
.eekad-entity__badge--alleged {
	background: rgba(232, 168, 56, .08);
	color: #e8a838;
}
.eekad-entity__badge--disputed {
	background: rgba(197, 78, 69, .08);
	color: #d13636;
}
.eekad-entity__badge--withdrawn {
	background: rgba(var(--c-border-rgb), .02);
	color: var(--c-text-faint);
}

/* =============================================================
 * MENTIONS — compact rows
 * =========================================================== */
.eekad-entity__mention-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 14px;
	text-decoration: none;
	color: inherit;
	transition: background .15s ease;
	border-bottom: 1px solid rgba(var(--c-border-rgb), .025);
}
.eekad-entity__mention-row:last-child {
	border-bottom: none;
}
.eekad-entity__mention-row:hover {
	background: rgba(var(--c-border-rgb), .03);
}
.eekad-entity__mention-title {
	font-size: 15px;
	font-weight: 500;
	color: var(--c-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
	min-width: 0;
}
.eekad-entity__mention-date {
	font-family: "itf Somaya Arabic";
	font-size: 12px;
	color: var(--c-text-faint);
	flex-shrink: 0;
}

/* =============================================================
 * PROSE
 * =========================================================== */
.eekad-entity__prose {
	font-size: 15px;
	color: var(--c-text-3);
	line-height: 1.7;
}
.eekad-entity__prose p {
	margin: 0 0 .8em;
}
.eekad-entity__biography {
	font-size: 16px;
	line-height: 1.85;
	color: var(--c-text-2);
}
.eekad-entity__description {
	color: var(--c-text-2);
}
.eekad-entity__card--location-map .eekad-iv-map {
	background: transparent;
	border: 0;
}
.eekad-entity__card--location-map .eekad-iv-map__header {
	padding: 0 0 14px;
}
.eekad-entity__card--location-map .eekad-iv-map__canvas-wrap {
	border: 1px solid rgba(var(--c-border-rgb), .085);
}
.eekad-entity__card--location-map .eekad-iv-map__caption {
	padding: 12px 0 0;
	border-top: 0;
}

/* =============================================================
 * MEDIA GALLERY
 * =========================================================== */
.eekad-entity__gallery {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) 34px;
	align-items: center;
	gap: 8px;
}
.eekad-entity__gallery--no-scroll {
	grid-template-columns: minmax(0, 1fr);
}
.eekad-entity__gallery-item {
	position: relative;
	display: block;
	flex: 0 0 clamp(132px, 18vw, 190px);
	aspect-ratio: 5 / 4;
	overflow: hidden;
	background: rgba(var(--c-border-rgb), .035);
	border: 1px solid rgba(var(--c-border-rgb), .065);
	color: var(--c-text);
	cursor: zoom-in;
	padding: 0;
}
.eekad-entity__gallery-item img,
.eekad-entity__gallery-video-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .2s ease, opacity .2s ease;
}
.eekad-entity__gallery-video-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .035);
	color: var(--c-text-muted);
}
.eekad-entity__gallery-video-placeholder svg {
	width: 42px;
	height: 42px;
}
.eekad-entity__gallery-item:hover img,
.eekad-entity__gallery-item:hover .eekad-entity__gallery-video-placeholder {
	transform: scale(1.025);
	opacity: .88;
}
.eekad-entity__gallery-item.is-video {
	cursor: pointer;
}
.eekad-entity__gallery-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	color: #fff;
}
.eekad-entity__gallery-play::before {
	content: "";
	position: absolute;
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .46);
	border: 1px solid rgba(255, 255, 255, .2);
}
.eekad-entity__gallery-play svg {
	position: relative;
	width: 34px;
	height: 34px;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .55));
	transform: translateX(-1px);
}
.eekad-entity__gallery-index {
	position: absolute;
	inset-block-start: 8px;
	inset-inline-end: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 28px;
	background: rgba(15, 18, 22, .82);
	border: 1px solid rgba(var(--c-border-rgb), .14);
	color: var(--c-text);
	font-family: "itf Somaya Arabic";
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}
.eekad-entity__gallery-track {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}
.eekad-entity__gallery-track::-webkit-scrollbar {
	display: none;
}
.eekad-entity__gallery-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 100%;
	min-height: 96px;
	border: 1px solid rgba(var(--c-border-rgb), .065);
	background: rgba(var(--c-border-rgb), .035);
	color: var(--c-text-muted);
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.eekad-entity__gallery-nav:hover {
	background: rgba(var(--c-lime-rgb), .08);
	border-color: rgba(var(--c-lime-rgb), .2);
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__gallery-nav:disabled {
	cursor: default;
	opacity: .28;
	background: rgba(var(--c-border-rgb), .02);
	border-color: rgba(var(--c-border-rgb), .045);
	color: var(--c-text-faint);
}
.eekad-entity__gallery-nav:disabled:hover {
	background: rgba(var(--c-border-rgb), .02);
	border-color: rgba(var(--c-border-rgb), .045);
	color: var(--c-text-faint);
}
.eekad-entity__gallery-nav[hidden] {
	display: none;
}
.eekad-entity__gallery-nav svg {
	width: 20px;
	height: 20px;
}

/* =============================================================
 * EMPTY STATE
 * =========================================================== */
.eekad-entity__empty {
	text-align: center;
	padding: 60px 0;
	color: var(--c-text-faint);
	font-size: 14px;
}

/* =============================================================
 * MINI-TIMELINE — vertical line with compact items
 * =========================================================== */
.eekad-entity__timeline {
	position: relative;
	padding-inline-start: 24px;
}
.eekad-entity__timeline-line {
	position: absolute;
	inset-inline-start: 5px;
	top: 0;
	bottom: 0;
	width: 1px;
	background: rgba(var(--c-border-rgb), .06);
}
.eekad-entity__timeline-year {
	font-family: "itf Somaya Arabic";
	font-size: 13px;
	font-weight: 700;
	color: var(--c-lime, #CDFE64);
	padding: 12px 0 8px;
	position: relative;
}
.eekad-entity__timeline-year::before {
	content: '';
	position: absolute;
	inset-inline-start: -23px;
	top: 16px;
	width: 11px;
	height: 11px;
	background: var(--c-bg-surface);
	border: 2px solid var(--c-lime, #CDFE64);
}
.eekad-entity__timeline-item {
	position: relative;
	padding: 8px 0;
}
.eekad-entity__timeline-dot {
	position: absolute;
	inset-inline-start: -22px;
	top: 14px;
	width: 9px;
	height: 9px;
	background: var(--item-color, rgba(var(--c-border-rgb), .2));
	border: 1px solid var(--c-bg-surface);
}
.eekad-entity__timeline-content {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 12px;
	padding: 10px 14px;
	background: rgba(var(--c-border-rgb), .02);
	border: 1px solid rgba(var(--c-border-rgb), .03);
	transition: background .15s ease;
}
.eekad-entity__timeline-content:hover {
	background: rgba(var(--c-border-rgb), .04);
}
.eekad-entity__timeline-date {
	font-family: "itf Somaya Arabic";
	font-size: 12px;
	color: var(--c-text-faint);
	flex-shrink: 0;
}
.eekad-entity__timeline-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--c-text);
	text-decoration: none;
}
a.eekad-entity__timeline-title:hover {
	color: var(--c-lime, #CDFE64);
}
.eekad-entity__timeline-desc {
	font-size: 13px;
	color: var(--c-text-faint);
	width: 100%;
}
.eekad-entity__timeline-type {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	margin-inline-start: auto;
}
.eekad-entity__timeline-type--event {
	background: rgba(209, 54, 54, .1);
	color: #d13636;
}
.eekad-entity__timeline-type--relationship {
	background: rgba(88, 81, 207, .1);
	color: #5851cf;
}
.eekad-entity__timeline-type--lifecycle {
	background: rgba(var(--c-lime-rgb), .08);
	color: var(--c-lime, #CDFE64);
}

/* =============================================================
 * RESPONSIVE
 * =========================================================== */
@media (max-width: 900px) {
	.eekad-entity__body {
		grid-template-columns: 1fr;
	}
	.eekad-entity__col-side {
		order: -1;
		position: static;
	}
}

@media (max-width: 760px) {
	.eekad-entity__constellation {
		display: flex;
		height: auto;
		min-height: 0;
		padding: 12px 0 4px;
		background: transparent;
		flex-direction: column;
	}
	.eekad-entity__constellation-meta {
		position: static;
		align-self: center;
		margin-bottom: 20px;
	}
	.eekad-entity__constellation-edges {
		display: none;
	}
	.eekad-entity__constellation-node--subject,
	.eekad-entity__constellation-node--organization {
		position: relative;
		left: auto;
		top: auto;
		align-self: center;
		transform: none;
	}
	.eekad-entity__constellation-edge-label {
		position: relative;
		left: auto;
		top: auto;
		align-self: center;
		margin: 12px 0;
		transform: none;
	}
	.eekad-entity__constellation-edge-label::before,
	.eekad-entity__constellation-edge-label::after {
		position: absolute;
		left: 50%;
		width: 1px;
		height: 12px;
		background: rgba(var(--c-lime-rgb), .35);
		content: "";
	}
	.eekad-entity__constellation-edge-label::before {
		bottom: 100%;
	}
	.eekad-entity__constellation-edge-label::after {
		top: 100%;
	}
	.eekad-entity__constellation-members {
		position: relative;
		inset: auto;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
		gap: 13px;
		width: 100%;
		margin-top: 26px;
		padding: 12px 8px 10px;
		overflow: visible;
		direction: rtl;
		pointer-events: auto;
	}
	.eekad-entity__constellation-node--member {
		position: relative;
		left: auto;
		top: auto;
		width: 100%;
		transform: none;
	}
	.eekad-entity__constellation-node--member:hover,
	.eekad-entity__constellation-node--member:focus-visible,
	.eekad-entity__constellation-node--member.is-selected {
		transform: none;
	}
	.eekad-entity__constellation-inspector {
		position: relative;
		top: auto;
		left: auto;
		width: 100%;
		max-height: none;
		margin-top: 18px;
		padding: 16px;
	}
}

@media (max-width: 640px) {
	.eekad-entity__hero {
		padding-top: 80px;
	}
	.eekad-entity__hero-inner {
		flex-wrap: wrap;
	}
	.eekad-entity__hero-stats {
		width: 100%;
		justify-content: stretch;
	}
	.eekad-entity__stat-card {
		flex: 1;
	}
	.eekad-entity__name {
		font-size: 22px;
	}
	.eekad-entity__body {
		padding: 16px 0 40px;
		gap: 12px;
	}
	.eekad-entity__card {
		padding: 20px;
	}
	.eekad-entity__gallery {
		grid-template-columns: 32px minmax(0, 1fr) 32px;
		gap: 8px;
	}
	.eekad-entity__gallery--no-scroll {
		grid-template-columns: minmax(0, 1fr);
	}
	.eekad-entity__gallery-item {
		flex-basis: 142px;
	}
	.eekad-entity__gallery-nav {
		width: 32px;
		min-height: 96px;
	}
	.eekad-entity__rel-filters {
		display: block;
	}
	.eekad-entity__rel-filter {
		display: none;
	}
	.eekad-entity__rel-select {
		display: block;
	}
	.eekad-entity__rel-badges {
		display: none;
	}
	.eekad-entity__rel-event-body {
		grid-template-columns: 1fr;
		gap: 4px;
		direction: rtl;
	}
	.eekad-entity__rel-event-date {
		text-align: right;
	}
	.eekad-entity__connection-filters {
		display: block;
	}
	.eekad-entity__connection-filter {
		display: none;
	}
	.eekad-entity__connection-select {
		display: block;
	}
	.eekad-entity__connection-person-main > .eekad-entity__badge {
		display: none;
	}
}

/* =============================================================
 * DOSSIER LAYER — Apple-grammar redesign of the entity profile.
 *
 * Appended so it wins the cascade over the component styles above
 * (same pattern as the theme's homepage redesign layer). One deep
 * canvas, a portrait-led dossier hero, unboxed editorial sections,
 * contrast selection, hairline lists. Lime is reserved for
 * interactive hovers and semantic schema/status colour.
 * =========================================================== */

/* ---- 1. Canvas: one deep background, no hero band ---- */
body.single-eekad_entity {
	background: var(--c-bg-base);
}
.eekad-entity__hero {
	background: transparent;
	border-bottom: 0;
	padding: clamp(72px, 8vw, 110px) 0 0;
}

/* ---- 2. Dossier hero: the subject leads ---- */
.eekad-entity__hero-inner {
	align-items: flex-start;
	gap: clamp(28px, 4vw, 48px);
	padding-bottom: clamp(40px, 5vw, 64px);
}
.eekad-entity__photo {
	width: clamp(150px, 16vw, 210px);
	height: clamp(150px, 16vw, 210px);
	background: var(--c-bg-surface);
	border: 1px solid var(--glass-edge);
	border-top-color: var(--glass-edge-top);
	box-shadow: 0 24px 60px -28px rgba(0, 0, 0, .8);
}
.eekad-entity__photo--placeholder svg {
	width: 64px;
	height: 64px;
	opacity: .2;
}
.eekad-entity__name {
	font-size: clamp(38px, 4.5vw, 60px);
	line-height: 1.1;
	margin: 0 0 8px;
}
.eekad-entity__name-en {
	font-size: 15px;
	margin: 0 0 14px;
}
.eekad-entity__summary {
	font-size: 17px;
	line-height: 1.75;
	color: var(--c-text-2);
	max-width: 58ch;
}
/* Schema pill keeps its semantic colour; the chrome goes glass. */
.eekad-entity__schema-pill {
	padding: 6px 12px;
	font-size: 12px;
	letter-spacing: 0; /* Arabic — never tracked */
	background: var(--glass-bg);
	border: 1px solid var(--glass-edge);
	margin-bottom: 0;
}
.eekad-entity__hero-pills {
	gap: 8px;
	margin-bottom: 14px;
}
.eekad-entity__inv-pill {
	background: var(--glass-bg);
	border: 1px solid var(--glass-edge);
	border-top-color: var(--glass-edge-top);
}
.eekad-entity__inv-pill:hover {
	background: var(--glass-bg-hover);
}

/* Stats: numbers on the canvas, no boxes. */
.eekad-entity__hero-stats {
	flex-direction: row;
	gap: clamp(24px, 3vw, 40px);
	margin-top: 6px;
}
.eekad-entity__stat-card {
	background: transparent;
	border: 0;
	padding: 0;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}
.eekad-entity__stat-num {
	font-size: 30px;
	color: var(--c-text);
}
.eekad-entity__stat-label {
	font-size: 12px;
}

/* Quiet metadata chips → plain text runs. */
.eekad-entity__hero-meta {
	gap: 18px;
	margin-top: 16px;
}
.eekad-entity__hero-meta-item {
	padding: 0;
	background: transparent;
	border: 0;
	font-size: 14px;
	color: var(--c-text-muted);
}

/* ---- 3. Body: reading rhythm, not dashboard packing ---- */
.eekad-entity__body {
	gap: clamp(32px, 4vw, 56px);
	padding: 8px 0 96px;
}
.eekad-entity__col-main {
	gap: clamp(48px, 6vw, 72px);
}
.eekad-entity__col-side {
	gap: 40px;
}

/* ---- 4. Sections: space instead of boxes ---- */
.eekad-entity__card {
	background: transparent;
	border: 0;
	padding: 0;
}
.eekad-entity__card-title {
	font-size: clamp(22px, 2.2vw, 28px);
	padding-bottom: 0;
	border-bottom: 0;
	margin: 0 0 22px;
}
.eekad-entity__card-title svg {
	display: none; /* editorial titles, not admin icons */
}
.eekad-entity__prose {
	font-size: 17px;
	line-height: 1.85;
	color: var(--c-text-2);
	max-width: 70ch;
}

/* The relationships card keeps its own scroll body but loses the box. */
.eekad-entity__card--relationships {
	max-height: none;
}
.eekad-entity__relationships-scroll,
.eekad-entity__connections-scroll {
	scrollbar-color: rgba(var(--c-border-rgb), .25) transparent;
}

/* ---- 5. Selection = contrast ---- */
.eekad-entity__link-modes {
	border-bottom: 0;
	padding-bottom: 0;
	gap: 4px;
	display: inline-flex;
	background: var(--glass-bg);
	border: 1px solid var(--glass-edge);
	border-top-color: var(--glass-edge-top);
	padding: 3px;
	/* The track hugs its tabs instead of stretching across the card. The
	   base rule above still declares a 2-column grid, and a stretched
	   parent (grid or flex) would otherwise pull this to full width, so
	   pin the sizing and the alignment explicitly rather than relying on
	   inline-flex alone. */
	grid-template-columns: none;
	width: fit-content;
	max-width: 100%;
	justify-self: start;
	align-self: start;
	margin-inline-end: auto;
}
.eekad-entity__link-mode {
	min-height: 40px;
	background: transparent;
	border: 0;
	color: var(--c-text-muted);
	font-weight: 600;
	font-size: 14px;
}
.eekad-entity__link-mode:hover {
	color: var(--c-text);
	border-color: transparent;
}
.eekad-entity__link-mode.is-active {
	background: var(--c-text);
	border-color: var(--c-text);
	color: var(--c-bg-base);
}
.eekad-entity__link-mode.is-active .eekad-entity__link-mode-count {
	background: rgba(0, 0, 0, .14);
	color: inherit;
}
.eekad-entity__rel-filters {
	border-bottom: 0;
	padding-bottom: 4px;
}
.eekad-entity__rel-filter {
	background: var(--glass-bg);
	border: 1px solid var(--glass-edge);
	border-top-color: var(--glass-edge-top);
	color: var(--c-text-2);
	font-weight: 600;
}
.eekad-entity__rel-filter:hover {
	color: var(--c-text);
	background: var(--glass-bg-hover);
	border-color: var(--glass-edge);
}
.eekad-entity__rel-filter.is-active {
	background: var(--c-text);
	border-color: var(--c-text);
	color: var(--c-bg-base);
}

/* ---- 6. Timeline & rows: quiet instrument, semantic colour only ---- */
.eekad-entity__rel-event-year {
	color: var(--c-text);
	letter-spacing: 0; /* Arabic — never tracked */
}
.eekad-entity__rel-event-dot {
	background: var(--event-color, var(--c-text-faint));
	border-color: var(--c-bg-base);
}
.eekad-entity__fact-row {
	border-bottom: 1px solid rgba(var(--c-border-rgb), .08);
	padding: 12px 0;
}
.eekad-entity__fact-row dt {
	font-size: 12px;
}
.eekad-entity__fact-row dd {
	font-size: 15px;
}
.eekad-entity__hero-meta-item a,
.eekad-entity__fact-row dd a {
	border-bottom-color: rgba(var(--c-border-rgb), .3);
}
.eekad-entity__hero-meta-item a:hover,
.eekad-entity__fact-row dd a:hover {
	color: var(--c-lime, #CDFE64); /* interactive hover — earned lime */
	border-bottom-color: currentColor;
}

/* ---- 7. Gallery: exhibits, not boxes ---- */
.eekad-entity__gallery-item {
	border: 1px solid var(--glass-edge);
	border-top-color: var(--glass-edge-top);
	background: var(--c-bg-surface);
}
.eekad-entity__gallery-index {
	font-family: var(--font-mono, monospace);
	background: rgba(var(--c-bg-base-rgb), .7);
	color: var(--c-text-2);
	letter-spacing: 0;
}

/* ---- 8. Mobile: the dossier stacks ---- */
@media (max-width: 800px) {
	.eekad-entity__hero-inner {
		flex-direction: column;
		align-items: flex-start;
	}
	.eekad-entity__photo {
		width: 140px;
		height: 140px;
	}
	.eekad-entity__hero-stats {
		margin-top: 12px;
	}
	.eekad-entity__body {
		grid-template-columns: 1fr;
	}
	.eekad-entity__col-side {
		position: static;
	}
}

/* ---- Dossier layer: refinements ---- */
/* Stats read as a data line under the hero text, aligned with it —
   not an orphaned block across the canvas. */
.eekad-entity__hero-inner {
	flex-wrap: wrap;
}
.eekad-entity__hero-stats {
	flex-basis: 100%;
	padding-inline-start: calc(clamp(150px, 16vw, 210px) + clamp(28px, 4vw, 48px));
	margin-top: -8px;
	padding-top: 22px;
	border-top: 1px solid rgba(var(--c-border-rgb), .08);
}
@media (max-width: 800px) {
	.eekad-entity__hero-stats {
		padding-inline-start: 0;
	}
}
/* Section count sits with the title, not across the page. */
.eekad-entity__card-count {
	margin-inline-start: 12px;
	font-size: 13px;
}
/* Timeline year marker: neutral instrument, not a lime jewel. */
.eekad-entity__rel-event-year::before {
	background: var(--c-bg-base);
	border-color: rgba(var(--c-border-rgb), .35);
}
