/*
 * /mediation — public mediation cases (mediation-list-page.php).
 *
 * Built from the site's own front-door patterns rather than a bare ledger:
 * - hero: the soft lavender ground and teal-dot eyebrow of the home page and
 *   /contact/business, the dotted world map of the broker hero, and a 3D
 *   mark from the same illustration set (assets/images/mediation/);
 * - figures card: live centre numbers and the outcome mix of every public
 *   case (fxm_get_mediation_status_counts()), each outcome a filter link;
 * - list: one white filter bar (status tabs with counts, segmented sort)
 *   over the shared case cards, beside a sticky "how it works" panel like
 *   the /brokers/rankings sidebar.
 *
 * Card markup and base styles: fxm_mcase_list_card() and
 * fxm-board-ledger.css. The overrides below are scoped to this page, so the
 * mediation tab on /news/ keeps its own denser rows.
 *
 * Every control is a plain link: filters, sort and pages live in the URL and
 * land on #fxm-medlist-cases.
 */

[data-fxm-mediation-list-page] {
	--ml-ink: #1c1844;
	--ml-text: #4a4566;
	--ml-muted: #6b6788; /* 5.3:1 on white, 4.9:1 on the ground */
	--ml-primary: #4f34d9;
	--ml-primary-soft: #efebff;
	--ml-grad: linear-gradient(135deg, #6a52f6 0%, #4f34d9 100%);
	--ml-line: #ece9f6;
	--ml-ground: #f7f6fb;
	--ml-panel: #f8f7fc;
	--ml-shadow: 0 1px 2px rgba(31, 28, 63, .04), 0 12px 32px -22px rgba(79, 52, 217, .32);
	--ml-shadow-lift: 0 2px 6px rgba(31, 28, 63, .05), 0 24px 48px -28px rgba(79, 52, 217, .44);
	--ml-numeric: var(--font-family-numeric, "Nunito", "Segoe UI", sans-serif);
	--ml-progress: #4f34d9;
	--ml-resolved: #10b981;
	--ml-unresolved: #f43f5e;
	--ml-rejected: #9aa1b2;
	--ml-withdrawn: #cdd1dc;
	min-height: 70vh;
	padding-bottom: 72px;
	background: var(--ml-ground);
	color: var(--ml-ink);
}
.fxm-medlist-shell { max-width: 1240px; margin-inline: auto; padding-inline: 32px; }

/* ---------- Hero ---------- */
.fxm-medlist-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 64px 0 44px;
	background:
		radial-gradient(620px 360px at 86% 6%, rgba(137, 223, 215, .28), transparent 70%),
		radial-gradient(760px 440px at 60% -14%, rgba(107, 85, 248, .16), transparent 70%),
		linear-gradient(180deg, #f2efff 0%, var(--ml-ground) 100%);
}
/* One dot per land grid point (tools/build_world_map_dots.js), faded in from the left. */
.fxm-medlist-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: var(--fxm-img-world-map-dots-v2, url("../images/world-map-dots.svg?v=2")) no-repeat right -90px top 70px / 880px auto;
	opacity: .3;
	-webkit-mask-image: linear-gradient(90deg, transparent 38%, #000 78%);
	mask-image: linear-gradient(90deg, transparent 38%, #000 78%);
}

.fxm-medlist-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	padding-top: 20px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ml-muted);
}
.fxm-medlist-crumbs a { color: inherit; text-decoration: none; transition: color .16s ease; }
.fxm-medlist-crumbs a:hover { color: var(--ml-primary); }
.fxm-medlist-crumbs .is-current { color: var(--ml-text); }

.fxm-medlist-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 460px;
	align-items: center;
	gap: 48px;
	margin-top: 22px;
}
.fxm-medlist-hero__copy { min-width: 0; }

.fxm-medlist-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 16px;
	padding: 5px 14px 5px 11px;
	border: 1px solid rgba(79, 52, 217, .14);
	border-radius: 999px;
	background: rgba(255, 255, 255, .8);
	box-shadow: 0 8px 18px -14px rgba(31, 28, 63, .35);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--ml-primary);
}
.fxm-medlist-eyebrow > span { width: 7px; height: 7px; border-radius: 50%; background: #2fbfae; box-shadow: 0 0 0 4px rgba(137, 223, 215, .35); }

.fxm-medlist-hero h1 {
	margin: 0;
	font-size: 40px;
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -.02em;
	color: var(--ml-ink);
	text-wrap: balance;
}
.fxm-medlist-intro {
	max-width: 520px;
	margin: 14px 0 0;
	font-size: 16px;
	line-height: 1.8;
	color: var(--ml-text);
	text-wrap: pretty;
}

.fxm-medlist-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fxm-medlist-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 22px;
	border: 1px solid #ddd6f7;
	border-radius: 12px;
	background: #fff;
	color: var(--ml-primary);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(31, 28, 63, .04);
	transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.fxm-medlist-btn:hover { border-color: #c9bdf6; background: #faf8ff; }
.fxm-medlist-btn.is-primary {
	border-color: transparent;
	background: var(--ml-grad);
	color: #fff;
	box-shadow: 0 10px 22px -12px rgba(79, 52, 217, .75);
}
.fxm-medlist-btn.is-primary:hover { background: linear-gradient(135deg, #5d45ee 0%, #3f27c2 100%); box-shadow: 0 14px 28px -14px rgba(79, 52, 217, .8); transform: translateY(-1px); }
.fxm-medlist-btn.is-primary svg { transition: transform .18s ease; }
.fxm-medlist-btn.is-primary:hover svg { transform: translateX(2px); }

.fxm-medlist-note {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 18px 0 0;
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--ml-muted);
}
.fxm-medlist-note svg { flex-shrink: 0; color: #2a9d90; }

/* Figures card */
.fxm-medlist-board {
	position: relative;
	min-width: 0;
	padding: 24px 24px 22px;
	border: 1px solid #fff;
	border-radius: 24px;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 2px 8px rgba(31, 28, 63, .04), 0 28px 60px -34px rgba(79, 52, 217, .5);
}
.fxm-medlist-board__art {
	position: absolute;
	top: -50px;
	right: -16px;
	width: 136px;
	height: 136px;
	pointer-events: none;
	user-select: none;
	filter: drop-shadow(0 16px 22px rgba(79, 52, 217, .2));
}
.fxm-medlist-board__total {
	margin: 0;
	padding-right: 112px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ml-muted);
}
.fxm-medlist-board__total strong {
	margin: 0 4px;
	font-family: var(--ml-numeric);
	font-size: 40px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.02em;
	color: var(--ml-ink);
}
.fxm-medlist-board__bar { display: flex; gap: 3px; height: 10px; margin: 16px 0 12px; }
.fxm-medlist-board__bar > i { display: block; flex: 1 1 0; min-width: 6px; border-radius: 999px; background: var(--seg); }
[data-group="in_progress"] { --seg: var(--ml-progress); }
[data-group="resolved"] { --seg: var(--ml-resolved); }
[data-group="unresolved"] { --seg: var(--ml-unresolved); }
[data-group="rejected"] { --seg: var(--ml-rejected); }
[data-group="withdrawn"] { --seg: var(--ml-withdrawn); }

.fxm-medlist-board__legend {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.fxm-medlist-board__legend a {
	display: grid;
	grid-template-columns: 8px minmax(0, 1fr) auto 36px;
	align-items: center;
	gap: 8px;
	margin: 0 -8px;
	padding: 6px 8px;
	border-radius: 8px;
	color: var(--ml-text);
	font-size: 13px;
	line-height: 1.5;
	text-decoration: none;
	transition: background-color .16s ease;
}
.fxm-medlist-board__legend a::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--seg); }
.fxm-medlist-board__legend a:hover { background: #f4f2fc; }
.fxm-medlist-board__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxm-medlist-board__legend b { font-family: var(--ml-numeric); font-size: 14px; font-weight: 700; color: var(--ml-ink); font-variant-numeric: tabular-nums; }
.fxm-medlist-board__legend em { font-style: normal; font-size: 12px; text-align: right; color: var(--ml-muted); font-variant-numeric: tabular-nums; }

.fxm-medlist-board__figures {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 16px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--ml-line);
}
.fxm-medlist-board__figures > div { min-width: 0; padding: 12px 14px; border-radius: 14px; background: var(--ml-panel); }
.fxm-medlist-board__figures dt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.5; color: var(--ml-muted); }
.fxm-medlist-board__figures dd {
	margin: 4px 0 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
	line-height: 1.3;
	color: var(--ml-muted);
}
.fxm-medlist-board__figures dd b {
	font-family: var(--ml-numeric);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -.01em;
	color: var(--ml-ink);
	font-variant-numeric: tabular-nums;
}
.fxm-medlist-board__figures dd small { margin-right: 4px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--ml-muted); }
/* Without the outcome mix the heading is a plain label; keep it clear of the 3D mark. */
.fxm-medlist-board__total:not(:has(strong)) { min-height: 44px; font-size: 15px; font-weight: 700; color: var(--ml-ink); }

/* ---------- Body: list beside the how-it-works panel ---------- */
.fxm-medlist-body { padding-top: 8px; }
.fxm-medlist-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	align-items: start;
	gap: 24px;
}
.fxm-medlist-main { min-width: 0; scroll-margin-top: 84px; }

/* Filter bar: status tabs with counts, segmented sort. */
.fxm-medlist-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	column-gap: 16px;
	margin-bottom: 16px;
	padding: 0 8px 0 20px;
	border: 1px solid var(--ml-line);
	border-radius: 16px;
	background: #fff;
	box-shadow: var(--ml-shadow);
}
.fxm-medlist-tabs {
	display: flex;
	gap: 24px;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.fxm-medlist-tabs::-webkit-scrollbar { display: none; }
.fxm-medlist-tab {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 6px;
	padding: 17px 0 16px;
	color: var(--ml-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	text-decoration: none;
	transition: color .16s ease;
}
.fxm-medlist-tab:hover { color: var(--ml-primary); }
.fxm-medlist-tab.is-active { color: var(--ml-ink); font-weight: 700; }
.fxm-medlist-tab.is-active::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--ml-primary);
}
.fxm-medlist-tab__count {
	min-width: 22px;
	padding: 1px 7px;
	border-radius: 999px;
	background: #f2f1f7;
	color: var(--ml-muted);
	font-family: var(--ml-numeric);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.fxm-medlist-tab.is-active .fxm-medlist-tab__count { background: var(--ml-primary-soft); color: var(--ml-primary); }

.fxm-medlist-sort {
	display: flex;
	gap: 2px;
	margin: 8px 0 8px auto;
	padding: 3px;
	border-radius: 11px;
	background: #f3f2f8;
}
.fxm-medlist-sort a {
	display: inline-flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 0 12px;
	border-radius: 8px;
	color: var(--ml-muted);
	font-size: 13px;
	line-height: 1.3;
	white-space: nowrap;
	text-decoration: none;
	transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.fxm-medlist-sort a:hover { color: var(--ml-ink); }
.fxm-medlist-sort a[aria-current="true"] {
	background: #fff;
	color: var(--ml-primary);
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(31, 28, 63, .1), 0 0 0 1px rgba(79, 52, 217, .06);
}

/* Case cards: rounder, softer and with larger figures than the /news/ rows. */
[data-fxm-mediation-list-page] .fxm-mcard-list { gap: 16px; }
[data-fxm-mediation-list-page] .fxm-mcard {
	border-color: var(--ml-line);
	border-radius: 20px;
	box-shadow: var(--ml-shadow);
}
[data-fxm-mediation-list-page] .fxm-mcard:hover {
	border-color: #dcd4fb;
	background: #fff;
	box-shadow: var(--ml-shadow-lift);
	transform: translateY(-2px);
}
[data-fxm-mediation-list-page] .fxm-mcard__link { gap: 16px; padding: 20px 24px 18px; }
body [data-fxm-mediation-list-page] .fxm-mcard .fxm-mcard__logo { border-color: #efedf6; border-radius: 12px; }
[data-fxm-mediation-list-page] .fxm-mcard__broker { font-size: 15px; font-weight: 700; }
[data-fxm-mediation-list-page] .fxm-mcard__meta { font-size: 12px; }
[data-fxm-mediation-list-page] .fxm-mcard__status { padding: 4px 12px; border-radius: 999px; font-size: 12.5px; }
[data-fxm-mediation-list-page] .fxm-mcard__title { margin-bottom: 16px; font-size: 17px; font-weight: 700; }
[data-fxm-mediation-list-page] .fxm-mcard__step { padding-top: 14px; }
[data-fxm-mediation-list-page] .fxm-mcard__step::before { height: 6px; border-radius: 3px; }
[data-fxm-mediation-list-page] .fxm-mcard__step > span { font-size: 12.5px; }
[data-fxm-mediation-list-page] .fxm-mcard__money {
	gap: 12px 16px;
	padding: 14px 16px;
	border: 0;
	border-radius: 16px;
	background: var(--ml-panel);
}
/* A settled amount gets the outcome's tint. */
[data-fxm-mediation-list-page] .fxm-mcard__money:has(.is-final) { background: color-mix(in srgb, var(--tone-soft) 70%, #fff); }
[data-fxm-mediation-list-page] .fxm-mcard__money dt { font-size: 12px; }
[data-fxm-mediation-list-page] .fxm-mcard__money dd { font-family: var(--ml-numeric); font-size: 17px; font-weight: 800; }
[data-fxm-mediation-list-page] .fxm-mcard__ratio > i { height: 6px; border-radius: 3px; }
[data-fxm-mediation-list-page] .fxm-mcard__ratio dd { font-size: 13px; }
[data-fxm-mediation-list-page] .fxm-mcard__tag { padding: 3px 10px; border: 0; border-radius: 999px; background: #f3f2f8; color: var(--ml-text); font-size: 12px; }
[data-fxm-mediation-list-page] .fxm-mcard__more { color: var(--ml-primary); font-size: 13px; font-weight: 600; }

/* Empty state (base: fxm-exposure-board.css, not loaded here). */
:where([data-fxm-mediation-list-page]) .fxm-board-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 56px 24px;
	border: 1px dashed #ddd6f3;
	border-radius: 20px;
	background: #fff;
	text-align: center;
}
:where([data-fxm-mediation-list-page]) .fxm-board-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 16px;
	border-radius: 18px;
	background: var(--ml-primary-soft);
	color: var(--ml-primary);
}
:where([data-fxm-mediation-list-page]) .fxm-board-empty h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ml-ink); }
:where([data-fxm-mediation-list-page]) .fxm-board-empty p { max-width: 340px; margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--ml-muted); }
:where([data-fxm-mediation-list-page]) .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(--ml-primary);
	font-size: 13px;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
:where([data-fxm-mediation-list-page]) .fxm-board-empty__link:hover { background: var(--ml-primary); color: #fff; }

/* Pager */
.fxm-medlist-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 28px;
}
.fxm-medlist-pager > a,
.fxm-medlist-pager > span {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--ml-line);
	border-radius: 12px;
	background: #fff;
	color: var(--ml-text);
	font-family: var(--ml-numeric);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
	box-shadow: 0 1px 2px rgba(31, 28, 63, .04);
	transition: border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.fxm-medlist-pager > a:hover { border-color: #cfc5f7; color: var(--ml-primary); }
.fxm-medlist-pager > a[aria-current="page"] { border-color: transparent; background: var(--ml-grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(79, 52, 217, .7); }
.fxm-medlist-pager > .fxm-medlist-pager__step { padding: 0; }
.fxm-medlist-pager > .is-disabled { opacity: .4; box-shadow: none; }
.fxm-medlist-pager > .fxm-medlist-pager__gap { min-width: 20px; padding: 0; border-color: transparent; background: none; box-shadow: none; color: var(--ml-muted); }

/* How-it-works panel, as the /brokers/rankings sidebar notes. */
.fxm-medlist-aside { position: sticky; top: 88px; display: grid; gap: 16px; min-width: 0; }
.fxm-medlist-flow {
	padding: 22px 20px 18px;
	border: 1px solid var(--ml-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: var(--ml-shadow);
}
.fxm-medlist-flow h2 { margin: 0 0 18px; font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--ml-ink); }
.fxm-medlist-flow ol { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.fxm-medlist-flow li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.fxm-medlist-flow li:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 36px;
	bottom: -12px;
	left: 14.5px;
	width: 1px;
	background: repeating-linear-gradient(180deg, #d6cff5 0 4px, transparent 4px 8px);
}
.fxm-medlist-flow__no {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--ml-primary-soft);
	color: var(--ml-primary);
	font-family: var(--ml-numeric);
	font-size: 13px;
	font-weight: 800;
}
.fxm-medlist-flow li:last-child .fxm-medlist-flow__no { background: #e3f6f3; color: #1f8a7e; }
.fxm-medlist-flow strong { display: block; margin-top: 4px; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ml-ink); }
.fxm-medlist-flow p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--ml-muted); }
.fxm-medlist-flow__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	margin-top: 20px;
	padding: 0 14px;
	border-radius: 12px;
	background: var(--ml-primary-soft);
	color: var(--ml-primary);
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: background-color .16s ease, color .16s ease;
}
.fxm-medlist-flow__cta:hover { background: var(--ml-primary); color: #fff; }
/* Same entry as the case page's sidebar (.fxm-mcase-ai). */
.fxm-medlist-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);
	color: var(--ml-primary);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.fxm-medlist-ai:hover { border-color: var(--ml-primary); box-shadow: 0 8px 20px -12px rgba(79, 52, 217, .45); }

/* Focus rings; inside the scrolling tab row they sit inset so it cannot clip them. */
[data-fxm-mediation-list-page] :is(.fxm-medlist-crumbs a, .fxm-medlist-btn, .fxm-medlist-board__legend a, .fxm-medlist-sort a, .fxm-medlist-pager > a, .fxm-medlist-flow__cta, .fxm-medlist-ai, .fxm-board-empty__link):focus-visible {
	outline: 2px solid var(--ml-primary);
	outline-offset: 2px;
}
.fxm-medlist-tab:focus-visible { outline: 2px solid var(--ml-primary); outline-offset: -2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
	[data-fxm-mediation-list-page] :is(.fxm-medlist-btn, .fxm-medlist-btn svg, .fxm-medlist-tab, .fxm-medlist-sort a, .fxm-medlist-pager > a, .fxm-medlist-board__legend a, .fxm-medlist-flow__cta, .fxm-medlist-ai, .fxm-mcard) { transition: none; }
	[data-fxm-mediation-list-page] :is(.fxm-medlist-btn.is-primary, .fxm-mcard):hover,
	.fxm-medlist-btn.is-primary:hover svg { transform: none; }
}

/* ---------- Narrower desktops and tablets ---------- */
@media (max-width: 1199px) {
	.fxm-medlist-hero__grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 36px; }
	.fxm-medlist-hero h1 { font-size: 36px; }
}
@media (max-width: 1023px) {
	.fxm-medlist-shell { padding-inline: 24px; }
	.fxm-medlist-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
	/* Full-width card: three legend columns and one row of figures keep values near their labels. */
	.fxm-medlist-board__legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.fxm-medlist-board__figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.fxm-medlist-layout { grid-template-columns: minmax(0, 1fr); }
	.fxm-medlist-aside { position: static; }
	/* The five steps read across on tablets. */
	.fxm-medlist-flow ol { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
	.fxm-medlist-flow li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.fxm-medlist-flow li:not(:last-child)::after { top: 14.5px; right: -12px; bottom: auto; left: 40px; width: auto; height: 1px; background: repeating-linear-gradient(90deg, #d6cff5 0 4px, transparent 4px 8px); }
	.fxm-medlist-flow__cta { justify-self: start; margin-top: 18px; }
}

/* ---------- H5 (≤767px) ---------- */
@media (max-width: 767.98px) {
	[data-fxm-mediation-list-page] { padding-bottom: 28px; }
	.fxm-medlist-shell { padding-inline: 16px; }
	.fxm-medlist-hero { padding: var(--fxm-m-header, 60px) 0 24px; }
	.fxm-medlist-hero::before { background-position: right -160px top 120px; background-size: 620px auto; opacity: .22; }
	.fxm-medlist-crumbs { padding-top: 12px; font-size: 12.5px; }
	.fxm-medlist-hero__grid { gap: 40px; margin-top: 14px; }
	.fxm-medlist-eyebrow { margin-bottom: 12px; font-size: 12px; }
	/* CJK titles take no negative tracking on phones. */
	.fxm-medlist-hero h1 { font-size: 26px; line-height: 1.3; letter-spacing: 0; }
	.fxm-medlist-intro { margin-top: 10px; font-size: 14px; line-height: 1.75; text-wrap: balance; }
	.fxm-medlist-hero__actions { gap: 10px; margin-top: 20px; }
	.fxm-medlist-btn { flex: 1 1 0; min-height: 48px; padding: 0 14px; font-size: 15px; }
	.fxm-medlist-note { align-items: flex-start; margin-top: 14px; font-size: 12px; }
	.fxm-medlist-note svg { margin-top: 2px; }

	.fxm-medlist-board { padding: 18px 16px 16px; border-radius: 20px; }
	.fxm-medlist-board__art { top: -34px; right: -6px; width: 96px; height: 96px; }
	.fxm-medlist-board__total { padding-right: 80px; font-size: 13px; }
	.fxm-medlist-board__total strong { font-size: 32px; }
	.fxm-medlist-board__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
	.fxm-medlist-board__figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fxm-medlist-board__legend a { grid-template-columns: 8px minmax(0, 1fr) auto 32px; gap: 6px; min-height: 36px; font-size: 13px; }
	.fxm-medlist-board__figures { gap: 8px; }
	.fxm-medlist-board__figures > div { padding: 10px 12px; }
	.fxm-medlist-board__figures dd b { font-size: 19px; }

	.fxm-medlist-body { padding-top: 4px; }
	.fxm-medlist-main { scroll-margin-top: 72px; }
	/* Tabs scroll edge to edge inside the bar; the sort sits under them, full width. */
	.fxm-medlist-toolbar { padding: 0; margin-bottom: 12px; }
	.fxm-medlist-tabs { flex: 1 1 100%; gap: 20px; padding-inline: 16px; }
	.fxm-medlist-tab { padding: 14px 0 13px; font-size: 14px; }
	.fxm-medlist-sort { flex: 1 1 100%; margin: 0 8px 8px; }
	.fxm-medlist-sort a { min-height: 36px; padding: 0 8px; }

	[data-fxm-mediation-list-page] .fxm-mcard-list { gap: 12px; }
	[data-fxm-mediation-list-page] .fxm-mcard { border-radius: 18px; }
	[data-fxm-mediation-list-page] .fxm-mcard:hover { transform: none; }
	[data-fxm-mediation-list-page] .fxm-mcard__link { padding: 16px; }
	[data-fxm-mediation-list-page] .fxm-mcard__title { margin-bottom: 14px; font-size: 16px; }
	[data-fxm-mediation-list-page] .fxm-mcard__step > span { font-size: 12px; }
	/* The ledger moves the money under a hairline on phones; here it stays a tinted panel. */
	[data-fxm-mediation-list-page] .fxm-mcard__money { padding: 12px 14px; border-top: 0; }

	.fxm-medlist-pager { gap: 6px; margin-top: 20px; }

	.fxm-medlist-layout { gap: 20px; }
	.fxm-medlist-flow { padding: 18px 16px 16px; border-radius: 18px; }
	.fxm-medlist-flow ol { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.fxm-medlist-flow li { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
	.fxm-medlist-flow li:not(:last-child)::after { top: 36px; right: auto; bottom: -10px; left: 14.5px; width: 1px; height: auto; background: repeating-linear-gradient(180deg, #d6cff5 0 4px, transparent 4px 8px); }
	.fxm-medlist-flow__cta { justify-self: stretch; }
	/* The tab bar's centre button opens the same drawer. */
	.fxm-medlist-ai { display: none; }
}
