/**
 * Mediation case detail (/mediation/{code}).
 *
 * Markup: inc/mediation-case-view.php — the public SSR page, the applicant's
 * full page and the applicant's side panel all share it. Tokens mirror the
 * broker detail page (fxm-broker-detail.css / fxm-regulator-detail.css).
 *
 * The case outcome drives one tone (`--tone`) through `[data-group]`: the
 * status pill, the final rail step, the outcome card and the settled figure.
 */

.fxm-mcase-page {
	--mc-ink: #2f2658;
	--mc-text: #4a4566;
	--mc-muted: #8a86a3;
	--mc-primary: #4f34d9;
	--mc-primary-soft: #efebff;
	--mc-line: #ece9f6;
	--mc-row: #f6f5fb;
	--mc-soft: #f8f7fc;
	--mc-danger: #d0304f;
	--mc-card-shadow: 0 10px 28px -14px rgba(79, 52, 217, .16), 0 4px 12px -8px rgba(47, 38, 88, .08);
	--mc-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
	min-height: 70vh;
	padding-top: 72px;
	background: var(--mc-soft);
	color: var(--mc-ink);
}
.fxm-mcase-page *, .fxm-mcase-page *::before, .fxm-mcase-page *::after { box-sizing: border-box; }
.fxm-mcase-page [hidden], .fxm-mcase-page .hidden { display: none !important; }
:where(.fxm-mcase-page) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.fxm-mcase-page :focus-visible { outline: 3px solid rgba(79, 52, 217, .28); outline-offset: 2px; }
.fxm-mcase-page__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px 72px; }

.fxm-mcase {
	--tone: var(--mc-primary);
	--tone-bg: var(--mc-primary-soft);
}
.fxm-mcase[data-group="resolved"] { --tone: #0f8a55; --tone-bg: #e7f8ef; }
.fxm-mcase[data-group="unresolved"] { --tone: #d0304f; --tone-bg: #ffeef1; }
.fxm-mcase[data-group="closed"] { --tone: #6b7280; --tone-bg: #f2f3f7; }

/* ---------- Breadcrumb ---------- */
.fxm-mcase-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 18px 0 14px; font-size: 13px; color: rgba(47, 38, 88, .55); }
.fxm-mcase-crumbs a { color: inherit; text-decoration: none; transition: color .15s; }
.fxm-mcase-crumbs a:hover { color: var(--mc-primary); }
.fxm-mcase-crumbs .is-current { font-family: var(--mc-mono); font-size: 12px; color: var(--mc-ink); }

/* ---------- Hero ---------- */
.fxm-mcase-hero {
	position: relative;
	overflow: hidden;
	border: 1px solid var(--mc-line);
	border-radius: 24px;
	background:
		radial-gradient(circle at 96% -10%, rgba(137, 223, 215, .26), transparent 38%),
		radial-gradient(circle at 72% -30%, rgba(107, 85, 248, .14), transparent 52%),
		linear-gradient(180deg, #f5f2ff 0%, #fff 78%);
	box-shadow: var(--mc-card-shadow);
	animation: fxm-mcase-rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
.fxm-mcase-hero__accent { position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, #4f34d9, #6b55f8 52%, #89dfd7); }
.fxm-mcase-hero__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px; padding: 30px 32px 24px; }
.fxm-mcase-hero__id { min-width: 0; }
.fxm-mcase-hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fxm-mcase-hero h1 { margin: 14px 0 16px; font-size: 26px; font-weight: 750; line-height: 1.32; letter-spacing: -.01em; color: var(--mc-ink); overflow-wrap: anywhere; }
.fxm-mcase-hero__broker { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fxm-mcase-hero__broker > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fxm-mcase-hero__broker strong { font-size: 15px; font-weight: 700; color: var(--mc-ink); }
.fxm-mcase-hero__broker em { font-size: 13px; font-style: normal; color: var(--mc-muted); }

.fxm-mcase-status {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--tone-bg);
	color: var(--tone);
	font-size: 13px;
	font-weight: 700;
}
.fxm-mcase-status i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fxm-mcase[data-group="in_progress"] .fxm-mcase-status i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: currentColor; opacity: .3; animation: fxm-mcase-pulse 1.8s ease-out infinite; }
.fxm-mcase-status b { margin-left: 3px; padding-left: 10px; border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 30%, transparent); font-weight: 700; }
.fxm-mcase-code { font-family: var(--mc-mono); font-size: 12.5px; letter-spacing: .02em; color: var(--mc-muted); }

/* Ledger: claim → proposal → settled. */
.fxm-mcase-ledger { display: flex; align-items: center; gap: 4px; margin: 0; padding: 14px 8px; border: 1px solid var(--mc-line); border-radius: 18px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(6px); }
.fxm-mcase-ledger__cell { min-width: 96px; padding: 0 14px; }
.fxm-mcase-ledger dt { font-size: 12px; color: var(--mc-muted); }
.fxm-mcase-ledger dd { margin: 4px 0 0; font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--mc-ink); }
.fxm-mcase-ledger__cell.is-claim dd { color: var(--mc-text); }
.fxm-mcase-ledger__cell.is-final dd { color: var(--tone); }
.fxm-mcase-ledger__arrow { display: inline-flex; color: #c9c4de; }

/* Rail: 提交 · 受理 · 协商 · 履行 · 结案. */
.fxm-mcase-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 20px 20px 24px; border-top: 1px dashed #e4e0f2; list-style: none; }
.fxm-mcase-rail__step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.fxm-mcase-rail__step:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 13px;
	left: calc(50% + 20px);
	right: calc(-50% + 20px);
	height: 2px;
	border-radius: 2px;
	background: #e6e2f3;
}
.fxm-mcase-rail__step.is-done:not(:last-child)::after,
.fxm-mcase-rail__step.is-skipped:not(:last-child)::after { background: var(--mc-primary); }
.fxm-mcase-rail__step.is-done:has(+ .is-skipped)::after,
.fxm-mcase-rail__step.is-skipped:not(:last-child)::after { background: repeating-linear-gradient(90deg, var(--mc-primary) 0 5px, transparent 5px 9px); }
.fxm-mcase-rail__dot {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 2px solid #e1ddf0;
	border-radius: 50%;
	background: #fff;
	color: #b0abc6;
	font-size: 12px;
}
.fxm-mcase-rail__dot b { font-weight: 700; font-variant-numeric: tabular-nums; }
.fxm-mcase-rail__label { font-size: 13px; font-weight: 600; color: var(--mc-muted); }
.fxm-mcase-rail__time { font-size: 11.5px; font-variant-numeric: tabular-nums; color: #a5a1bb; }
.fxm-mcase-rail__step.is-done .fxm-mcase-rail__dot { border-color: var(--mc-primary); background: var(--mc-primary); color: #fff; }
.fxm-mcase-rail__step.is-done .fxm-mcase-rail__label { color: var(--mc-ink); }
.fxm-mcase-rail__step.is-current .fxm-mcase-rail__dot { border-color: var(--mc-primary); color: var(--mc-primary); box-shadow: 0 0 0 5px rgba(79, 52, 217, .12); }
.fxm-mcase-rail__step.is-current .fxm-mcase-rail__label { color: var(--mc-primary); font-weight: 700; }
.fxm-mcase-rail__step.is-current .fxm-mcase-rail__time { color: var(--mc-primary); }
.fxm-mcase-rail__step.is-final .fxm-mcase-rail__dot { border-color: var(--tone); background: var(--tone); color: #fff; box-shadow: 0 0 0 5px var(--tone-bg); }
.fxm-mcase-rail__step.is-final .fxm-mcase-rail__label { color: var(--tone); font-weight: 700; }
.fxm-mcase-rail__step.is-skipped .fxm-mcase-rail__dot { border-style: dashed; background: transparent; }
.fxm-mcase-rail__step.is-skipped .fxm-mcase-rail__label { color: #b0abc6; text-decoration: line-through; text-decoration-color: rgba(176, 171, 198, .6); }

/* ---------- Layout ---------- */
.fxm-mcase-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 20px; margin-top: 20px; }
.fxm-mcase-main, .fxm-mcase-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.fxm-mcase-card { padding: 22px 24px; border: 1px solid var(--mc-line); border-radius: 20px; background: #fff; box-shadow: var(--mc-card-shadow); }
.fxm-mcase-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.fxm-mcase-card__icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--mc-primary); color: #fff; }
.fxm-mcase-card__head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--mc-ink); }
.fxm-mcase-card__head > time, .fxm-mcase-card__count { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--mc-muted); }
.fxm-mcase-prose { margin: 0; font-size: 14px; line-height: 1.85; color: var(--mc-text); overflow-wrap: anywhere; }
.fxm-mcase-empty { margin: 0; padding: 18px; border-radius: 14px; background: var(--mc-row); font-size: 13px; text-align: center; color: var(--mc-muted); }
.fxm-mcase-note { margin: -4px 0 16px; font-size: 12px; color: var(--mc-muted); }

/* ---------- Outcome ---------- */
.fxm-mcase-outcome { border-color: color-mix(in srgb, var(--tone) 22%, var(--mc-line)); background: linear-gradient(180deg, var(--tone-bg) 0%, #fff 72%); }
.fxm-mcase-outcome .fxm-mcase-card__icon { background: var(--tone); }
.fxm-mcase-outcome__body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.fxm-mcase-outcome__verdict { display: flex; flex-direction: column; gap: 6px; }
.fxm-mcase-outcome__verdict strong { font-size: 22px; font-weight: 750; color: var(--tone); }
.fxm-mcase-outcome__verdict span { font-size: 13px; color: var(--mc-muted); }
.fxm-mcase-outcome__verdict span b { margin-left: 4px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mc-ink); }
.fxm-mcase-outcome__score { display: flex; align-items: center; gap: 2px; font-size: 13px; color: var(--mc-muted); }
.fxm-mcase-outcome__score span { margin-right: 6px; }
.fxm-mcase-outcome__score i { font-size: 16px; font-style: normal; color: #e2dfeb; }
.fxm-mcase-outcome__score i.is-on { color: #f5b301; }
.fxm-mcase-outcome__comment { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid var(--tone); border-radius: 4px 12px 12px 4px; background: rgba(255, 255, 255, .75); font-size: 13.5px; line-height: 1.75; color: var(--mc-text); }

/* ---------- Timeline ---------- */
.fxm-mcase-tl { position: relative; margin: 0; padding: 0; list-style: none; }
.fxm-mcase-tl__item {
	--actor: #8b8fa3;
	position: relative;
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr);
	gap: 14px;
	padding-bottom: 14px;
	animation: fxm-mcase-rise .45s cubic-bezier(.2, .7, .2, 1) both;
	animation-delay: calc(var(--i, 0) * 45ms + 120ms);
}
.fxm-mcase-tl__item[data-actor="user"] { --actor: #4f34d9; }
.fxm-mcase-tl__item[data-actor="broker"] { --actor: #b26a00; }
.fxm-mcase-tl__item[data-actor="cms"] { --actor: #0f8a55; }
.fxm-mcase-tl__item:last-child { padding-bottom: 0; }
.fxm-mcase-tl__item:not(:last-child)::before { content: ""; position: absolute; top: 24px; bottom: 0; left: 8px; width: 2px; border-radius: 2px; background: var(--mc-line); }
.fxm-mcase-tl__dot { width: 12px; height: 12px; margin: 15px 0 0 3px; border: 3px solid var(--actor); border-radius: 50%; background: #fff; }
.fxm-mcase-tl__item.is-latest .fxm-mcase-tl__dot { background: var(--actor); box-shadow: 0 0 0 4px color-mix(in srgb, var(--actor) 16%, transparent); }
.fxm-mcase-tl__card { min-width: 0; padding: 12px 16px; border: 1px solid #efedf7; border-radius: 14px; background: #fbfaff; transition: border-color .15s, background .15s; }
.fxm-mcase-tl__item.is-latest .fxm-mcase-tl__card { border-color: color-mix(in srgb, var(--actor) 24%, #efedf7); background: #fff; }
.fxm-mcase-tl__card:hover { border-color: #e0dbf3; background: #fff; }
.fxm-mcase-tl__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fxm-mcase-tl__head strong { font-size: 14px; font-weight: 700; color: var(--mc-ink); }
.fxm-mcase-tl__who { font-size: 12px; font-weight: 600; color: var(--actor); }
.fxm-mcase-tl__head time { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--mc-muted); }
.fxm-mcase-tl__card p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--mc-text); overflow-wrap: anywhere; }
.fxm-mcase-tl__foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fxm-mcase-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border: 1px solid #e8e5f3; border-radius: 999px; background: #fff; font-size: 12px; color: var(--mc-muted); }
.fxm-mcase-chip.is-amount { border-color: transparent; background: var(--mc-primary-soft); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mc-primary); }
.fxm-mcase-chip.is-move svg { color: #b9b4cf; }

/* ---------- Aside: facts ---------- */
.fxm-mcase-facts dl { margin: 0; }
.fxm-mcase-facts dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed #ebe8f4; }
.fxm-mcase-facts dl > div:first-child { padding-top: 0; }
.fxm-mcase-facts dl > div:last-child { border-bottom: 0; }
.fxm-mcase-facts dt { flex-shrink: 0; font-size: 13px; color: var(--mc-muted); }
.fxm-mcase-facts dd { min-width: 0; margin: 0; font-size: 13px; font-weight: 600; text-align: right; overflow-wrap: anywhere; color: var(--mc-ink); }
.fxm-mcase-facts dl > div:first-child dd { font-family: var(--mc-mono); font-size: 12.5px; font-weight: 500; }
.fxm-mcase-facts dd a { color: var(--mc-primary); text-decoration: none; }
.fxm-mcase-facts dd a:hover { text-decoration: underline; }
.fxm-mcase-facts .is-live { color: var(--mc-primary); }
.fxm-mcase-facts .is-overdue { color: var(--mc-danger); }
.fxm-mcase-exposure { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--mc-line); border-radius: 14px; background: var(--mc-row); color: var(--mc-muted); text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.fxm-mcase-exposure > span { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.fxm-mcase-exposure small { font-size: 12px; }
.fxm-mcase-exposure strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--mc-ink); }
.fxm-mcase-exposure:hover { border-color: #d9d2f8; background: #fff; color: var(--mc-primary); }

.fxm-mcase-ai {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 46px;
	border: 1px solid #e2dcfb;
	border-radius: 14px;
	background: linear-gradient(90deg, #f4f1ff, #eefaf8);
	font-size: 14px;
	font-weight: 600;
	color: var(--mc-primary);
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.fxm-mcase-ai:hover { border-color: var(--mc-primary); box-shadow: 0 8px 20px -12px rgba(79, 52, 217, .45); }

/* ---------- Aside: applicant panel ---------- */
.fxm-mcase-panel { position: relative; overflow: hidden; border-color: #ddd6fb; box-shadow: 0 14px 34px -16px rgba(79, 52, 217, .3), 0 4px 12px -8px rgba(47, 38, 88, .08); }
.fxm-mcase-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, #4f34d9, #6b55f8 52%, #89dfd7); }
.fxm-mcase-panel > * + * { margin-top: 12px; }
.fxm-mcase-panel .fxm-mcase-card__head { margin-bottom: 4px; }
.fxm-mcase-panel__sla { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 0; padding: 10px 12px; border-radius: 12px; background: var(--mc-row); }
.fxm-mcase-panel__sla span { font-size: 12px; color: var(--mc-muted); }
.fxm-mcase-panel__sla strong { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mc-primary); }
.fxm-mcase-panel__sla small { width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--mc-muted); }
.fxm-mcase-panel__sla.is-overdue { background: #ffeef1; }
.fxm-mcase-panel__sla.is-overdue strong { color: var(--mc-danger); }
.fxm-mcase-panel__note { margin-bottom: 0; padding: 9px 12px; border-radius: 12px; background: #fff6e6; font-size: 12.5px; line-height: 1.6; color: #8a5a00; }
.fxm-mcase-proposal { padding: 14px 16px; border: 1px solid #e2dcfb; border-radius: 14px; background: linear-gradient(180deg, #f4f1ff, #fff); }
.fxm-mcase-proposal > span { display: block; font-size: 12px; color: var(--mc-muted); }
.fxm-mcase-proposal strong { display: block; margin-top: 4px; font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--mc-primary); }
.fxm-mcase-proposal p { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--mc-text); }
.fxm-mcase-proposal small { display: block; margin-top: 8px; font-size: 12px; color: var(--mc-muted); }
.fxm-mcase-paid { display: flex; flex-direction: column; gap: 8px; padding: 0; list-style: none; }
.fxm-mcase-paid li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mc-muted); }
.fxm-mcase-paid li::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; border: 2px solid #d6d2e6; border-radius: 50%; }
.fxm-mcase-paid li.is-done { color: var(--mc-ink); }
.fxm-mcase-paid li.is-done::before { border-color: #0f8a55; background: #0f8a55; }
.fxm-mcase-paid time { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--mc-muted); }
.fxm-mcase-panel__idle { margin-bottom: 0; padding: 14px; border-radius: 12px; background: var(--mc-row); font-size: 13px; text-align: center; color: var(--mc-muted); }
.fxm-mcase-panel__input { display: block; width: 100%; min-height: 84px; padding: 10px 12px; border: 1px solid #e3e0ee; border-radius: 12px; background: #fff; font-size: 13.5px; line-height: 1.6; resize: vertical; transition: border-color .15s, box-shadow .15s; }
select.fxm-mcase-panel__input { min-height: 42px; resize: none; }
.fxm-mcase-panel__input:focus { border-color: var(--mc-primary); outline: none; box-shadow: 0 0 0 3px rgba(79, 52, 217, .14); }
.fxm-mcase-panel__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fxm-mcase-panel__actions .fxm-mcase-btn { flex: 1 1 auto; }
.fxm-mcase-panel__actions .fxm-mcase-btn.is-quiet { flex: 0 0 auto; margin-left: auto; }
.fxm-mcase-panel__error { margin-bottom: 0; padding: 8px 12px; border-radius: 10px; background: #ffeef1; font-size: 12.5px; line-height: 1.6; color: var(--mc-danger); }

.fxm-mcase-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 40px;
	padding: 0 16px;
	border: 1px solid #e3e0ee;
	border-radius: 12px;
	background: #fff;
	font-size: 13.5px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--mc-ink);
	text-decoration: none;
	cursor: pointer;
	transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.fxm-mcase-btn:hover { border-color: var(--mc-primary); color: var(--mc-primary); }
.fxm-mcase-btn.is-primary { border-color: var(--mc-primary); background: var(--mc-primary); color: #fff; box-shadow: 0 8px 18px -10px rgba(79, 52, 217, .6); }
.fxm-mcase-btn.is-primary:hover { border-color: #4128c4; background: #4128c4; color: #fff; }
.fxm-mcase-btn.is-quiet { border-color: transparent; background: transparent; color: #b4415a; }
.fxm-mcase-btn.is-quiet:hover { background: #ffeef1; color: var(--mc-danger); }
.fxm-mcase-btn:disabled { opacity: .55; cursor: progress; }

/* ---------- Loading / login / not found ---------- */
.fxm-mcase-state { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 560px; margin: 48px auto; padding: 52px 28px; border: 1px solid var(--mc-line); border-radius: 24px; background: #fff; box-shadow: var(--mc-card-shadow); font-size: 14px; text-align: center; color: var(--mc-muted); }
.fxm-mcase-state[data-fxm-owner-state="loading"] { flex-direction: row; justify-content: center; padding: 36px 28px; }
.fxm-mcase-state__mark { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 4px; border-radius: 50%; background: var(--mc-primary-soft); color: var(--mc-primary); }
.fxm-mcase-state strong { font-size: 18px; font-weight: 700; color: var(--mc-ink); }
.fxm-mcase-state p { max-width: 400px; margin: 0 0 8px; line-height: 1.7; }

@keyframes fxm-mcase-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fxm-mcase-pulse { from { transform: scale(.6); opacity: .45; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.fxm-mcase-grid { grid-template-columns: minmax(0, 1fr); }
	/* The applicant's pending actions matter most on a phone: lift the side column above the history. */
	.fxm-mcase-aside:has(.fxm-mcase-panel) { order: -1; }
	.fxm-mcase-hero__body { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; }
	.fxm-mcase-ledger { align-self: start; justify-self: start; }
}
@media (max-width: 720px) {
	.fxm-mcase-page { padding-top: 64px; }
	.fxm-mcase-page__inner { padding: 0 16px 56px; }
	.fxm-mcase-crumbs { padding: 14px 0 10px; font-size: 12px; }
	.fxm-mcase-hero { border-radius: 20px; }
	.fxm-mcase-hero__body { padding: 24px 18px 18px; }
	.fxm-mcase-hero h1 { margin: 12px 0 14px; font-size: 20px; }
	.fxm-mcase-ledger { justify-self: stretch; padding: 12px 4px; overflow-x: auto; }
	.fxm-mcase-ledger__cell { min-width: 0; padding: 0 10px; }
	.fxm-mcase-ledger dd { font-size: 16px; }
	.fxm-mcase-rail { padding: 16px 6px 18px; }
	.fxm-mcase-rail__step:not(:last-child)::after { left: calc(50% + 16px); right: calc(-50% + 16px); top: 11px; }
	.fxm-mcase-rail__dot { width: 24px; height: 24px; font-size: 11px; }
	.fxm-mcase-rail__label { font-size: 11.5px; }
	.fxm-mcase-rail__time { font-size: 10.5px; }
	.fxm-mcase-grid, .fxm-mcase-main, .fxm-mcase-aside { gap: 14px; }
	.fxm-mcase-grid { margin-top: 14px; }
	.fxm-mcase-card { padding: 18px 16px; border-radius: 18px; }
	.fxm-mcase-tl__item { gap: 10px; }
	.fxm-mcase-tl__card { padding: 10px 12px; }
	.fxm-mcase-tl__head time { width: 100%; margin-left: 0; }
	.fxm-mcase-state { margin: 28px auto; padding: 40px 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.fxm-mcase-hero, .fxm-mcase-tl__item { animation: none; }
	.fxm-mcase[data-group="in_progress"] .fxm-mcase-status i::after { animation: none; }
	.fxm-mcase-btn, .fxm-mcase-ai, .fxm-mcase-exposure, .fxm-mcase-tl__card { transition: none; }
}
