/* Theme 2.0 model portfolios page (list and detail). Tokens only, no literal colours. Tabular numerals. Hairline rows (--grid), no zebra striping.
   A model portfolio is never styled like a fund: every row carries the "Model portfolio" pill (outlined, brand tint), and the page says so in words. */
.mps { padding-bottom: 120px; }
.mps-head { max-width: 760px; margin: 0 0 24px; }
.mps-h1 { margin-top: 8px; }
.mps-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--t2); text-decoration: none; }
.mps-back:hover { color: var(--tx); text-decoration: underline; }
.mps-lead { max-width: 640px; }

.mps-pill { display: inline-block; flex: none; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--glassbd); background: color-mix(in srgb, var(--r3) 14%, transparent); color: var(--tx); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.mps-stale { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--grid); background: var(--track); color: var(--tx); font-size: 11px; font-weight: 500; white-space: nowrap; }
.mps-stale__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--s6); flex: none; }
.mps-na { color: var(--td); }

/* tools */
.mps-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 16px; }
.mps-f { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.mps-f--q { flex: 1 1 260px; max-width: 420px; }
.mps-f[hidden] { display: none; }
.mps-f .t2-input { height: 44px; }
.mps-chk { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: var(--t2); cursor: pointer; }
.mps-chk input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.mps-note { margin: 0 0 12px; max-width: 760px; font-size: 12px; line-height: 1.5; color: var(--td); }
.mps-foot { margin: 32px 0 0; max-width: 760px; font-size: 12px; line-height: 1.5; color: var(--td); }
.mps-empty { margin: 24px 0; }

/* list: table from 900px, cards under it (both are in the DOM, CSS shows one) */
.mps-wrap { border: 1px solid var(--grid); border-radius: var(--rad-panel); background: var(--panel); overflow-x: auto; }
.mps-table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.mps-th { padding: 6px 8px; background: var(--panelsolid); border-bottom: 1px solid var(--grid); text-align: left; font-size: 12px; font-weight: 500; color: var(--t2); white-space: nowrap; }
.mps-th--r { text-align: right; }
.mps-sort { min-height: 36px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; }
.mps-sort:hover { color: var(--tx); }
.mps-th[aria-sort] .mps-sort { color: var(--tx); }
.mps-th[aria-sort="ascending"] .mps-sort::after { content: ' \2191'; }
.mps-th[aria-sort="descending"] .mps-sort::after { content: ' \2193'; }
.mps-row td, .mps-row th { padding: 12px 8px; border-bottom: 1px solid var(--grid); vertical-align: middle; font-size: 14px; font-weight: 400; color: var(--tx); text-align: left; }
.mps-row:hover td, .mps-row:hover th { background: var(--ghost); }
.mps-table tbody tr:last-child td, .mps-table tbody tr:last-child th { border-bottom: 0; }
.mps-name { min-width: 260px; }
.mps-name__in { display: flex; align-items: center; gap: 10px; }
.mps-link { color: var(--tx); font-weight: 500; text-decoration: none; }
.mps-link:hover { text-decoration: underline; }
.mps-num { text-align: right !important; white-space: nowrap; }
.mps-row.is-stale .mps-link { color: var(--t2); }
.mps-more { margin: 16px auto 0; display: flex; }
.mps-cards { display: none; list-style: none; margin: 0; padding: 0; gap: var(--gap); }
.mps-card { display: flex; flex-direction: column; gap: 8px; padding: var(--pad); border: 1px solid var(--grid); border-radius: var(--rad-panel); background: var(--panel); }
.mps-card + .mps-card { margin-top: var(--gap); }
.mps-card .mps-pill { align-self: flex-start; }
.mps-card__n { font-size: 16px; font-weight: 500; color: var(--tx); text-decoration: none; line-height: 1.3; }
.mps-card__p { font-size: 13px; color: var(--t2); }
.mps-card__g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mps-card__v { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mps-card__f { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mps-card.is-stale .mps-card__n { color: var(--t2); }
@media (max-width: 899px) {
  .mps-wrap { display: none; }
  .mps-cards { display: block; }
  .mps-f { flex: 1 1 100%; min-width: 0; }
  .mps-f--q { max-width: none; }
}

/* detail */
.mps-top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0 0 16px; }
.mps-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.mps-kv { display: flex; flex-direction: column; gap: 2px; }
.mps-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--grid); border-radius: var(--rad-tile); background: var(--ghost); font-size: 13px; color: var(--t2); }
.mps-sec { margin: 0 0 var(--gap); }
.mps-ret { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--gap); }
.mps-ret__c { padding: 12px; border-radius: var(--rad-tile); background: var(--ghost); }
.mps-ret__v { margin-top: 4px; font-size: 24px; font-weight: 400; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mps-ctl { margin: 0 0 12px; }
.mps-chart { height: 300px; }
.mps-mini { border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 220px; }
.mps-mini th, .mps-mini td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--grid); font-size: 14px; font-weight: 400; text-align: left; color: var(--tx); }
.mps-mini td { text-align: right; padding-right: 0; }
.mps-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mps-bars li { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 56px; align-items: center; gap: 12px; font-size: 14px; color: var(--tx); }
.mps-bars__t { display: block; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.mps-bars__f { display: block; height: 100%; border-radius: 3px; background: var(--ramp); }
.mps-bars__v { text-align: right; font-variant-numeric: tabular-nums; color: var(--t2); }
@media (max-width: 899px) {
  .mps-bars li { grid-template-columns: 1fr 56px; }
  .mps-bars__t { grid-column: 1 / -1; grid-row: 2; }
  .mps-chart { height: 240px; }
}

/* ───── 13 Nov 2026: the designed model portfolio page (js/theme2/pages/mps-detail.js). Tokens only, light and dark through the tokens, tabular numerals, no zebra, no footnotes under charts. ───── */
.mps-d { display: flex; flex-direction: column; gap: var(--gap); }
.mps-d .mps-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.mps-sec { margin: 0; }
.mps-sec__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.mps-hero__h { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 32px; }
.mps-big { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.mps-big__v { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.05; font-weight: 400; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mps-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 16px 0 8px; }
.mps-chart { min-height: 320px; }
.mps-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; margin-top: 16px; }
.mps-kpi { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--grid); border-radius: var(--rad-tile); background: var(--ghost); }
.mps-kpi__v { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
/* carousel */
.mps-car { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; }
.mps-car:focus-visible { outline: 2px solid var(--r3); outline-offset: 2px; }
.mps-car__c { flex: 0 0 min(320px, 82%); scroll-snap-align: start; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.mps-car__nav { display: flex; gap: 8px; }
.mps-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mps-bars li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 52px; align-items: center; gap: 10px; font-size: 13px; }
.mps-bars__l { color: var(--tx); overflow-wrap: anywhere; }
.mps-bars__t { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--track); overflow: visible; }
.mps-bars__f { display: block; height: 100%; border-radius: 3px; background: var(--r2); }
.mps-bars__m { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--tx); border-radius: 1px; }
.mps-bars__v { text-align: right; color: var(--t2); font-variant-numeric: tabular-nums; }
.mps-bars--n { counter-reset: n; } .mps-bars--n li::before { content: none; }
.mps-arc { width: 100%; max-width: 240px; height: auto; align-self: center; }
.mps-arc__s { stroke-width: 18; stroke-linecap: butt; }
.mps-arc__s0 { stroke: var(--r2); } .mps-arc__s1 { stroke: var(--r3); } .mps-arc__s2 { stroke: var(--r1); } .mps-arc__s3 { stroke: var(--td); } .mps-arc__s4 { stroke: var(--grid); }
.mps-arc__v { font-size: 40px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mps-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--t2); }
.mps-key li { display: flex; align-items: center; gap: 6px; }
.mps-key__d { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.mps-key__d0 { background: var(--r2); } .mps-key__d1 { background: var(--r3); } .mps-key__d2 { background: var(--r1); } .mps-key__d3 { background: var(--td); } .mps-key__d4 { background: var(--grid); }
/* performance and research */
.mps-prow { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.mps-card2 { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mps-cmp__r { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.mps-cmp__d { font-size: 24px; font-weight: 400; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--tx); }
.mps-cmp__s { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--t2); font-variant-numeric: tabular-nums; }
.mps-risk__r { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; padding: 8px 0; border-top: 1px solid var(--grid); font-size: 14px; }
.mps-risk__r:first-of-type { border-top: 0; }
.mps-risk__v { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mps-risk__m { flex-basis: 100%; }
.mps-info__r { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--grid); font-size: 13px; }
.mps-info__r:first-of-type { border-top: 0; }
.mps-inv__in { width: 100%; height: 44px; }
.mps-inv__p { font-size: 32px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
/* risk and analysis */
.mps-sec2 { margin: 0; }
.mps-sec2__h { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.mps-fam { list-style: none; margin: 0; padding: 0; }
.mps-fam li { display: grid; grid-template-columns: minmax(0, 1.6fr) 64px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--grid); font-size: 13px; }
.mps-fam li:first-child { border-top: 0; }
.mps-fam li.is-me { font-weight: 600; }
.mps-fam__v, .mps-fam__r { color: var(--t2); font-variant-numeric: tabular-nums; }
.mps-tbl__w { overflow-x: auto; }
@media (max-width: 699px) {
  .mps-bars li { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) 48px; }
  .mps-fam li { grid-template-columns: minmax(0, 1fr) 56px; } .mps-fam__r { grid-column: 1 / -1; }
  .mps-car__nav { display: none; }
}
.mps-fc__b { align-self: center; }
.mps-fc { margin: 16px 0 0; }
.mps-fc__t { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--t2); max-width: 760px; }
.mps-fc__g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.mps-fc__l { margin: 0 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--t2); }

/* Scenario ranges from history: neutral colour only (no green or red, no arrows), the disclaimer sits directly under the figures. */
/* Find more links, and the list's active filters */
.mps-find { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mps-find__a { display: inline-flex; width: 100%; justify-content: flex-start; text-decoration: none; }
.mps-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.mps-chips[hidden] { display: none; }
.mps-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px 4px 12px; border: 1px solid var(--glassbd); border-radius: var(--rad-seg-i); background: var(--ghost); font-size: 13px; color: var(--tx); }
.mps-chip button { min-width: 28px; min-height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--t2); cursor: pointer; font-size: 16px; line-height: 1; }
.mps-chip button:hover { background: var(--track); color: var(--tx); }

/* ───── 13 Nov 2026 (v4): the detail page is the Fund Workspace layout (the fund page's own stylesheet is loaded beside this one by the template). Rules below are scoped .mps-fd so they win by specificity. ───── */
.mps-fd { padding-bottom: 120px; }
.mps-fd .mps-d { display: flex; flex-direction: column; gap: 0; }
.mps-fd .mps-d > * { margin-top: 40px; }
.mps-fd .mps-d > .fd-sec:first-child { margin-top: 40px; }
.mps-fd .fd-facts { margin: 0; max-width: 620px; font-size: 14px; line-height: 1.55; color: var(--t2); }
.mps-fd .fd-banner, .mps-fd .mps-banner { max-width: 620px; margin: 0; }
.mps-fd .fd-kpi__v.t2-neg { color: var(--neg); }
.mps-fd .fd-lv.t2-pos { color: var(--pos); } .mps-fd .fd-lv.t2-neg { color: var(--neg); }
/* panels: the mock's sizes (4.3 across, 425 high; the research row is four across, 380 high) */
.mps-fd .t2-rampbar { position: relative; overflow: visible; }
.mps-fd .mps-med { position: absolute; top: -3px; width: 2px; height: calc(100% + 6px); border-radius: 1px; background: var(--tx); pointer-events: auto; }
.mps-fd .fd-car .fd-pan { aspect-ratio: auto; height: 425px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.mps-fd .fd-car--perf .fd-pan { height: 380px; }
@media (min-width: 1280px) { .mps-fd .fd-car { grid-auto-columns: calc((100% - 18px) / 4.3); } .mps-fd .fd-car--perf { grid-auto-columns: calc((100% - 18px) / 4); } }
@media (min-width: 900px) and (max-width: 1279px) { .mps-fd .fd-car, .mps-fd .fd-car--perf { grid-auto-columns: calc((100% - 6px) / 2.3); } }
@media (max-width: 899px) { .mps-fd .fd-car .fd-pan, .mps-fd .fd-car--perf .fd-pan { height: auto; max-height: none; overflow: visible; } }
.mps-fd .fd-hold .t2-panel-head { align-items: baseline; }
.mps-fd .mps-hnote { margin-top: auto; padding-top: 8px; }
.mps-fd .mps-mcap { gap: 8px; }
.mps-fd .mps-arc__v { margin-top: 8px; font-size: 44px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mps-fd .mps-arc { width: 100%; max-width: 240px; margin: 12px auto 0; }
.mps-fd .mps-key { margin-top: auto; }
.mps-fd .mps-key b { font-weight: 700; color: var(--tx); }
.mps-fd .fd-gauge { margin-bottom: 14px; }
.mps-fd .fd-find .mps-find { margin-top: 4px; }
.mps-fd .fd-cmpp__btn { margin-top: auto; }

.mps-fd .fd-hold .fd-alloc__rows { gap: 4px; justify-content: flex-start; }
.mps-fd .fd-alloc__rows { justify-content: flex-start; }
.mps-fd .fd-gauge { margin-bottom: 18px; }

/* summary card from load on wide screens (the design places it over the chart's right side); the cover is a token gradient (the design shows a blue to violet block) */
.mps-fd .t2-follow.mps-sc--inline { position: absolute; right: calc(var(--page-x, 56px) * -0.43); top: 286px; bottom: auto; z-index: 6; width: 346px; max-height: none; opacity: 1; transform: none; pointer-events: auto; }
.mps-fd .mps-sc--inline .t2-sc__cover { flex: 0 0 128px; background: linear-gradient(135deg, color-mix(in srgb, var(--r2) 70%, var(--panelsolid)), color-mix(in srgb, var(--r3) 82%, var(--panelsolid))); }
.mps-fd .t2-follow.t2-sc .t2-sc__cover { background: linear-gradient(135deg, color-mix(in srgb, var(--r2) 70%, var(--panelsolid)), color-mix(in srgb, var(--r3) 82%, var(--panelsolid))); }
@media (max-width: 1279px) { .mps-fd .t2-follow.mps-sc--inline { position: fixed; } }
/* overlay picker and table additions */
.mps-fd .fd-ovpop .t2-input { width: 100%; height: 40px; }
.mps-fd .mps-ovlist { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.mps-fd .mps-ovlist .fd-menu__item { flex-direction: column; align-items: flex-start; gap: 2px; }
.mps-fd .mps-ovlist .fd-menu__item:disabled { opacity: 0.5; cursor: default; }
.mps-fd .mps-addhold { position: relative; height: 0; }
.mps-fd .mps-addhold .fd-ovpop { right: 0; top: 8px; }
.mps-fd .fd-legend .fd-rm { display: inline-flex; }

.mps-fd .mps-gband { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: color-mix(in srgb, var(--r3) 45%, transparent); pointer-events: auto; }

/* ───── v5.1 (Luke's six fixes) ───── */
.mps-fd .fd-actions .t2-btn--glass, .mps-fd .fd-actions .t2-btn--ai { color: var(--onglass); }
/* panels share the row: with four or fewer, they split the width; one panel gets the whole row and its list runs in two columns */
@media (min-width: 1280px) {
  .mps-fd .fd-car.mps-fill, .mps-fd .fd-car--perf.mps-fill { grid-auto-columns: calc((100% - (var(--n, 4) - 1) * 6px) / var(--n, 4)); }
}
@media (min-width: 900px) { .mps-fd .fd-car.mps-car--1 { grid-auto-columns: 100%; } }
.mps-fd .mps-car--1 .fd-pan { height: auto; min-height: 0; }
.mps-fd .mps-car--1 .fd-alloc__rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; row-gap: 10px; }
@media (max-width: 699px) { .mps-fd .mps-car--1 .fd-alloc__rows { grid-template-columns: minmax(0, 1fr); } }
/* Scenario ranges panel on the chart (the fund page's forecast panel placement), figures stacked inside it */
/* the scenario panel is taller than the fund page's forecast panel: give the chart room so it sits clear of the 1, 3, 5 year numbers */

/* ───── v5.3 (14 Nov 2026): Risk and analysis and Compare side by side, 1:1 with the mockup. Tokens only. ───── */
.mps-fd .mps-d > .mps-ra { margin-top: 18px; }
.mps-fd .mps-d > .mps-sbs { margin-top: var(--gap); }
.mps-fd .mps-ra__h { display: flex; flex-direction: column; gap: 4px; padding: 0 0 8px; }
.mps-fd .mps-p__t { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.3; color: var(--tx); }
.mps-fd .mps-p__s { font-size: 13px; line-height: 1.4; color: var(--td); }
.mps-fd .mps-p__tl { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mps-fd .mps-p { display: flex; flex-direction: column; gap: 14px; }
.mps-fd .mps-p__hd { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; }
.mps-fd .mps-ra__g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.mps-fd .mps-ra__g > .mps-h { grid-column: span 2; gap: 16px; min-height: 380px; }
.mps-fd .mps-ra__g > .mps-h > .mps-p__s { margin-top: -8px; }
.mps-fd .mps-ra__g > .mps-w { grid-column: span 4; }
@media (max-width: 899px) { .mps-fd .mps-ra__g > .mps-h { grid-column: span 4; min-height: 0; } }
/* segmented control: the mockup's ghost track with a glass pill on the active choice */
.mps-fd .mps-seg { display: flex; gap: 2px; padding: 3px; border-radius: 18px; background: var(--ghost); align-self: flex-start; }
.mps-fd .mps-seg button { display: flex; align-items: center; padding: 6px 11px; border: 0; border-radius: 15px; background: transparent; color: var(--td); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.mps-fd .mps-seg button[aria-pressed="true"] { background: var(--glass); color: var(--onglass); }
.mps-fd .mps-seg button:focus-visible { outline: 2px solid var(--r3); outline-offset: 2px; }
/* Rolling 12 month returns */
.mps-fd .mps-rl__lg { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--t2); }
.mps-fd .mps-rl__lg span { display: flex; align-items: center; gap: 8px; }
.mps-fd .mps-rl__sw { display: block; width: 18px; height: 3px; border-radius: 2px; background: var(--r2); }
.mps-fd .mps-rl__sw.is-d { height: 0; border-top: 1.5px dashed var(--t2); background: none; border-radius: 0; }
.mps-fd .mps-rl { position: relative; height: 228px; padding-left: 44px; box-sizing: border-box; }
.mps-fd .mps-rl__y { position: absolute; left: 0; width: 36px; text-align: right; transform: translateY(-50%); font-size: 12px; color: var(--td); }
.mps-fd .mps-rl__p { position: absolute; left: 44px; right: 0; top: 0; height: 200px; }
.mps-fd .mps-rl__p svg { display: block; overflow: visible; }
.mps-fd .mps-rl__x { position: absolute; top: 206px; font-size: 12px; color: var(--td); white-space: nowrap; transform: translateX(-50%); }
.mps-fd .mps-rl__x.is-a { left: 44px; transform: none; }
.mps-fd .mps-rl__x.is-z { right: 0; transform: none; }
.mps-fd .mps-rl__st { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: auto; }
.mps-fd .mps-rl__p { cursor: crosshair; outline-offset: 2px; }
.mps-fd .mps-rl__p:focus-visible { outline: 2px solid var(--r3); }
.mps-fd .mps-rl__g { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--td); opacity: 0.6; pointer-events: none; }
.mps-fd .mps-rl__tip { position: absolute; top: 4px; z-index: 5; display: flex; flex-direction: column; gap: 4px; min-width: 150px; padding: 9px 12px; box-sizing: border-box; border-radius: 10px; background: var(--panelsolid); border: 1px solid var(--pbd); box-shadow: var(--shadow); font-size: 12px; color: var(--t2); pointer-events: none; white-space: nowrap; transform: translateX(10px); }
.mps-fd .mps-rl__tip.is-r { transform: translateX(calc(-100% - 10px)); }
.mps-fd .mps-rl__tip[hidden], .mps-fd .mps-rl__g[hidden] { display: none; }
.mps-fd .mps-rl__tip b { font-weight: 600; color: var(--tx); font-variant-numeric: tabular-nums; }
.mps-fd .mps-rl__tip span { display: flex; align-items: center; gap: 8px; }
.mps-fd .mps-rl__tip .mps-rl__sw { flex: 0 0 18px; }
.mps-fd .mps-rl__st > div { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--grid); }
.mps-fd .mps-rl__k { font-size: 12px; color: var(--td); }
.mps-fd .mps-rl__s { font-size: 12px; color: var(--td); font-variant-numeric: tabular-nums; }
.mps-fd .mps-rl__v { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--tx); }
/* Breakdown against peers */
.mps-fd .mps-vs2 { display: flex; flex-direction: column; gap: 14px; flex: 1; justify-content: space-around; }
.mps-fd .mps-vs2__r { display: grid; grid-template-columns: 110px minmax(0, 1fr) 70px; align-items: center; gap: 14px; }
.mps-fd .mps-vs2__l { font-size: 13px; color: var(--t2); }
.mps-fd .mps-vs2__m { display: flex; flex-direction: column; gap: 5px; }
.mps-fd .mps-vs2__t { position: relative; height: 8px; border-radius: 4px; background: var(--track); }
.mps-fd .mps-vs2__f { position: absolute; top: 0; height: 100%; border-radius: 3px; }
.mps-fd .mps-vs2__f.is-pos { background: var(--r2); }
.mps-fd .mps-vs2__f.is-neg { background: color-mix(in srgb, var(--td) 55%, transparent); }   /* a lower weight is not bad: neutral grey */
.mps-fd .mps-vs2__c { position: absolute; left: 50%; top: -3px; width: 1px; height: 14px; background: var(--td); opacity: 0.6; }
.mps-fd .mps-vs2__a { font-size: 11px; color: var(--td); }
.mps-fd .mps-vs2__v { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; color: var(--tx); }
/* Risk against return */
.mps-fd .mps-sp__hd { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mps-fd .mps-sp__rt { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 12px; color: var(--t2); }
.mps-fd .mps-sp__lg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.mps-fd .mps-sp__lg span { display: flex; align-items: center; gap: 7px; }
.mps-fd .mps-sp__lgd { display: block; box-sizing: border-box; border-radius: 50%; }
.mps-fd .mps-sp__lgd.is-me { width: 12px; height: 12px; background: var(--r2); }
.mps-fd .mps-sp__lgd.is-fam { width: 11px; height: 11px; border: 2px solid var(--r3); background: var(--panelsolid); }
.mps-fd .mps-sp__lgd.is-o { width: 9px; height: 9px; background: color-mix(in srgb, var(--td) 50%, transparent); }
.mps-fd .mps-sp__msg:empty { display: none; }
.mps-fd .mps-sp__msg[data-err] { color: var(--loss); }
.mps-fd .mps-sp__c { --pt: 30px; --pb: 58px; position: relative; height: 466px; padding: var(--pt) 24px var(--pb) 56px; box-sizing: border-box; }   /* plot stays 378px high: 466 less 30 above (y axis title) and 58 below (tick row and x axis title) */
.mps-fd .mps-sp__yt, .mps-fd .mps-sp__xt { position: absolute; font-size: 11px; line-height: 1.2; color: var(--td); white-space: nowrap; pointer-events: none; }
.mps-fd .mps-sp__yt { left: 0; top: 4px; }
.mps-fd .mps-sp__xt { left: 56px; right: 24px; bottom: 8px; text-align: center; }
.mps-fd .mps-sp__y { position: absolute; left: 0; width: 46px; text-align: right; font-size: 12px; color: var(--td); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.mps-fd .mps-sp__in { position: relative; width: 100%; height: 100%; border-left: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.mps-fd .mps-sp__gl { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); opacity: 0.7; }
.mps-fd .mps-sp__tr { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.mps-fd .mps-sp__x { position: absolute; top: calc(100% + 10px); transform: translateX(-50%); font-size: 12px; color: var(--td); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mps-fd .mps-sp__d { position: absolute; z-index: 2; box-sizing: border-box; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--td) 50%, transparent); font: inherit; cursor: pointer; }
.mps-fd .mps-sp__d:hover, .mps-fd .mps-sp__d:focus-visible { z-index: 20; background: color-mix(in srgb, var(--td) 90%, transparent); }
.mps-fd .mps-sp__d.is-fam { z-index: 5; background: var(--panelsolid); border: 2px solid var(--r3); }
.mps-fd .mps-sp__d.is-ov { z-index: 5; background: var(--dc); border: 2px solid var(--panelsolid); }
.mps-fd .mps-sp__d.is-fam.is-ov { border-color: var(--r3); }
.mps-fd .mps-sp__d.is-me { z-index: 6; background: var(--r2); border: 3px solid var(--panelsolid); cursor: default; box-shadow: 0 2px 8px color-mix(in srgb, var(--r2) 35%, transparent); }
.mps-fd .mps-sp__d.is-still { cursor: default; }
.mps-fd .mps-sp__d:hover, .mps-fd .mps-sp__d:focus-visible { z-index: 20; }
.mps-fd .mps-sp__d:focus-visible { outline: 2px solid var(--tx); outline-offset: 3px; }
.mps-fd .mps-sp__n { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 500; line-height: 1.2; white-space: nowrap; color: var(--t2); pointer-events: none; }
.mps-fd .mps-sp__d.is-me .mps-sp__n { font-weight: 600; color: var(--tx); }
.mps-fd .mps-sp__d.is-flip .mps-sp__n { left: auto; right: calc(100% + 8px); }
.mps-fd .mps-sp__tip { display: none; position: absolute; bottom: calc(100% + 8px); left: -6px; width: 210px; padding: 11px 13px; box-sizing: border-box; border-radius: 12px; background: var(--panelsolid); border: 1px solid var(--pbd); box-shadow: var(--shadow); flex-direction: column; gap: 4px; text-align: left; pointer-events: none; font-weight: 400; cursor: default; }
.mps-fd .mps-sp__d.is-r .mps-sp__tip { left: auto; right: -6px; }
.mps-fd .mps-sp__d:hover .mps-sp__tip, .mps-fd .mps-sp__d:focus-visible .mps-sp__tip { display: flex; }
.mps-fd .mps-sp__tip b { font-size: 13px; font-weight: 600; color: var(--tx); }
.mps-fd .mps-sp__tip em { font-style: normal; font-size: 11px; color: var(--td); }
.mps-fd .mps-sp__tv { font-size: 13px; color: var(--t2); }
.mps-fd .mps-sp__tv b { font-weight: 600; }
.mps-fd .mps-sp__th { font-size: 12px; font-weight: 600; color: var(--r2); }
@media (min-width: 1100px) { .mps-fd .mps-sp__hd { flex-wrap: nowrap; } .mps-fd .mps-sp__rt { flex-shrink: 0; } }
/* Compare side by side */
.mps-fd .mps-sbs .mps-addhold { margin-top: -14px; }
.mps-fd .mps-addbtn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--glassbd); background: var(--ghost); color: var(--tx); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.mps-fd .mps-addbtn:hover { background: var(--track); }
.mps-fd .mps-addbtn:focus-visible { outline: 2px solid var(--r3); outline-offset: 2px; }
.mps-fd .mps-tbl2 { --c0: 190px; min-width: calc(var(--c0) + var(--n, 2) * 150px); width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.mps-fd .mps-tbl2__c0 { width: var(--c0); }
.mps-fd .mps-tbl2 th, .mps-fd .mps-tbl2 td { padding: 11px 12px 12px 0; border-bottom: 1px solid var(--grid); font-size: 14px; font-weight: 500; text-align: left; color: var(--t2); }
.mps-fd .mps-tbl2 tbody th { font-weight: 400; color: var(--t2); }
.mps-fd .mps-tbl2 thead th { padding: 0 12px 10px 0; vertical-align: top; font-weight: 400; }
.mps-fd .mps-tbl2__g th { padding: 14px 0 4px; border-bottom: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--td); }
.mps-fd .mps-tbl2__h { display: flex; align-items: flex-start; gap: 8px; }
.mps-fd .mps-tbl2__d { display: block; flex: 0 0 9px; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; }
.mps-fd .mps-tbl2__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mps-fd .mps-tbl2__n { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--tx); text-decoration: none; overflow-wrap: anywhere; }
.mps-fd a.mps-tbl2__n:hover { text-decoration: underline; }
.mps-fd .mps-tbl2__p { font-size: 12px; font-weight: 400; color: var(--td); }
.mps-fd .mps-tbl2__x { display: flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; margin-top: -2px; padding: 0; border: 0; border-radius: 11px; background: var(--ghost); color: var(--t2); cursor: pointer; }
.mps-fd .mps-tbl2__x:hover { background: var(--track); color: var(--tx); }
@media (max-width: 699px) {
  .mps-fd .mps-sp__c { height: 386px; padding: var(--pt) 20px var(--pb) 48px; }
  .mps-fd .mps-sp__xt { left: 48px; right: 20px; white-space: normal; }
  .mps-fd .mps-sp__y { width: 40px; }
  .mps-fd .mps-tbl2 { --c0: 112px; }
  .mps-fd .mps-vs2__r { grid-template-columns: 84px minmax(0, 1fr) 62px; gap: 10px; }
  .mps-fd .mps-rl__st { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mps-fd .mps-rl__st > div:nth-child(n+3) { margin-top: 4px; }
  .mps-fd .mps-rl { height: 236px; }
}


/* ───── v5.3c (14 Nov): the scenario ranges panel is the fund page's AI scenario panel (same markup and classes); the only addition is the caption row under the column labels ───── */
.mps-fd .mps-scn__cap { display: flex; gap: 6px; margin: 2px 0 10px; }
.mps-fd .mps-scn__cap span { flex: 1; font-size: 11px; line-height: 1.4; color: var(--td); }
.mps-fd .mps-scn__st { margin: 0; color: var(--t2); }
.mps-fd .t2-sc.is-away, .t2-sc.is-away { display: none; }

/* ───── v5.3d SSR block: the server HTML inside #mpsList and #mpsDetail (includes/mps-ssr.php). Shows for the instant before the script draws, then the script replaces it. Plain lists and tables, tokens only. ───── */
.mps-ssr { display: flex; flex-direction: column; gap: 12px; color: var(--t2); font-size: 14px; line-height: 1.5; }
.mps-ssr h2, .mps-ssr h3 { margin: 0; font-size: 16px; font-weight: 500; color: var(--tx); }
.mps-ssr p { margin: 0; }
.mps-ssr a { color: var(--tx); text-decoration: underline; text-underline-offset: 2px; }
.mps-ssr ul, .mps-ssr ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.mps-ssr nav ul, .mps-ssr .mps-ssr__az { gap: 4px 12px; }
.mps-ssr details { border-top: 1px solid var(--grid); padding: 8px 0; }
.mps-ssr summary { cursor: pointer; color: var(--tx); font-weight: 500; }
.mps-ssr details ul { display: block; column-count: 3; column-gap: 24px; margin-top: 8px; }
.mps-ssr details li { break-inside: avoid; padding: 2px 0; }
.mps-ssr table { width: 100%; max-width: 520px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mps-ssr th, .mps-ssr td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--grid); text-align: left; font-weight: 400; font-size: 14px; }
.mps-ssr th { color: var(--td); font-size: 12px; }
@media (max-width: 699px) { .mps-ssr details ul { column-count: 1; } }
