/* =============================================================
 * 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, #d5fe77);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* =============================================================
 * HERO — compact header
 * =========================================================== */
.eekad-entity__hero {
	padding: 100px 0 0;
	background: var(--c-bg-surface);
	border-bottom: 1px solid rgba(var(--c-border-rgb), .06);
}

.eekad-entity__hero-inner {
	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;
}

/* Hero stats */
.eekad-entity__hero-stats {
	display: flex;
	gap: 1px;
	flex-shrink: 0;
	background: rgba(var(--c-border-rgb), .04);
}
.eekad-entity__stat-card {
	background: var(--c-bg-surface);
	padding: 14px 22px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-width: 78px;
}
.eekad-entity__stat-num {
	font-family: var(--font-mono, monospace);
	font-size: 22px;
	font-weight: 700;
	color: var(--c-lime, #d5fe77);
	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: 16px;
	padding: 24px 0 60px;
	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;
}

/* =============================================================
 * CARD — shared container for all sections
 * =========================================================== */
.eekad-entity__card {
	background: var(--c-bg-surface);
	border: 1px solid rgba(var(--c-border-rgb), .06);
	padding: 28px;
}
.eekad-entity__card-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--c-text);
	margin: 0 0 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(var(--c-border-rgb), .06);
}
.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: var(--font-mono, monospace);
	font-size: 13px;
	font-weight: 700;
	color: var(--c-lime, #d5fe77);
	background: rgba(213, 254, 119, .08);
	padding: 4px 12px;
	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__rel-group {
	margin-bottom: 16px;
}
.eekad-entity__rel-group:last-child {
	margin-bottom: 0;
}

.eekad-entity__rel-type {
	font-size: 11px;
	font-weight: 600;
	color: var(--c-text-faint);
	text-transform: uppercase;
	letter-spacing: .08em;
	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: 10px 8px;
	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;
}

.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);
}

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

/* 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(213, 254, 119, .08);
	color: var(--c-lime, #d5fe77);
}
.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);
}

/* Confidence */
.eekad-entity__confidence {
	width: 36px;
	height: 3px;
	background: rgba(var(--c-border-rgb), .06);
	overflow: hidden;
	flex-shrink: 0;
}
.eekad-entity__confidence-bar {
	display: block;
	height: 100%;
}
.eekad-entity__confidence--high .eekad-entity__confidence-bar {
	background: var(--c-lime, #d5fe77);
}
.eekad-entity__confidence--medium .eekad-entity__confidence-bar {
	background: #e8a838;
}
.eekad-entity__confidence--low .eekad-entity__confidence-bar {
	background: #d13636;
}

/* =============================================================
 * 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: var(--font-mono, monospace);
	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;
}

/* =============================================================
 * 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: var(--font-mono, monospace);
	font-size: 13px;
	font-weight: 700;
	color: var(--c-lime, #d5fe77);
	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, #d5fe77);
}
.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: var(--font-mono, monospace);
	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, #d5fe77);
}
.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(213, 254, 119, .08);
	color: var(--c-lime, #d5fe77);
}

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

@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__rel-badges {
		display: none;
	}
}
