/*
 * Fraud-warning board (/news/?group=fraud_warning), exposure detail, and the
 * applicant view on mediation detail (/mediation/{MED-code}).
 *
 * Broker logos from the portal are wide wordmarks with transparent padding,
 * so every frame here is landscape and sits on a white plate. Sizes are set
 * per use; fxm-broker-logos.js still trims logos listed in its manifest.
 */
:root {
	--exp-ink: #1f2433;
	--exp-text: #5d6478;
	--exp-muted: #8a90a2;
	--exp-line: #e7e4f0;
	--exp-soft: #faf9ff;
	--exp-primary: #4f34d9;
}

/* ---------- Broker marks ---------- */
body .fxm-exp-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
	border: 1px solid #ebe8f5;
	background: #fff;
}
body .fxm-exp-logo > img[data-fxm-broker-logo] { padding: 0 !important; }
body .fxm-exp-logo.is-fallback { border-color: #e4defa; }
body .fxm-exp-logo--card { width: 88px; height: 44px; padding: 6px 8px !important; border-radius: 12px; }
body .fxm-exp-logo--card .fxm-broker-logo-initials { font-size: 14px; }
body .fxm-exp-logo--rank { width: 72px; height: 36px; padding: 4px 6px !important; border-radius: 10px; }
body .fxm-exp-logo--rank .fxm-broker-logo-initials { font-size: 12px; }
body .fxm-exp-logo--detail { width: 112px; height: 56px; padding: 7px 9px !important; border-radius: 14px; }
body .fxm-exp-logo--detail .fxm-broker-logo-initials { font-size: 18px; }
body .fxm-exp-logo--reply { width: 64px; height: 32px; padding: 4px 6px !important; border-radius: 9px; }
body .fxm-exp-logo--reply .fxm-broker-logo-initials { font-size: 11px; }
/* Manifest logos are trimmed inside an absolute viewport that ignores the
   frame padding, so give it the same inset. */
body .fxm-exp-logo--card > .fxm-broker-logo-viewport { inset: 6px 8px; }
body .fxm-exp-logo--rank > .fxm-broker-logo-viewport { inset: 4px 6px; }
body .fxm-exp-logo--detail > .fxm-broker-logo-viewport { inset: 7px 9px; }
body .fxm-exp-logo--reply > .fxm-broker-logo-viewport { inset: 4px 6px; }

/* ---------- Risk / tags ---------- */
.fxm-exp-risk {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	line-height: 1.4;
	background: #fff1f2;
	color: #9f1239;
}
.fxm-exp-risk[data-risk="medium"] { background: #fffbeb; color: #92400e; }
.fxm-exp-risk[data-risk="low"] { background: #f0fdf4; color: #166534; }
.fxm-exp-risk--inline { position: static; flex-shrink: 0; padding: 1px 7px; font-size: 10px; }

.fxm-exp-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 11px;
	line-height: 1.5;
	background: #f3f0ff;
	color: var(--exp-primary);
}
.fxm-exp-tag--pinned { background: #fff1f2; color: #be123c; }

/*
 * Navigation on the fraud board has three levels, so each one gets a
 * different weight instead of a different pill style:
 *   1. category bar (news hero sheet): 15px regular, sticky, full width;
 *   2. board switch (below): section headings that belong to the content;
 *   3. mediation status filter: quiet text chips.
 */

/* ---------- Level 2: exposure list / mediation center ---------- */
.fxm-board-switch {
	display: flex;
	align-items: flex-end;
	gap: 36px;
	margin: 0 0 28px;
	border-bottom: 1px solid #eceaf3;
	overflow-x: auto;
	scrollbar-width: none;
}
.fxm-board-switch::-webkit-scrollbar { display: none; }
.fxm-board-switch__tab {
	--tab-bar: #f43f5e;
	position: relative;
	flex-shrink: 0;
	padding: 4px 0 14px;
	color: #a0a6b6;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.02em;
	white-space: nowrap;
	text-decoration: none;
	transition: color .2s ease;
}
.fxm-board-switch__tab[data-tone="mediation"] { --tab-bar: var(--exp-primary); }
.fxm-board-switch__tab:hover { color: #4b5265; }
.fxm-board-switch__tab:focus-visible { outline: 2px solid var(--tab-bar); outline-offset: 4px; border-radius: 4px; }
.fxm-board-switch__tab.is-active { color: var(--exp-ink); }
.fxm-board-switch__tab.is-active::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--tab-bar);
}

/* ---------- Level 3: mediation status filter ---------- */
.fxm-board-filter {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 20px;
	overflow-x: auto;
	scrollbar-width: none;
}
.fxm-board-filter::-webkit-scrollbar { display: none; }
.fxm-board-filter__chip {
	flex-shrink: 0;
	padding: 6px 14px;
	border-radius: 999px;
	color: #6b7183;
	font-size: 13px;
	line-height: 1.5;
	white-space: nowrap;
	text-decoration: none;
	transition: color .2s ease, background-color .2s ease;
}
.fxm-board-filter__chip:hover { background: #f5f4f9; color: var(--exp-ink); }
.fxm-board-filter__chip:focus-visible { outline: 2px solid var(--exp-primary); outline-offset: 2px; }
.fxm-board-filter__chip.is-active { background: #f1edff; color: var(--exp-primary); font-weight: 600; }

@media (max-width: 639px) {
	.fxm-board-switch { gap: 24px; margin-bottom: 22px; }
	.fxm-board-switch__tab { padding-bottom: 12px; font-size: 17px; }
}

/* ---------- List card: broker byline, case text, tag footer ---------- */
.fxm-exp-card {
	--card-risk: #f43f5e;
	position: relative;
	overflow: hidden;
	border: 1px solid var(--exp-line);
	border-radius: 22px;
	background: #fff;
	transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.fxm-exp-card[data-risk="medium"] { --card-risk: #f59e0b; }
.fxm-exp-card[data-risk="low"] { --card-risk: #10b981; }
/* A thin risk-coloured edge lets the list be scanned by severity. */
.fxm-exp-card::before {
	content: '';
	position: absolute;
	top: 22px;
	bottom: 22px;
	left: 0;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--card-risk);
	opacity: .75;
}
.fxm-exp-card:hover { border-color: #ddd6f7; box-shadow: 0 22px 44px -34px rgba(79, 52, 217, .35); transform: translateY(-2px); }
.fxm-exp-card__link { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 18px 24px; color: inherit; text-decoration: none; }
.fxm-exp-card__link:focus-visible { outline: 2px solid var(--exp-primary); outline-offset: -4px; border-radius: 20px; }

.fxm-exp-card__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fxm-exp-card__who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fxm-exp-card__broker-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--exp-ink); }
.fxm-exp-card__meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--exp-muted); font-variant-numeric: tabular-nums; }
.fxm-exp-card__meta > * + *::before { content: '·'; margin-right: 6px; color: #c5c9d4; }
body .fxm-exp-risk--card { position: static; flex-shrink: 0; align-self: flex-start; padding: 4px 10px; font-size: 12px; }

.fxm-exp-card__body { display: flex; align-items: flex-start; gap: 16px; }
.fxm-exp-card__text { flex: 1; min-width: 0; }
.fxm-exp-card__title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--exp-ink);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: -.01em;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	transition: color .2s ease;
}
.fxm-exp-card:hover .fxm-exp-card__title { color: var(--exp-primary); }
.fxm-exp-card__summary {
	display: -webkit-box;
	margin: 6px 0 0;
	overflow: hidden;
	color: var(--exp-text);
	font-size: 14px;
	line-height: 1.65;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.fxm-exp-card__thumb { flex-shrink: 0; width: 112px; height: 84px; border: 1px solid #ebe8f5; border-radius: 12px; object-fit: cover; background: #f7f6fb; }

.fxm-exp-card__foot { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px dashed #ebe9f2; font-size: 12px; color: var(--exp-muted); }
.fxm-exp-card__tags { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.fxm-exp-card__views { display: inline-flex; align-items: center; gap: 4px; color: #b7791f; font-variant-numeric: tabular-nums; }
.fxm-exp-card__more { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; color: var(--exp-primary); font-weight: 600; opacity: .8; transition: opacity .2s ease, gap .2s ease; }
.fxm-exp-card:hover .fxm-exp-card__more { opacity: 1; gap: 7px; }

@media (max-width: 639px) {
	.fxm-exp-card__link { gap: 12px; padding: 16px 16px 14px 18px; }
	body .fxm-exp-logo--card { width: 72px; height: 36px; }
	.fxm-exp-card__title { font-size: 16px; }
	.fxm-exp-card__thumb { width: 84px; height: 64px; }
	.fxm-exp-card__more { display: none; }
}

/* ---------- Exposure card v1: editorial risk signal ----------
 * This layer is scoped away from mediation cards, which reuse the base frame
 * for their progress timeline. The generated cover is decorative only. */
.fxm-exp-card:not(.fxm-exp-card--med) {
	background: linear-gradient(135deg, #fff 0%, #fff 76%, #fcfbff 100%);
	border-color: #e7e4f0;
	box-shadow: 0 12px 30px -28px rgba(79, 52, 217, .34);
}
.fxm-exp-card:not(.fxm-exp-card--med)::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(115deg, transparent 0 65%, rgba(79, 52, 217, .018) 100%);
}
.fxm-exp-card:not(.fxm-exp-card--med)::before {
	top: 18px;
	bottom: 18px;
	width: 4px;
	opacity: 1;
	box-shadow: 4px 0 16px -10px var(--card-risk);
}
.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__link {
	position: relative;
	z-index: 1;
	gap: 16px;
	padding: 20px 22px 18px 24px;
}
.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__head {
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(226, 223, 239, .75);
}
.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__body {
	gap: 20px;
	align-items: stretch;
	min-height: 108px;
}
.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__thumb {
	width: 172px;
	height: 108px;
	border: 0;
	border-radius: 18px;
	box-shadow: 0 12px 26px -18px rgba(36, 29, 91, .7);
	transition: transform .35s ease, filter .35s ease;
}
.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__thumb.is-generated {
	filter: saturate(.9) contrast(1.04);
}
.fxm-exp-card:not(.fxm-exp-card--med):hover .fxm-exp-card__thumb {
	transform: scale(1.035);
	filter: saturate(1.06) contrast(1.04);
}
.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__foot {
	padding-top: 15px;
	border-top: 1px solid rgba(235, 233, 242, .9);
}
.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__more {
	padding: 7px 10px;
	border-radius: 999px;
	background: rgba(79, 52, 217, .07);
	font-size: 11px;
}

@media (max-width: 639px) {
	.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__link { padding: 16px 16px 14px 18px; }
	.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__body { gap: 12px; min-height: 76px; }
	.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__thumb { width: 104px; height: 76px; border-radius: 14px; }
	.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__foot { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.fxm-exp-card:not(.fxm-exp-card--med),
	.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__thumb,
	.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__more { transition: none; }
	.fxm-exp-card:not(.fxm-exp-card--med):hover { transform: none; }
	.fxm-exp-card:not(.fxm-exp-card--med):hover .fxm-exp-card__thumb { transform: none; }
}

/* ---------- Exposure card v2: evidence-led editorial layout ----------
 * Keep the mediation cards on the shared frame above. Exposure cards get a
 * stronger reading order: broker context, case signal, then the next action. */
article.fxm-exp-card:not(.fxm-exp-card--med) {
	--card-surface: #ffffff;
	position: relative;
	border-color: #e3e7f2;
	border-radius: 26px;
	background: var(--card-surface);
	box-shadow: 0 18px 46px -34px rgba(22, 30, 62, .48), 0 4px 12px -8px rgba(79, 52, 217, .12);
	transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease;
}
article.fxm-exp-card:not(.fxm-exp-card--med)::after {
	background: linear-gradient(120deg, rgba(255,255,255,0) 42%, rgba(79, 52, 217, .035) 100%);
}
article.fxm-exp-card:not(.fxm-exp-card--med)::before {
	top: 20px;
	bottom: 20px;
	width: 4px;
	border-radius: 0 6px 6px 0;
	box-shadow: 6px 0 18px -10px var(--card-risk);
}
article.fxm-exp-card:not(.fxm-exp-card--med):hover {
	border-color: color-mix(in srgb, var(--card-risk) 32%, #dfe4f2);
	box-shadow: 0 26px 54px -34px rgba(22, 30, 62, .52), 0 10px 20px -14px color-mix(in srgb, var(--card-risk) 26%, transparent);
	transform: translateY(-3px);
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__link {
	gap: 0;
	padding: 0;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__head {
	position: relative;
	gap: 14px;
	align-items: flex-start;
	padding: 18px 20px 16px 24px;
	border-bottom: 1px solid #edf0f7;
	background: linear-gradient(180deg, #fff 0%, #fbfbfe 100%);
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__who {
	padding-top: 1px;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__broker-name {
	font-size: 15px;
	letter-spacing: -.01em;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__meta {
	margin-top: 5px;
	font-size: 11px;
	letter-spacing: .01em;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-risk--card {
	margin-left: auto;
	border: 1px solid color-mix(in srgb, var(--card-risk) 18%, #fff);
	box-shadow: 0 5px 12px -9px var(--card-risk);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .01em;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 196px;
	align-items: center;
	gap: 22px;
	min-height: 150px;
	padding: 20px 20px 20px 24px;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__text {
	min-width: 0;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__title {
	font-size: 19px;
	line-height: 1.34;
	letter-spacing: -.025em;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__summary {
	margin-top: 9px;
	font-size: 13px;
	line-height: 1.75;
	color: #697189;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__thumb {
	order: 2;
	width: 196px;
	height: 130px;
	border: 1px solid rgba(255, 255, 255, .65);
	border-radius: 18px;
	object-position: 72% center;
	box-shadow: 0 16px 28px -18px rgba(22, 30, 62, .72);
	transition: transform .38s cubic-bezier(.2,.75,.25,1), filter .38s ease;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__thumb.is-generated {
	filter: saturate(.94) contrast(1.06);
}
article.fxm-exp-card:not(.fxm-exp-card--med):hover .fxm-exp-card__thumb {
	transform: scale(1.045) rotate(.35deg);
	filter: saturate(1.08) contrast(1.06);
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__foot {
	gap: 10px;
	min-height: 52px;
	padding: 12px 20px 13px 24px;
	border-top: 1px solid #edf0f7;
	background: #fbfbfe;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-tag {
	padding: 4px 10px;
	border: 1px solid #e7e1ff;
	background: #f5f2ff;
	font-size: 10px;
	font-weight: 600;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-tag--pinned {
	border-color: #ffd2da;
	background: #fff1f3;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__views {
	padding: 4px 8px;
	border-radius: 999px;
	background: #fff7e8;
	font-size: 11px;
}
article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__more {
	padding: 8px 12px;
	border: 1px solid #e0d9ff;
	background: #f4f1ff;
	font-size: 11px;
	font-weight: 700;
	opacity: 1;
}
article.fxm-exp-card:not(.fxm-exp-card--med):hover .fxm-exp-card__more {
	border-color: #cfc4ff;
	background: #ece8ff;
}

@media (max-width: 767px) {
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__head {
		padding-right: 16px;
		padding-left: 18px;
	}
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__body {
		grid-template-columns: minmax(0, 1fr) 132px;
		gap: 14px;
		min-height: 118px;
		padding: 16px 16px 16px 18px;
	}
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__title {
		font-size: 17px;
	}
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__summary {
		font-size: 12px;
		line-height: 1.65;
	}
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__thumb {
		width: 132px;
		height: 92px;
		border-radius: 15px;
	}
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__foot {
		padding-right: 16px;
		padding-left: 18px;
	}
}

@media (max-width: 479px) {
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__head {
		flex-wrap: wrap;
	}
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-risk--card {
		margin-left: 0;
	}
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__body {
		grid-template-columns: minmax(0, 1fr) 104px;
		gap: 12px;
	}
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__thumb {
		width: 104px;
		height: 78px;
		border-radius: 13px;
	}
	article.fxm-exp-card:not(.fxm-exp-card--med) .fxm-exp-card__summary {
		-webkit-line-clamp: 2;
	}
}

/* ---------- Board figures (shared by exposure and mediation) ---------- */
.fxm-board-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0 0 24px;
	border: 1px solid var(--exp-line);
	border-radius: 20px;
	background: #fff;
}
.fxm-board-stats__item { --stat-dot: var(--exp-primary); min-width: 0; padding: 16px 20px; }
.fxm-board-stats__item + .fxm-board-stats__item { border-left: 1px solid #f0eef6; }
.fxm-board-stats__item[data-tone="success"] { --stat-dot: #10b981; }
.fxm-board-stats__item[data-tone="danger"] { --stat-dot: #f43f5e; }
.fxm-board-stats__item[data-tone="warning"] { --stat-dot: #f59e0b; }
.fxm-board-stats dt { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--exp-muted); }
.fxm-board-stats dt::before { content: ''; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--stat-dot); }
.fxm-board-stats dd { margin: 6px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--exp-ink); font-variant-numeric: tabular-nums; }

/* ---------- Empty board ---------- */
.fxm-board-empty { display: flex; flex-direction: column; align-items: center; padding: 56px 24px; border: 1px dashed #e2def0; border-radius: 22px; background: linear-gradient(180deg, #fcfbff 0%, #fff 100%); text-align: center; }
.fxm-board-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 18px; background: #f1edff; color: var(--exp-primary); }
.fxm-board-empty h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--exp-ink); }
.fxm-board-empty p { max-width: 340px; margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--exp-text); }
.fxm-board-empty__link { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; padding: 8px 16px; border: 1px solid #e3ddfb; border-radius: 999px; color: var(--exp-primary); font-size: 13px; text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.fxm-board-empty__link:hover { background: var(--exp-primary); color: #fff; }

/* ---------- Mediation cards (reuse the exposure card frame) ---------- */
.fxm-med-list { display: grid; gap: 16px; }
.fxm-exp-card--med { --card-risk: var(--exp-primary); }
.fxm-exp-card--med[data-group="resolved"] { --card-risk: #10b981; }
.fxm-exp-card--med[data-group="unresolved"] { --card-risk: #f43f5e; }
.fxm-exp-card--med[data-group="closed"] { --card-risk: #a0a6b6; }
.fxm-med-status { flex-shrink: 0; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: #f1edff; color: var(--exp-primary); font-size: 12px; line-height: 1.4; white-space: nowrap; }
.fxm-med-status[data-group="resolved"] { background: #ecfdf3; color: #0f8a55; }
.fxm-med-status[data-group="unresolved"] { background: #fff1f2; color: #be123c; }
.fxm-med-status[data-group="closed"] { background: #f2f3f7; color: #6b7280; }

/* Four-step progress: accepted, broker response, negotiation, closed. */
.fxm-med-steps {
	--step-on: var(--exp-primary);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
}
.fxm-med-steps[data-group="resolved"] { --step-on: #10b981; }
.fxm-med-steps[data-group="unresolved"] { --step-on: #f43f5e; }
.fxm-med-steps[data-group="closed"] { --step-on: #a0a6b6; }
.fxm-med-steps__item { position: relative; padding-top: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #a0a6b6; }
/* Track segment to the right of each dot; the last step has none. */
.fxm-med-steps__item::before { content: ''; position: absolute; top: 4px; left: 12px; right: 0; height: 2px; border-radius: 2px; background: #ebe9f2; }
.fxm-med-steps__item:last-child::before { display: none; }
.fxm-med-steps__item::after { content: ''; position: absolute; top: 0; left: 0; width: 10px; height: 10px; box-sizing: border-box; border: 2px solid #dcd9e6; border-radius: 50%; background: #fff; }
.fxm-med-steps__item.is-done { color: var(--exp-text); }
.fxm-med-steps__item.is-done::before { background: var(--step-on); opacity: .45; }
.fxm-med-steps__item.is-done::after { border-color: var(--step-on); background: var(--step-on); }
.fxm-med-steps__item.is-current { color: var(--exp-ink); font-weight: 600; }
.fxm-med-steps__item.is-current::after { border-color: var(--step-on); box-shadow: 0 0 0 4px rgba(79, 52, 217, .12); }

.fxm-med-region { font-size: 12px; color: var(--exp-muted); }
.fxm-med-amount { display: inline-flex; align-items: baseline; gap: 6px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.fxm-med-amount strong { font-size: 14px; color: var(--exp-ink); }
.fxm-med-amount em { font-style: normal; font-weight: 600; color: #6b7280; }
.fxm-med-amount em[data-group="resolved"] { color: #0f8a55; }

@media (max-width: 767px) {
	.fxm-board-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fxm-board-stats__item:nth-child(3) { border-left: 0; }
	.fxm-board-stats__item:nth-child(n+3) { border-top: 1px solid #f0eef6; }
	.fxm-board-stats dd { font-size: 19px; }
}
@media (max-width: 639px) {
	.fxm-med-steps__item { font-size: 11px; }
	.fxm-exp-card__foot { flex-wrap: wrap; }
}

/* ---------- Bad-broker ranking ---------- */
.fxm-exp-rank { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.fxm-exp-rank__row {
	display: grid;
	grid-template-columns: 18px 72px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	padding: 8px 6px;
	border-radius: 12px;
	transition: background-color .2s ease;
}
.fxm-exp-rank__row:hover { background: var(--exp-soft); }
.fxm-exp-rank__no { font-size: 13px; font-weight: 700; text-align: center; color: #b3b8c6; font-variant-numeric: tabular-nums; }
.fxm-exp-rank__no.is-top { color: #f43f5e; }
.fxm-exp-rank__info { min-width: 0; }
.fxm-exp-rank__head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fxm-exp-rank__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--exp-ink); text-decoration: none; }
a.fxm-exp-rank__name:hover { color: var(--exp-primary); }
.fxm-exp-rank__bar { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #f3f4f6; }
.fxm-exp-rank__bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #fda4af, #f43f5e); }
.fxm-exp-rank__count { min-width: 22px; text-align: right; font-size: 14px; font-weight: 700; color: #f43f5e; font-variant-numeric: tabular-nums; }

/* ---------- Detail: section heading ---------- */
.fxm-exp-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fxm-exp-section-head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--exp-ink); }
.fxm-exp-section-head__icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 12px; background: #f3f0ff; color: var(--exp-primary); }
.fxm-exp-section-head__count { padding: 2px 9px; border-radius: 999px; font-size: 11px; background: #f3f0ff; color: var(--exp-primary); }

/* ---------- Detail: evidence ---------- */
.fxm-exp-evidence { margin-top: 32px; }
.fxm-exp-evidence__locked {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border: 1px dashed #d9d3f3;
	border-radius: 18px;
	background: linear-gradient(135deg, #fbfaff 0%, #f4f1ff 100%);
}
.fxm-exp-evidence__lock { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--exp-primary); box-shadow: 0 8px 18px -14px rgba(79, 52, 217, .6); }
.fxm-exp-evidence__copy { min-width: 0; }
.fxm-exp-evidence__copy strong { display: block; font-size: 14px; color: var(--exp-ink); }
.fxm-exp-evidence__copy p { margin: 3px 0 0; font-size: 12px; line-height: 1.6; color: var(--exp-text); }
.fxm-exp-button {
	flex-shrink: 0;
	margin-left: auto;
	padding: 9px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--exp-primary);
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	box-shadow: 0 12px 24px -16px rgba(79, 52, 217, .7);
	transition: transform .2s ease, box-shadow .2s ease;
}
.fxm-exp-button:hover { transform: translateY(-1px); }
.fxm-exp-evidence__status { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 16px; background: #fafafd; font-size: 13px; color: var(--exp-text); }
.fxm-exp-evidence__status.is-error { background: #fff5f7; color: #b6324e; }
.fxm-exp-link { margin-left: auto; padding: 0; border: 0; background: none; color: var(--exp-primary); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fxm-exp-spinner { width: 16px; height: 16px; border: 2px solid #e4def7; border-top-color: var(--exp-primary); border-radius: 50%; animation: fxm-exp-spin .8s linear infinite; }
@keyframes fxm-exp-spin { to { transform: rotate(360deg); } }

.fxm-exp-evidence__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.fxm-exp-evidence__item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fxm-exp-evidence__thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 4 / 3;
	padding: 0;
	overflow: hidden;
	border: 1px solid #ebe8f5;
	border-radius: 14px;
	background: #f7f6fb;
	color: #8b80c9;
	cursor: zoom-in;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.fxm-exp-evidence__thumb:hover { border-color: #d6cdfb; box-shadow: 0 14px 28px -22px rgba(79, 52, 217, .45); }
.fxm-exp-evidence__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.fxm-exp-evidence__thumb:hover img { transform: scale(1.04); }
.fxm-exp-evidence__thumb.is-file { cursor: pointer; background: linear-gradient(135deg, #faf9ff, #f1edfd); }
.fxm-exp-evidence__thumb.is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .75) 50%, transparent 80%);
	background-size: 200% 100%;
	animation: fxm-exp-shimmer 1.2s linear infinite;
}
.fxm-exp-evidence__thumb.is-broken { cursor: not-allowed; opacity: .55; }
@keyframes fxm-exp-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.fxm-exp-evidence__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #3f4558; }
.fxm-exp-evidence__meta { margin-top: -3px; font-size: 11px; color: #9097a8; }

.fxm-exp-lightbox { max-width: min(92vw, 1100px); max-height: 92vh; padding: 0; overflow: visible; border: 0; background: transparent; }
.fxm-exp-lightbox::backdrop { background: rgba(17, 16, 30, .8); }
.fxm-exp-lightbox img { display: block; max-width: 100%; max-height: 86vh; border-radius: 12px; }
.fxm-exp-lightbox__close { position: absolute; top: -46px; right: 0; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: var(--exp-ink); cursor: pointer; }

/* ---------- Detail: public broker replies (brokerReplies[]) ---------- */
.fxm-exp-replies {
	margin-top: 32px;
	padding: 24px;
	border: 1px solid var(--exp-line);
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 20px 46px -38px rgba(79, 52, 217, .22);
}
.fxm-exp-replies__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #f0eef7; }
.fxm-exp-replies__header h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--exp-ink); }
.fxm-exp-replies__header p { margin: 4px 0 0; font-size: 12px; line-height: 1.6; color: var(--exp-muted); }
.fxm-exp-replies__list { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
/* Amber rail marks the text as the broker's own statement, not the complainant's or the platform's. */
.fxm-exp-reply { padding: 16px 18px; border: 1px solid #f3e6c8; border-left: 3px solid #f0b445; border-radius: 18px; background: linear-gradient(135deg, #fffdf7 0%, #fff9ec 100%); }
.fxm-exp-reply__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.fxm-exp-reply__who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.fxm-exp-reply__who strong { font-size: 14px; color: var(--exp-ink); overflow-wrap: anywhere; }
.fxm-exp-reply__badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #fff1d6; color: #9a5b00; }
.fxm-exp-reply__meta { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; color: var(--exp-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fxm-exp-reply__edited { padding: 1px 7px; border: 1px solid #e7e4f0; border-radius: 999px; font-size: 11px; background: #fff; color: #6b7280; cursor: default; }
.fxm-exp-reply__body { margin-top: 12px; font-size: 14px; line-height: 1.8; color: #3a4052; overflow-wrap: anywhere; }

/* ---------- Detail: process timeline ---------- */
.fxm-exp-timeline {
	margin-top: 32px;
	padding: 24px 24px 10px;
	border: 1px solid var(--exp-line);
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 20px 46px -38px rgba(79, 52, 217, .22);
}
.fxm-exp-timeline__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; padding-bottom: 18px; border-bottom: 1px solid #f0eef7; }
.fxm-exp-timeline__header h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--exp-ink); }
.fxm-exp-timeline__header p { margin: 4px 0 0; font-size: 12px; color: var(--exp-muted); font-variant-numeric: tabular-nums; }
.fxm-exp-timeline__count { flex-shrink: 0; padding: 4px 11px; border-radius: 999px; font-size: 12px; background: #f4f1ff; color: var(--exp-primary); }

.fxm-exp-tl { margin: 0; padding: 0; list-style: none; }
.fxm-exp-tl__item {
	--tone-bg: #efeafe;
	--tone-fg: #4f34d9;
	position: relative;
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr);
	gap: 14px;
	padding: 14px 0;
}
.fxm-exp-tl__item[data-tone="success"] { --tone-bg: #e7f8ef; --tone-fg: #0f8a55; }
.fxm-exp-tl__item[data-tone="danger"] { --tone-bg: #ffeef1; --tone-fg: #d0304f; }
.fxm-exp-tl__item[data-tone="warning"] { --tone-bg: #fff5e0; --tone-fg: #b26a00; }
.fxm-exp-tl__item[data-tone="mediation"] { --tone-bg: #eef0ff; --tone-fg: #4a3fd6; }
.fxm-exp-tl__item[data-tone="muted"] { --tone-bg: #f2f3f7; --tone-fg: #6b7280; }
/* Rail from this marker to the next one. */
.fxm-exp-tl__item:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 54px;
	bottom: -14px;
	left: 17px;
	width: 2px;
	border-radius: 2px;
	background: linear-gradient(180deg, #dcd5fb 0%, #ece9f6 100%);
}
.fxm-exp-tl__marker {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--tone-bg);
	color: var(--tone-fg);
	box-shadow: 0 0 0 4px #fff;
}
.fxm-exp-tl__body { min-width: 0; padding-top: 7px; }
.fxm-exp-tl__item.is-latest .fxm-exp-tl__body,
.fxm-exp-tl__item.is-current .fxm-exp-tl__body {
	margin-top: -4px;
	padding: 11px 14px 12px;
	border: 1px solid #eeeafb;
	border-radius: 16px;
	background: var(--exp-soft);
}
.fxm-exp-tl__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.fxm-exp-tl__head h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--exp-ink); }
.fxm-exp-tl__head time { font-size: 12px; white-space: nowrap; color: var(--exp-muted); font-variant-numeric: tabular-nums; }
.fxm-exp-tl__body p { margin: 4px 0 0; font-size: 13px; line-height: 1.65; color: var(--exp-text); overflow-wrap: anywhere; }
.fxm-exp-tl__actor { display: inline-flex; margin-top: 8px; padding: 2px 9px; border-radius: 999px; font-size: 11px; background: #f2f3f7; color: var(--exp-text); }
.fxm-exp-tl__now { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--tone-bg); color: var(--tone-fg); }
.fxm-exp-tl__item.is-pending .fxm-exp-tl__marker { background: #fff; border: 2px dashed #c9c3e6; color: #8b80c9; }
.fxm-exp-tl__item.is-pending .fxm-exp-tl__marker::after {
	content: '';
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid rgba(139, 128, 201, .35);
	animation: fxm-exp-pulse 1.8s ease-out infinite;
}
@keyframes fxm-exp-pulse { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

/* ---------- Detail: broker card ---------- */
.fxm-exp-broker { padding: 20px; border: 1px solid var(--exp-line); border-radius: 26px; background: #fff; box-shadow: 0 20px 46px -38px rgba(79, 52, 217, .18); }
.fxm-exp-broker__title { margin: 0 0 14px; font-size: 14px; font-weight: 700; color: var(--exp-ink); }
.fxm-exp-broker__identity {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	border: 1px solid #f0edf9;
	border-radius: 18px;
	background: var(--exp-soft);
	color: inherit;
	text-decoration: none;
	transition: border-color .2s ease, background-color .2s ease;
}
a.fxm-exp-broker__identity:hover { border-color: #d9d1fb; background: #f6f3ff; }
.fxm-exp-broker__names { min-width: 0; }
.fxm-exp-broker__names strong { display: block; font-size: 14px; line-height: 1.35; color: var(--exp-ink); overflow-wrap: anywhere; }
.fxm-exp-broker__names span { display: block; margin-top: 3px; font-size: 12px; color: var(--exp-muted); overflow-wrap: anywhere; }
.fxm-exp-broker__facts { display: grid; gap: 10px; margin: 16px 0 0; }
.fxm-exp-broker__facts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.fxm-exp-broker__facts dt { flex-shrink: 0; color: var(--exp-muted); }
.fxm-exp-broker__facts dd { min-width: 0; margin: 0; text-align: right; color: #2f3547; overflow-wrap: anywhere; }
.fxm-exp-broker__facts dd a { display: inline-flex; align-items: center; gap: 4px; color: var(--exp-primary); text-decoration: none; }
.fxm-exp-broker__facts dd a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fxm-exp-pill { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 11px; background: #f2f3f7; color: #6b7280; }
.fxm-exp-pill[data-tone="success"] { background: #e7f8ef; color: #0f8a55; }
.fxm-exp-pill[data-tone="warning"] { background: #fff5e0; color: #b26a00; }
.fxm-exp-pill[data-tone="danger"] { background: #ffeef1; color: #d0304f; }
.fxm-exp-broker__more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 16px;
	padding: 10px;
	border: 1px solid #e3ddfb;
	border-radius: 999px;
	font-size: 13px;
	color: var(--exp-primary);
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
.fxm-exp-broker__more:hover { background: var(--exp-primary); color: #fff; }
.fxm-exp-broker > a.flex, .fxm-exp-broker > a.block { margin-top: 12px; }

/* ---------- Detail: author's mediation entry (revealed by main.js) ---------- */
.fxm-exp-mediate[hidden], .fxm-exp-mediate [hidden], [data-fxm-mediate-public][hidden] { display: none !important; }
.fxm-exp-mediate { margin-top: 16px; padding-top: 16px; border-top: 1px dashed #e6e1f6; }
.fxm-exp-mediate__apply {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 11px 14px;
	border-radius: 999px;
	background: var(--exp-primary);
	box-shadow: 0 14px 28px -18px rgba(79, 52, 217, .7);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease;
}
.fxm-exp-mediate__apply:hover { transform: translateY(-1px); box-shadow: 0 18px 30px -18px rgba(79, 52, 217, .8); }
.fxm-exp-mediate__hint { margin: 10px 2px 0; font-size: 12px; line-height: 1.6; color: var(--exp-muted); }
.fxm-exp-mediate__active {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
	padding: 12px 14px;
	border: 1px solid #cdeedd;
	border-radius: 16px;
	background: #f2fbf6;
	color: #166534;
	text-decoration: none;
	transition: background-color .2s ease, border-color .2s ease;
}
.fxm-exp-mediate .fxm-exp-mediate__active { margin-top: 0; }
.fxm-exp-mediate__active:hover { border-color: #a7dfc0; background: #e8f7ef; }
.fxm-exp-mediate__text { min-width: 0; }
.fxm-exp-mediate__text strong { display: block; font-size: 13px; }
.fxm-exp-mediate__text span { display: block; margin-top: 2px; font-size: 11px; color: rgba(22, 101, 52, .72); overflow-wrap: anywhere; }
.fxm-exp-mediate__go { display: inline-flex; flex-shrink: 0; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
/* 升级曝光: secondary to the mediation entry, rose like the enhanced badge. */
.fxm-exp-enhance.is-stacked { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #f1e1e6; }
.fxm-exp-enhance__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #f6c5d0;
	border-radius: 999px;
	background: #fff;
	color: #be123c;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.fxm-exp-enhance__btn:hover { border-color: #f43f5e; background: #f43f5e; color: #fff; }
.fxm-exp-enhance__btn:disabled { opacity: .6; cursor: progress; }
.fxm-exp-enhance__btn:disabled:hover { border-color: #f6c5d0; background: #fff; color: #be123c; }
.fxm-exp-enhance__status { margin: 8px 2px 0; font-size: 12px; line-height: 1.6; color: #be123c; }

/* ---------- Detail: apply-for-mediation dialog (mediation-apply-dialog.php) ---------- */
html.fxm-med-dialog-open { overflow: hidden; }
.fxm-med-dialog {
	width: min(640px, calc(100vw - 32px));
	max-width: none;
	max-height: min(880px, calc(100dvh - 40px));
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 24px;
	background: #fff;
	color: var(--exp-ink);
	box-shadow: 0 28px 90px rgba(28, 24, 65, .26);
	font-size: 14px;
	line-height: 1.55;
}
.fxm-med-dialog[open] { animation: fxm-md-in .24s cubic-bezier(.2, .8, .2, 1); }
.fxm-med-dialog::backdrop { background: rgba(24, 22, 48, .48); backdrop-filter: blur(3px); }
.fxm-med-dialog[open]::backdrop { animation: fxm-md-fade .2s ease-out; }
@keyframes fxm-md-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fxm-md-fade { from { opacity: 0; } to { opacity: 1; } }
.fxm-med-dialog [hidden] { display: none !important; }
.fxm-med-dialog *, .fxm-med-dialog *::before, .fxm-med-dialog *::after { box-sizing: border-box; }
/* Zero specificity: a class rule below (button colours, currency weight) must win over this reset. */
:where(.fxm-med-dialog) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.fxm-med-dialog :focus-visible { outline: 3px solid rgba(79, 52, 217, .28); outline-offset: 2px; }
.fxm-med-dialog__form { display: flex; flex-direction: column; max-height: inherit; margin: 0; }

.fxm-med-dialog__header { display: flex; align-items: flex-start; gap: 16px; padding: 24px 28px 14px; }
.fxm-med-dialog__header > div { flex: 1; min-width: 0; }
.fxm-med-dialog h2 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; color: var(--exp-ink); }
.fxm-med-dialog__header p { margin: 4px 0 0; font-size: 13px; color: var(--exp-muted); }
.fxm-med-dialog__close {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #f4f3fb;
	color: #4b5165;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.fxm-med-dialog__close:hover { background: #ece8ff; color: var(--exp-primary); }

.fxm-med-dialog__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 28px 8px; scrollbar-width: thin; scrollbar-color: #d8d5eb transparent; }

.fxm-med-dialog__case { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #efecf8; border-radius: 16px; background: var(--exp-soft); }
.fxm-med-dialog__case-text { min-width: 0; }
.fxm-med-dialog__case-text strong { display: block; overflow: hidden; font-size: 14px; font-weight: 600; color: var(--exp-ink); text-overflow: ellipsis; white-space: nowrap; }
.fxm-med-dialog__case-text span { display: block; margin-top: 2px; font-size: 12px; color: var(--exp-muted); font-variant-numeric: tabular-nums; }

.fxm-med-dialog__flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; padding: 0 2px; list-style: none; }
.fxm-med-dialog__flow li { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--exp-text); }
.fxm-med-dialog__flow li + li::before { content: ""; position: absolute; left: -8px; top: 50%; width: 8px; height: 1px; background: #ddd7f3; }
.fxm-med-dialog__flow b { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #efeaff; font-size: 11px; font-weight: 700; color: var(--exp-primary); }
.fxm-med-dialog__flow span { min-width: 0; line-height: 1.35; }

/* Three numbered groups give the long form a reading order: claim → verification → consent. */
.fxm-med-dialog__section { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #5b5f73; }
.fxm-med-dialog__section::after { content: ""; flex: 1; height: 1px; background: #efecf7; }
.fxm-med-dialog__section span { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: var(--exp-primary); font-size: 11px; color: #fff; }

.fxm-med-dialog__field { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
/* The evidence drop zone is also a direct <label>; it keeps its own flex layout. */
.fxm-med-dialog__field > legend, .fxm-med-dialog__field > label:not(.fxm-med-dialog__drop), .fxm-med-dialog__label { display: block; width: 100%; margin: 0 0 8px; padding: 0; font-size: 13px; font-weight: 600; color: var(--exp-ink); }
.fxm-med-dialog__label small { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--exp-muted); }
.fxm-med-dialog__label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.fxm-med-dialog__label-row .fxm-med-dialog__label { width: auto; margin: 0; }
.fxm-med-dialog__req { margin-left: 3px; color: #df3457; }

.fxm-med-dialog__choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fxm-med-dialog__choice { position: relative; display: block; cursor: pointer; }
.fxm-med-dialog__choice input { position: absolute; opacity: 0; pointer-events: none; }
.fxm-med-dialog__choice-body { position: relative; display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px 34px 12px 14px; border: 1px solid #e3e0ee; border-radius: 14px; background: #fff; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
/* Radio ring, top right: filled when chosen. */
.fxm-med-dialog__choice-body::after { content: ""; position: absolute; top: 13px; right: 12px; width: 16px; height: 16px; border: 1.5px solid #cfcadf; border-radius: 50%; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.fxm-med-dialog__choice input:checked + .fxm-med-dialog__choice-body::after { border: 5px solid var(--exp-primary); }
.fxm-med-dialog__choice-body strong { font-size: 14px; font-weight: 600; color: var(--exp-ink); }
.fxm-med-dialog__choice-body small { font-size: 11.5px; line-height: 1.45; color: var(--exp-muted); }
.fxm-med-dialog__choice:hover .fxm-med-dialog__choice-body { border-color: #c4b9fa; }
.fxm-med-dialog__choice input:checked + .fxm-med-dialog__choice-body { border-color: var(--exp-primary); background: #f6f3ff; box-shadow: 0 0 0 1px var(--exp-primary) inset; }
.fxm-med-dialog__choice input:checked + .fxm-med-dialog__choice-body strong { color: var(--exp-primary); }
.fxm-med-dialog__choice input:focus-visible + .fxm-med-dialog__choice-body { outline: 3px solid rgba(79, 52, 217, .28); outline-offset: 2px; }

/* Claim amount: currency picker and number share one field, like a payment input. */
.fxm-med-dialog__amount { padding: 14px 16px 12px; border: 1px solid #ebe7f8; border-radius: 16px; background: #fbfaff; }
.fxm-med-dialog__money { position: relative; display: flex; align-items: center; height: 50px; border: 1px solid #e3e0ee; border-radius: 14px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.fxm-med-dialog__money:hover { border-color: #cfc7f3; }
.fxm-med-dialog__currency {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 6px;
	height: 38px;
	margin-left: 6px;
	padding: 0 10px 0 12px;
	border: 0;
	border-radius: 10px;
	background: #f3f0ff;
	color: var(--exp-primary);
	font-weight: 700;
	letter-spacing: .02em;
	cursor: pointer;
	transition: background-color .15s ease;
}
.fxm-med-dialog__currency:hover, .fxm-med-dialog__currency[aria-expanded="true"] { background: #e8e2ff; }
.fxm-med-dialog__currency svg { transition: transform .15s ease; }
.fxm-med-dialog__currency[aria-expanded="true"] svg { transform: rotate(180deg); }
.fxm-med-dialog__money-symbol { flex: 0 0 auto; margin-left: 14px; font-size: 18px; font-weight: 600; color: #9aa0b3; }
.fxm-med-dialog__money input { flex: 1; min-width: 0; height: 100%; padding: 0 16px 0 6px; border: 0; background: transparent; font-size: 18px; font-weight: 600; color: var(--exp-ink); font-variant-numeric: tabular-nums; outline: none; }
.fxm-med-dialog__money input::placeholder { font-weight: 500; color: #c3c7d4; }
.fxm-med-dialog__currency-list {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 5;
	width: 240px;
	margin: 0;
	padding: 6px;
	border: 1px solid #e6e2f4;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 40px -12px rgba(35, 26, 76, .25);
	list-style: none;
}
.fxm-med-dialog__currency-list [role="option"] { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; outline: none; }
.fxm-med-dialog__currency-list [role="option"]:hover, .fxm-med-dialog__currency-list [role="option"]:focus { background: #f5f2ff; }
.fxm-med-dialog__currency-list [role="option"][aria-selected="true"] { background: #efeaff; }
.fxm-med-dialog__currency-symbol { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: #f4f3f9; font-weight: 700; color: #4b5165; }
[aria-selected="true"] > .fxm-med-dialog__currency-symbol { background: var(--exp-primary); color: #fff; }
.fxm-med-dialog__currency-name { flex: 1; min-width: 0; line-height: 1.3; }
.fxm-med-dialog__currency-name strong { display: block; font-size: 13px; color: var(--exp-ink); }
.fxm-med-dialog__currency-name small { display: block; font-size: 11.5px; color: var(--exp-muted); }
.fxm-med-dialog__currency-check { flex: 0 0 auto; color: var(--exp-primary); visibility: hidden; }
[aria-selected="true"] > .fxm-med-dialog__currency-check { visibility: visible; }
.fxm-med-dialog__input { display: block; width: 100%; height: 46px; padding: 0 14px; border: 1px solid #e3e0ee; border-radius: 14px; background: #fff; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.fxm-med-dialog__input:hover, .fxm-med-dialog__textarea:hover { border-color: #cfc7f3; }
.fxm-med-dialog__textarea { position: relative; border: 1px solid #e3e0ee; border-radius: 14px; background: #fff; }
.fxm-med-dialog__textarea textarea { display: block; width: 100%; min-height: 120px; max-height: 260px; padding: 12px 14px 30px; border: 0; border-radius: inherit; background: transparent; line-height: 1.7; resize: vertical; outline: none; }
.fxm-med-dialog__money:focus-within, .fxm-med-dialog__textarea:focus-within, .fxm-med-dialog__input:focus { border-color: #9b8fe9; box-shadow: 0 0 0 3px rgba(79, 52, 217, .08); }
.fxm-med-dialog input::placeholder, .fxm-med-dialog textarea::placeholder { color: #9aa0b3; }
.fxm-med-dialog__count { position: absolute; right: 14px; bottom: 8px; font-size: 11px; color: var(--exp-muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.fxm-med-dialog__count.is-short { color: #b26a00; }
.fxm-med-dialog__known { margin: 0 0 8px; padding: 9px 12px; border-radius: 12px; background: #f2fbf6; font-size: 12px; line-height: 1.6; color: #166534; overflow-wrap: anywhere; }
.fxm-med-dialog__note { margin: 6px 2px 0; font-size: 11.5px; line-height: 1.6; color: var(--exp-muted); }

/* Evidence: a drop zone, then preview tiles (images show the picture, PDFs a document tile). */
.fxm-med-dialog__file-count { font-size: 12px; color: var(--exp-muted); font-variant-numeric: tabular-nums; }
.fxm-med-dialog__file-input { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.fxm-med-dialog__drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 120px;
	padding: 18px 16px;
	border: 1.5px dashed #cdc4f7;
	border-radius: 16px;
	background: linear-gradient(180deg, #fcfbff 0%, #f7f4ff 100%);
	text-align: center;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, min-height .2s ease;
}
.fxm-med-dialog__drop:hover, .fxm-med-dialog__drop.is-dragging { border-color: var(--exp-primary); background: #f3efff; }
.fxm-med-dialog__drop.is-dragging { box-shadow: 0 0 0 4px rgba(79, 52, 217, .08); }
.fxm-med-dialog__file-input:focus-visible + .fxm-med-dialog__drop { outline: 3px solid rgba(79, 52, 217, .28); outline-offset: 2px; }
.fxm-med-dialog__drop.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.fxm-med-dialog__drop-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: #fff; box-shadow: 0 6px 16px -8px rgba(79, 52, 217, .45); color: var(--exp-primary); }
.fxm-med-dialog__drop-text { display: flex; flex-direction: column; gap: 3px; }
.fxm-med-dialog__drop-text strong { font-size: 13.5px; font-weight: 600; color: var(--exp-ink); }
.fxm-med-dialog__drop-text small { font-size: 11.5px; color: var(--exp-muted); }
/* Once files exist the zone shrinks to a slim row so the previews lead. */
.fxm-med-dialog__drop.is-compact { flex-direction: row; justify-content: flex-start; min-height: 0; padding: 12px 14px; text-align: left; }
.fxm-med-dialog__drop.is-compact .fxm-med-dialog__drop-icon { width: 36px; height: 36px; border-radius: 11px; }
.fxm-med-dialog__files { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.fxm-med-dialog__files:empty { display: none; }
.fxm-med-dialog__tile { position: relative; min-width: 0; }
.fxm-med-dialog__tile-thumb {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	aspect-ratio: 1;
	overflow: hidden;
	border: 1px solid #ebe8f5;
	border-radius: 12px;
	background: #f6f5fa;
}
.fxm-med-dialog__tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fxm-med-dialog__tile-thumb.is-doc { background: #fff5f5; color: #d6455d; }
.fxm-med-dialog__tile-thumb.is-doc b { font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.fxm-med-dialog__tile-name { display: block; margin-top: 6px; overflow: hidden; font-size: 11.5px; color: var(--exp-ink); text-overflow: ellipsis; white-space: nowrap; }
.fxm-med-dialog__tile-meta { display: block; font-size: 10.5px; color: var(--exp-muted); font-variant-numeric: tabular-nums; }
.fxm-med-dialog__tile.is-error .fxm-med-dialog__tile-thumb { border-color: #f2a7b8; }
.fxm-med-dialog__tile.is-error .fxm-med-dialog__tile-meta { color: #d02752; }
.fxm-med-dialog__tile-remove {
	position: absolute;
	top: -7px;
	right: -7px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid #e6e2f1;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 6px rgba(24, 20, 48, .16);
	color: #5b6379;
	cursor: pointer;
}
.fxm-med-dialog__tile-remove:hover { border-color: #f2b6c3; color: #be123c; }
.fxm-med-dialog__tile-remove:disabled { display: none; }
/* Upload progress sits on the thumbnail: a veil with a spinner, then a check. */
.fxm-med-dialog__tile-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .72); }
.fxm-med-dialog__tile-state::before { content: ""; width: 20px; height: 20px; border: 2px solid #e1dbf8; border-top-color: var(--exp-primary); border-radius: 50%; animation: fxm-exp-spin .8s linear infinite; }
.fxm-med-dialog__tile-state.is-done { inset: auto 6px 6px auto; width: 22px; height: 22px; border-radius: 50%; background: #10b981; color: #fff; }
.fxm-med-dialog__tile-state.is-done::before { display: none; }

.fxm-med-dialog__declaration { margin: 4px 0 6px; padding: 14px 16px; border: 1px solid #f3e3bf; border-radius: 16px; background: #fffbf0; }
.fxm-med-dialog__declaration > strong { display: block; font-size: 13px; color: #92400e; }
.fxm-med-dialog__declaration-text { max-height: 132px; margin: 8px 0 10px; padding-right: 6px; overflow-y: auto; font-size: 12px; line-height: 1.7; color: rgba(146, 64, 14, .82); scrollbar-width: thin; }
.fxm-med-dialog__declaration-text p { margin: 0 0 6px; }
.fxm-med-dialog__declaration-text p:last-child { margin-bottom: 0; }
.fxm-med-dialog__agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; font-weight: 600; color: #7c3d0c; cursor: pointer; }
.fxm-med-dialog__agree input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #b45309; }

.fxm-med-dialog__error { margin: 6px 2px 0; font-size: 12px; color: #d02752; }
.fxm-med-dialog__field.is-invalid .fxm-med-dialog__money,
.fxm-med-dialog__field.is-invalid .fxm-med-dialog__textarea,
.fxm-med-dialog__field.is-invalid .fxm-med-dialog__input,
.fxm-med-dialog__field.is-invalid .fxm-med-dialog__choice-body { border-color: #f2a7b8; }
.fxm-med-dialog__declaration.is-invalid { border-color: #f2a7b8; }

.fxm-med-dialog__footer { flex: 0 0 auto; padding: 14px 28px 20px; border-top: 1px solid #f0edf7; background: #fff; }
.fxm-med-dialog__status { margin: 0 0 10px; font-size: 12.5px; line-height: 1.6; color: var(--exp-text); }
.fxm-med-dialog__status[data-tone="error"] { color: #d02752; }
.fxm-med-dialog__status a { color: var(--exp-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.fxm-med-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; }
.fxm-med-dialog__primary, .fxm-med-dialog__secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 22px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.fxm-med-dialog__secondary { border: 1px solid #e3e0ee; background: #fff; color: #4b5165; }
.fxm-med-dialog__secondary:hover { border-color: #c4b9fa; color: var(--exp-primary); }
.fxm-med-dialog__primary { min-width: 160px; border: 0; background: linear-gradient(135deg, #664df5 0%, #4f34d9 100%); box-shadow: 0 14px 28px -16px rgba(79, 52, 217, .75); color: #fff; }
.fxm-med-dialog__primary:hover { box-shadow: 0 16px 30px -14px rgba(79, 52, 217, .85); }
.fxm-med-dialog__primary:disabled { cursor: progress; opacity: .7; }
.fxm-med-dialog__primary.is-submitting::before { content: ""; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: fxm-exp-spin .8s linear infinite; }

.fxm-med-dialog__success { position: relative; display: flex; flex-direction: column; align-items: center; padding: 44px 32px 32px; text-align: center; }
.fxm-med-dialog__success > .fxm-med-dialog__close { position: absolute; top: 18px; right: 18px; }
.fxm-med-dialog__success-mark { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 16px; border-radius: 50%; background: #e9f9f0; color: #10b981; box-shadow: 0 0 0 8px #f4fcf8; }
.fxm-med-dialog__success h2 { outline: none; }
.fxm-med-dialog__success p { max-width: 400px; margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--exp-text); }
.fxm-med-dialog__success-code strong { color: var(--exp-ink); font-variant-numeric: tabular-nums; }
.fxm-med-dialog__success .fxm-med-dialog__actions { justify-content: center; margin-top: 24px; }

@media (max-width: 639px) {
	/* Bottom sheet on phones: full width, anchored to the bottom edge. */
	.fxm-med-dialog { width: 100%; max-height: calc(100dvh - 24px); margin: auto 0 0; border-radius: 22px 22px 0 0; }
	.fxm-med-dialog[open] { animation-name: fxm-md-sheet; }
	@keyframes fxm-md-sheet { from { transform: translateY(32px); opacity: .6; } to { transform: none; opacity: 1; } }
	.fxm-med-dialog__header { padding: 20px 18px 12px; }
	.fxm-med-dialog h2 { font-size: 18px; }
	.fxm-med-dialog__body { padding: 2px 18px 6px; }
	.fxm-med-dialog__footer { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
	.fxm-med-dialog__choices { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.fxm-med-dialog__choice-body { flex-direction: row; align-items: baseline; gap: 10px; }
	.fxm-med-dialog__flow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
	.fxm-med-dialog__flow li + li::before { display: none; }
	.fxm-med-dialog__amount { padding: 12px; }
	.fxm-med-dialog__currency-list { width: min(260px, calc(100vw - 72px)); }
	.fxm-med-dialog__files { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
	.fxm-med-dialog__drop { min-height: 112px; }
	.fxm-med-dialog__actions > * { flex: 1; min-width: 0; }
	.fxm-med-dialog__success { padding: 40px 20px calc(24px + env(safe-area-inset-bottom)); }
}

/* ---------- Mediation: applicant view (main.js initMediationOwner) ---------- */
[data-fxm-mediation-owner][hidden], [data-fxm-mediation-owner] [hidden], [data-fxm-owner-state][hidden] { display: none !important; }
.fxm-med-owner { padding: 20px; border: 1px solid var(--exp-line); border-radius: 26px; background: #fff; box-shadow: 0 20px 46px -38px rgba(79, 52, 217, .22); }
.fxm-med-owner__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fxm-med-owner__head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--exp-ink); }
.fxm-med-owner__sla { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; background: var(--exp-soft); font-size: 12px; color: var(--exp-muted); }
.fxm-med-owner__sla strong { font-weight: 600; color: var(--exp-ink); font-variant-numeric: tabular-nums; }
.fxm-med-owner__sla.is-overdue { background: #fff1f2; }
.fxm-med-owner__sla.is-overdue strong { color: #be123c; }
.fxm-med-owner__note { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: #fff7e6; font-size: 12px; line-height: 1.6; color: #92400e; }
.fxm-med-owner__facts { display: grid; gap: 8px; margin: 0 0 12px; }
.fxm-med-owner__facts > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.fxm-med-owner__facts dt { flex-shrink: 0; color: var(--exp-muted); }
.fxm-med-owner__facts dd { min-width: 0; margin: 0; text-align: right; color: #2f3547; overflow-wrap: anywhere; }
.fxm-med-owner__eyebrow { display: block; font-size: 11px; letter-spacing: .04em; color: var(--exp-muted); }
.fxm-med-owner__proposal, .fxm-med-owner__close { margin: 0 0 12px; padding: 14px; border: 1px solid #e4defa; border-radius: 16px; background: linear-gradient(135deg, #fbfaff 0%, #f4f1ff 100%); }
.fxm-med-owner__close { border-color: #e7e9ef; background: #f8f9fb; }
.fxm-med-owner__amount { display: block; margin-top: 4px; font-size: 20px; font-weight: 700; color: var(--exp-ink); font-variant-numeric: tabular-nums; }
.fxm-med-owner__close strong { display: block; margin-top: 4px; font-size: 14px; color: var(--exp-ink); }
.fxm-med-owner__proposal p, .fxm-med-owner__close p { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--exp-text); overflow-wrap: anywhere; white-space: pre-line; }
.fxm-med-owner__proposal small { display: block; margin-top: 8px; font-size: 11px; color: var(--exp-muted); }
.fxm-med-owner__paid { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.fxm-med-owner__paid li { position: relative; padding-left: 16px; font-size: 12px; color: var(--exp-muted); }
.fxm-med-owner__paid li::before { content: ""; position: absolute; left: 0; top: 6px; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #c9c3df; }
.fxm-med-owner__paid li.is-done { color: #166534; }
.fxm-med-owner__paid li.is-done::before { border-color: #10b981; background: #10b981; }
.fxm-med-owner__idle { margin: 0; padding: 12px; border-radius: 14px; background: var(--exp-soft); font-size: 12px; line-height: 1.6; color: var(--exp-muted); }
.fxm-med-owner__input {
	display: block;
	width: 100%;
	margin: 4px 0 10px;
	padding: 10px 12px;
	border: 1px solid #e3e0ee;
	border-radius: 14px;
	background: #fdfcff;
	font: inherit;
	font-size: 13px;
	color: var(--exp-ink);
	resize: vertical;
	outline: none;
}
.fxm-med-owner__input:focus { border-color: #b9acf6; box-shadow: 0 0 0 3px rgba(79, 52, 217, .08); }
.fxm-med-owner__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fxm-med-owner__btn {
	flex: 1 1 calc(50% - 4px);
	min-height: 38px;
	padding: 8px 12px;
	border: 1px solid #e3ddfb;
	border-radius: 999px;
	background: #fff;
	font-size: 13px;
	color: var(--exp-primary);
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.fxm-med-owner__btn:hover { border-color: var(--exp-primary); }
.fxm-med-owner__btn.is-primary { border-color: var(--exp-primary); background: var(--exp-primary); color: #fff; }
.fxm-med-owner__btn.is-primary:hover { background: #4129c4; }
.fxm-med-owner__btn.is-quiet { border-color: #eceef3; color: #6b7280; }
.fxm-med-owner__btn.is-quiet:hover { border-color: #f3b4c0; color: #be123c; }
.fxm-med-owner__btn:disabled { opacity: .55; cursor: progress; }
.fxm-med-owner__error { margin: 10px 0 0; font-size: 12px; color: #e11d48; }

/* Full mode: the case is not public yet, so the whole page is client-rendered. */
.fxm-med-owner-page { max-width: 1240px; margin: 0 auto; padding: 32px 16px 56px; }
.fxm-med-owner-page__state { max-width: 640px; margin: 48px auto; }
.fxm-med-owner-page__state[data-fxm-owner-state="loading"] { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--exp-muted); }
.fxm-med-owner-page__crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; font-size: 13px; color: var(--exp-muted); }
.fxm-med-owner-page__crumbs a { color: var(--exp-muted); text-decoration: none; }
.fxm-med-owner-page__crumbs a:hover { color: var(--exp-primary); }
.fxm-med-owner-page__crumbs span:last-child { color: var(--exp-ink); }
.fxm-med-owner-page__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.fxm-med-owner-page__main { display: grid; gap: 20px; min-width: 0; }
.fxm-med-owner-card { padding: 24px; border: 1px solid var(--exp-line); border-radius: 26px; background: #fff; box-shadow: 0 20px 46px -38px rgba(79, 52, 217, .18); }
.fxm-med-owner-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fxm-med-owner-card__code { font-size: 12px; color: var(--exp-muted); font-variant-numeric: tabular-nums; }
.fxm-med-owner-card__title { margin: 14px 0 0; font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -.02em; color: var(--exp-ink); overflow-wrap: anywhere; }
.fxm-med-owner-card__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--exp-muted); }
.fxm-med-owner-card__claim { margin-top: 18px; padding-top: 16px; border-top: 1px solid #f0edf9; }
.fxm-med-owner-card__label { margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--exp-ink); }
.fxm-med-owner-card > .fxm-med-owner-card__label:first-child { margin-top: 0; }
.fxm-med-owner-card__text { margin: 0; font-size: 14px; line-height: 1.75; color: var(--exp-text); white-space: pre-line; overflow-wrap: anywhere; }
.fxm-med-owner-card .fxm-exp-broker__more { display: inline-flex; padding: 8px 16px; }
.fxm-med-owner-tl { margin: 0; padding: 0; list-style: none; }
.fxm-med-owner-tl__item { position: relative; padding: 0 0 18px 22px; border-left: 2px solid #eeebf8; margin-left: 5px; }
.fxm-med-owner-tl__item:last-child { padding-bottom: 0; border-left-color: transparent; }
.fxm-med-owner-tl__item::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: #c9c0f3; box-shadow: 0 0 0 1px #e4defa; }
.fxm-med-owner-tl__item[data-actor="broker"]::before { background: #6b55f8; }
.fxm-med-owner-tl__item[data-actor="cms"]::before { background: #10b981; }
.fxm-med-owner-tl__item[data-actor="user"]::before { background: var(--exp-primary); }
.fxm-med-owner-tl__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.fxm-med-owner-tl__head strong { font-size: 13px; color: var(--exp-ink); }
.fxm-med-owner-tl__head time { font-size: 11px; color: var(--exp-muted); font-variant-numeric: tabular-nums; }
.fxm-med-owner-tl__who { display: block; margin-top: 2px; font-size: 11px; color: var(--exp-muted); }
.fxm-med-owner-tl__item p { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: var(--exp-text); overflow-wrap: anywhere; white-space: pre-line; }
.fxm-med-owner-tl__amount { display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 999px; background: #f3f0ff; font-size: 12px; color: var(--exp-primary); font-variant-numeric: tabular-nums; }
@media (max-width: 1023px) {
	.fxm-med-owner-page__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 639px) {
	.fxm-exp-evidence__locked { flex-wrap: wrap; }
	.fxm-exp-button { width: 100%; margin-left: 0; }
	.fxm-exp-timeline { padding: 20px 16px 6px; }
	.fxm-exp-replies { padding: 20px 16px; }
	.fxm-exp-reply { padding: 14px; }
	.fxm-exp-reply__meta { width: 100%; margin-left: 0; }
	.fxm-exp-evidence__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.fxm-med-owner-page { padding: 20px 16px 40px; }
	.fxm-med-owner-card { padding: 18px; border-radius: 20px; }
	.fxm-med-owner-card__title { font-size: 18px; }
	.fxm-med-owner__btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.fxm-exp-tl__item.is-pending .fxm-exp-tl__marker::after,
	.fxm-exp-evidence__thumb.is-loading::after,
	.fxm-exp-spinner { animation: none; }
	.fxm-exp-card, .fxm-exp-evidence__thumb img, .fxm-exp-mediate__apply, .fxm-exp-enhance__btn, .fxm-med-owner__btn { transition: none; }
	.fxm-exp-mediate__apply:hover { transform: none; }
	.fxm-med-dialog[open], .fxm-med-dialog[open]::backdrop { animation: none; }
	.fxm-med-dialog__primary.is-submitting::before, .fxm-med-dialog__tile-state::before { animation: none; }
	.fxm-exp-card:hover { transform: none; }
}

/* ---------- H5 (≤767px): board figures, report banner and the /mediation/ page ---------- */
@media (max-width: 767.98px) {
	.fxm-board-switch { margin-bottom: 14px; }
	.fxm-board-stats { margin-bottom: 16px; border-radius: 16px; }
	.fxm-board-stats__item { padding: 11px 14px; }
	.fxm-board-stats dt { font-size: 11.5px; }
	.fxm-board-stats dd { margin-top: 3px; font-size: 18px; }

	/* "Report a platform" banner right after the figures: icon + copy, full-width action. */
	.fxm-board-stats + .rounded-\[26px\] {
		display: grid;
		grid-template-columns: 38px minmax(0, 1fr);
		align-items: center;
		gap: 12px;
		margin-bottom: 18px;
		padding: 14px;
		border-radius: 18px;
	}
	.fxm-board-stats + .rounded-\[26px\] > :first-child { width: 38px; height: 38px; border-radius: 12px; }
	.fxm-board-stats + .rounded-\[26px\] > button { grid-column: 1 / -1; justify-content: center; width: 100%; min-height: 42px; }

}

/* ---------- H5 (≤767px): exposure detail ---------- */
@media (max-width: 767.98px) {
	[data-fxm-exposure-detail-page] { padding-top: var(--fxm-m-header, 60px); }
	[data-fxm-exposure-detail-page] > div:first-child > div { padding-block: 10px; }
	[data-fxm-exposure-detail-page] nav { flex-wrap: nowrap; gap: 4px; overflow: hidden; font-size: 12px; white-space: nowrap; }
	[data-fxm-exposure-detail-page] nav > span:last-child { flex: 1 1 auto; min-width: 0; max-width: none; }
	[data-fxm-exposure-detail-page] > div:nth-child(2) { padding: 12px 12px 28px; }
	[data-fxm-exposure-detail-page] > div:nth-child(2) > .grid { gap: 16px; }
	[data-fxm-exposure-detail-page] .rounded-\[30px\] { border-radius: 20px; }
	[data-fxm-exposure-detail-page] .rounded-\[30px\] > .p-6 { padding: 18px 16px 20px; }
	[data-fxm-exposure-detail-page] h1 { font-size: 19px; line-height: 1.4; }
	[data-fxm-exposure-detail-page] h1 + div { gap: 6px 10px; margin-top: 10px; font-size: 12px; }
	[data-fxm-exposure-detail-page] .my-6 { margin-block: 14px; }
	[data-fxm-exposure-detail-page] .news-content { font-size: 15px; line-height: 1.8; }
}
