/* Macro face pages (web/macro_insights.js + web/macro_pages.js), 2026-09-30.
   Uses the theme tokens from styles.css only, so light and dark mode follow
   :root[data-theme]. Same vocabulary as the Model Hub: a shaded call, tiles with a
   figure, cards with an uppercase head, slim tables. Tone is carried by two variables
   (--t ink, --tb wash) set by a class; label pills are never green or red — the only
   red/green is the subtle pos/neg ink on signed values and their bars. */

.mi-page { margin: 0 0 10px; color: var(--text); font-size: 12.5px; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.mi-page .muted { color: var(--muted); }
.mi-page p { margin: 0; }
.mi-pos { color: var(--bull); }
.mi-neg { color: var(--bear); }
.mi-page .mi-t-info { --t: var(--blue-chip); --tb: var(--blue-chip-bg); }
.mi-page .mi-t-warn { --t: var(--amber); --tb: var(--amber-bg); }
.mi-page .mi-t-mute { --t: var(--grey-chip); --tb: var(--grey-chip-bg); }

/* ── the page bar: which page of this face ── */
.mi-tabs { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 10px; }
.mi-tab {
  font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; padding: 7px 13px 6px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.mi-tab:hover { color: var(--text); }
.mi-tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.mi-tab b {
  font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--grey-chip-bg); border-radius: 8px;
  padding: 0 6px; line-height: 1.6; font-variant-numeric: tabular-nums;
}
.mi-tabs-r { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; padding: 0 2px 6px; font-size: 11.5px; color: var(--muted); }
.mi-fresh { display: inline-flex; align-items: center; gap: 5px; cursor: help; white-space: nowrap; }
.mi-fresh i { width: 7px; height: 7px; border-radius: 50%; background: var(--bull); }
.mi-fresh.stale { color: var(--amber); }
.mi-fresh.stale i { background: var(--amber); }
.mi-asof { cursor: help; white-space: nowrap; }

.mi-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* the reading pages sit on the page grey so the white cards read as cards */
.mi-p-summary > .mi-body, .mi-p-stocks > .mi-body, .mi-p-evidence > .mi-body { background: var(--bg); border-radius: 8px; padding: 10px; }
.mi-warn { padding: 5px 10px; border-radius: 8px; background: var(--amber-bg); color: var(--amber); font-size: 12px; margin-bottom: 8px; }
.mi-wait { color: var(--muted); padding: 18px 10px; font-size: 12.5px; }
.mi-hint { font-size: 11.5px; color: var(--muted); }
.mi-row { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; }
.mi-k { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.mi-k-sp { margin-top: 10px; }
.mi-lnk { font: inherit; font-size: 11.5px; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.mi-lnk:hover { text-decoration: underline; }
.mi-clip2, .mi-clip3 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.mi-clip3 { -webkit-line-clamp: 3; line-clamp: 3; }
.mi-small { font-size: 11.5px; color: var(--muted); }
.mi-page p.mi-small { margin: 0 0 5px; }
.mi-priv {
  display: inline-block; font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 999px;
  border: 1px dashed var(--grey-chip); color: var(--grey-chip); vertical-align: 1px; cursor: help; white-space: nowrap;
}
.mi-tagc {
  display: inline-block; font-size: 10px; font-weight: 600; line-height: 1.55; padding: 0 6px; border-radius: 999px;
  background: var(--grey-chip-bg); color: var(--grey-chip); white-space: nowrap;
}
.mi-tagc.on { background: var(--amber-bg); color: var(--amber); text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }

/* ── the call: the page's verdict ── */
.mi-call {
  display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 9px 12px; border-radius: 9px;
  background: var(--tb); box-shadow: inset 3px 0 0 var(--t);
}
.mi-call-lab {
  flex: none; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; padding: 2px 10px; border-radius: 999px;
  background: var(--t); color: var(--panel); cursor: help; white-space: nowrap;
}
.mi-call-state { background: transparent; color: var(--t); box-shadow: inset 0 0 0 1px var(--t); text-transform: uppercase; }
.mi-call-b { flex: 1 1 320px; min-width: 0; font-size: 14px; font-weight: 650; line-height: 1.4; }
.mi-dots { display: inline-flex; align-items: center; gap: 4px; flex: none; cursor: help; }
.mi-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--grey-chip); box-sizing: border-box; }
.mi-dots i.on { background: var(--amber); border-color: var(--amber); }
.mi-dots b { margin-left: 4px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mi-eq { display: flex; gap: 10px; align-items: baseline; padding: 7px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); }
.mi-eq-t { font-size: 13px; min-width: 0; }
.mi-changed { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 0 2px; font-size: 12px; color: var(--muted); }
.mi-chg b { color: var(--text); font-weight: 600; }

/* ── tiles ── */
.mi-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 8px; }
/* A row of 5-8 tiles never leaves one orphan on a second line: it is one row while it
   fits and two even rows when it does not. `:nth-child(n):last-child` = exactly n tiles. */
.mi-tiles:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mi-tiles:has(> :nth-child(6):last-child),
.mi-tiles:has(> .mi-tile-w):has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mi-tiles:has(> :nth-child(7):last-child) { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mi-tiles:has(> :nth-child(8):last-child) { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@media (max-width: 1230px) {
  .mi-tiles:has(> :nth-child(7):last-child), .mi-tiles:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .mi-tiles:has(> :nth-child(5):last-child), .mi-tiles:has(> :nth-child(6):last-child),
  .mi-tiles:has(> .mi-tile-w):has(> :nth-child(5):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.mi-tile {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 11px 9px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--border); position: relative;
}
.mi-tile[data-tip] { cursor: help; }
.mi-tile[class*="mi-t-"] { box-shadow: inset 0 3px 0 var(--t); }
.mi-tile .k { font-size: 11px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 2px 5px; min-height: 17px; }
.mi-tile .k .mi-tagc, .mi-tile .k .mi-lab { margin-left: auto; }
.mi-tile .v { font-size: 19px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.mi-tile .v small { font-size: 12px; font-weight: 600; color: var(--muted); }
.mi-tile .s { font-size: 11px; color: var(--muted); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.mi-tile .s b { color: var(--text); font-weight: 600; }
.mi-tile .mi-meter, .mi-tile .mi-prox, .mi-tile .mi-pbar { margin: 5px 0 3px; }
.mi-tile .mi-pbar { display: block; width: auto; height: 6px; border-radius: 3px; }
.mi-tiles-s .mi-tile .v { font-size: 16.5px; }
.mi-tiles-s .mi-tile { padding: 6px 11px 7px; }
.mi-tile-w { grid-column: span 2; }
.mi-fdot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--grey-chip); box-sizing: border-box; flex: none; }
.mi-fdot.on { background: var(--amber); border-color: var(--amber); }
.mi-lads { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.mi-lad { white-space: nowrap; }
.mi-lad i { font-style: normal; color: var(--muted); margin-right: 3px; }
.mi-lad b { font-weight: 600; }

/* ── figures ── */
/* where a value sits in its own history: quartile ticks, one marker */
.mi-meter {
  position: relative; display: block; height: 6px; border-radius: 3px; min-width: 56px;
  background: linear-gradient(to right,
    var(--grey-chip-bg) 0 24.4%, var(--border) 24.4% 25.6%, var(--grey-chip-bg) 25.6% 49.4%, var(--border) 49.4% 50.6%,
    var(--grey-chip-bg) 50.6% 74.4%, var(--border) 74.4% 75.6%, var(--grey-chip-bg) 75.6%);
}
.mi-meter i { position: absolute; top: -3px; bottom: -3px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--text); opacity: .7; }
.mi-meter.rare i { background: var(--amber); opacity: 1; }
/* distance from a trigger: left of the tick = off, right = on */
.mi-prox {
  position: relative; display: block; height: 6px; border-radius: 3px; min-width: 56px;
  background: linear-gradient(to right, var(--grey-chip-bg) 0 50%, var(--amber-bg) 50% 100%);
}
.mi-prox::before { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--muted); }
.mi-prox .m { position: absolute; top: -2px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--panel); border: 2px solid var(--text); box-sizing: border-box; }
.mi-prox .m.on { background: var(--amber); border-color: var(--amber); }
.mi-spark { display: block; width: 100%; height: 30px; margin: 3px 0 1px; color: var(--muted); overflow: visible; }
.mi-spark polyline { fill: none; stroke: currentColor; stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.mi-spark .ref { stroke: var(--amber); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
/* signed bar on a centre-zero track; positive bar from the left */
.mi-sbar { position: relative; display: inline-block; width: 84px; height: 8px; border-radius: 2px; background: var(--grey-chip-bg); vertical-align: middle; flex: none; }
.mi-sbar::before { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--muted); opacity: .6; }
.mi-sbar i { position: absolute; top: 0; bottom: 0; }
.mi-sbar i.p { left: 50%; background: var(--bull); opacity: .7; border-radius: 0 2px 2px 0; }
.mi-sbar i.n { right: 50%; background: var(--bear); opacity: .7; border-radius: 2px 0 0 2px; }
.mi-sbar.hol i { background: transparent; border: 1.5px solid var(--grey-chip); box-sizing: border-box; opacity: 1; }
.mi-pbar { position: relative; display: inline-block; width: 84px; height: 8px; border-radius: 2px; background: var(--grey-chip-bg); vertical-align: middle; flex: none; overflow: hidden; }
.mi-pbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); opacity: .65; border-radius: 2px; }
.mi-pbar.b i { background: var(--grey-chip); opacity: .75; }
.mi-pbar.c i { background: var(--grey-chip); opacity: .38; }
.mi-pbar.warn i { background: var(--amber); opacity: .9; }
/* the effect as a picture: tick = zero, band = the 95% range, dot = the estimate */
.mi-eff { display: flex; align-items: center; gap: 8px; cursor: help; }
.mi-eff-t { position: relative; flex: 1; min-width: 60px; height: 12px; }
.mi-eff-t::before { content: ''; position: absolute; left: 0; right: 0; top: 5.5px; height: 1px; background: var(--border); }
.mi-eff-t .z { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--muted); }
.mi-eff-t .ci { position: absolute; top: 4px; height: 4px; border-radius: 2px; background: var(--grey-chip); opacity: .5; }
.mi-eff-t .pt { position: absolute; top: 2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--panel); border: 2px solid var(--text); box-sizing: border-box; }
.mi-eff-t .pt.clear { background: var(--text); }
.mi-eff b { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 58px; text-align: right; }

/* ── evidence labels ── */
.mi-lab {
  display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.65;
  padding: 0 7px; border-radius: 999px; white-space: nowrap; cursor: help;
}
.mi-lab.mi-lab-val { background: var(--blue-chip-bg); color: var(--blue-chip); }
.mi-lab.mi-lab-prov { background: var(--amber-bg); color: var(--amber); }
.mi-lab.mi-lab-grey, .mi-lab.mi-lab-null { background: var(--grey-chip-bg); color: var(--grey-chip); }
.mi-lab.mi-lab-fact { box-shadow: inset 0 0 0 1px var(--border); color: var(--grey-chip); }
.mi-mix { display: inline-flex; width: 110px; height: 7px; border-radius: 4px; overflow: hidden; gap: 1px; cursor: help; flex: none; }
.mi-mix i { display: block; min-width: 3px; }
.mi-mix-l { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11px; color: var(--muted); }
.mi-mix-l span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mi-mix-l i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.mi-mix i.mi-lab-val, .mi-mix-l i.mi-lab-val { background: var(--blue-chip); }
.mi-mix i.mi-lab-prov, .mi-mix-l i.mi-lab-prov { background: var(--amber); }
.mi-mix i.mi-lab-grey, .mi-mix-l i.mi-lab-grey { background: var(--grey-chip); opacity: .75; }
.mi-mix i.mi-lab-null, .mi-mix-l i.mi-lab-null { background: var(--grey-chip); opacity: .35; }
.mi-mix i.mi-lab-fact, .mi-mix-l i.mi-lab-fact { background: var(--border); }

/* ── cards and sections ── */
.mi-grid2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 10px; align-items: stretch; }
.mi-grid2 > :only-child { grid-column: 1 / -1; }
.mi-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mi-sec { min-width: 0; }
.mi-c { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px 11px; min-width: 0; }
.mi-c-flush { padding-bottom: 5px; }
.mi-c-h, .mi-sec-h { display: flex; align-items: baseline; gap: 4px 9px; flex-wrap: wrap; margin-bottom: 8px; min-height: 18px; }
.mi-sec-h { margin: 2px 2px 6px; }
.mi-c-t { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.mi-c-t[data-tip] { cursor: help; }
.mi-c-u { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; min-width: 0; }
.mi-c-more { margin-left: auto; font-size: 11.5px; white-space: nowrap; }
.mi-c-b { min-width: 0; }
.mi-how { font-size: 12px; color: var(--muted); }
.mi-how > summary { cursor: pointer; font-size: 11.5px; width: max-content; }
.mi-how-b { margin-top: 6px; }
.mi-c .mi-how { margin-top: 6px; }

/* ── Do next ── */
.mi-acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mi-act { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--row-border); }
.mi-act:first-child { border-top: 0; padding-top: 0; }
.mi-act:last-child { padding-bottom: 0; }
.mi-act-n {
  flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.mi-act-b { min-width: 0; flex: 1; }
.mi-act-topic { display: block; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mi-act-h { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; }
.mi-page p.mi-act-d { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.mi-act-f { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 5px; margin-top: 5px; }
.mi-act-f .mi-lnk { margin-left: auto; }

/* ── findings: compact cards ── */
.mi-fs { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 8px; }
.mi-f { display: flex; flex-direction: column; gap: 5px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; min-width: 0; }
.mi-f.live { box-shadow: inset 0 3px 0 var(--accent); }
.mi-f-h { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.mi-f-h .mi-lab { margin-left: auto; }
.mi-f h4 { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3; }
.mi-f-today { font-size: 11.5px; color: var(--muted); }
.mi-f-impl { font-size: 12px; }
.mi-f-f { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 3px; font-size: 11px; }
.mi-f-f .mi-lnk { margin-left: auto; }
.mi-live {
  font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; line-height: 1.65; padding: 0 7px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent); cursor: help; white-space: nowrap;
}
.mi-live.off { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); font-weight: 600; }

/* ── gauge levels as dense rows ── */
.mi-lvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; }
.mi-lv { display: grid; grid-template-columns: minmax(0, 1fr) auto 86px 32px; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--row-border); cursor: help; font-size: 12px; }
.mi-lv .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-lv b { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; }
.mi-lv .p { font-size: 11px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ── dip odds ── */
.mi-odds-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 20px; }
.mi-odds { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mi-odds-h { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; font-size: 12px; }
.mi-odds-h .mi-lab { margin-left: auto; }
.mi-odds-r { display: grid; grid-template-columns: 92px minmax(0, 1fr) 46px; align-items: center; gap: 8px; font-size: 11.5px; cursor: help; }
.mi-odds-r .l { color: var(--muted); white-space: nowrap; }
.mi-odds-r .mi-pbar { width: auto; }
.mi-odds-r b { text-align: right; font-variant-numeric: tabular-nums; }
.mi-odds .mi-eff { margin-top: 3px; padding-top: 4px; border-top: 1px dashed var(--row-border); }

/* ── tables ── */
.mi-tbl-wrap { overflow-x: auto; max-width: 100%; }
.mi-table { border-collapse: collapse; font-size: 12px; width: max-content; min-width: 60%; font-variant-numeric: tabular-nums; }
.mi-table-w { width: 100%; min-width: 520px; }      /* narrower than this it scrolls inside its card rather than crushing */
.mi-table th, .mi-table td { padding: 5px 8px; border-bottom: 1px solid var(--row-border); text-align: left; vertical-align: middle; overflow-wrap: normal; }
.mi-table th { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; color: var(--muted); white-space: nowrap; border-bottom: 1px solid var(--border); }
.mi-table th[data-tip] { cursor: help; }
.mi-table tbody tr:last-child td { border-bottom: 0; }
.mi-table tbody tr:hover td { background: var(--hover); }
.mi-table td { max-width: 360px; }
.mi-table .num { text-align: right; white-space: nowrap; }
.mi-table tr.mi-hi td { background: var(--accent-soft); }
.mi-barcell { white-space: nowrap; }
.mi-barv { display: inline-block; min-width: 46px; margin-left: 7px; text-align: right; }
.mi-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.mi-sub[data-tip] { cursor: help; }
.mi-pair { display: grid; grid-template-columns: 42px 84px auto; align-items: center; gap: 7px; font-size: 11.5px; line-height: 1.55; }
.mi-pair .l { color: var(--muted); font-size: 10.5px; }
.mi-pair b { font-weight: 600; }
.mi-cv { cursor: pointer; color: var(--accent); font-weight: 650; }
.mi-on { color: var(--text); }
.mi-page p.mi-note { font-size: 11.5px; color: var(--muted); max-width: 1100px; margin: 4px 0; }
.mi-tbl { border-top: 1px solid var(--row-border); padding: 7px 0; }
.mi-tbl:first-child { border-top: 0; padding-top: 0; }
.mi-tbl > summary { cursor: pointer; font-weight: 650; font-size: 12.5px; }
.mi-tbl .mi-tbl-wrap { margin-top: 6px; }

/* ── weekend gap monitor ── */
.mi-wk { display: flex; flex-direction: column; gap: 8px; }
.mi-wk-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.mi-wk-state { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 11px; border-radius: 999px; background: var(--grey-chip-bg); color: var(--grey-chip); }
.mi-wk-state.on { background: var(--amber-bg); color: var(--amber); }
.mi-wk-mv { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; font-size: 12px; }
.mi-wk-mv b { font-size: 15px; font-variant-numeric: tabular-nums; }
.mi-wk-mv b small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.mi-wk-mv .mi-pbar { width: 70px; align-self: center; }
.mi-wk-l { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; font-size: 12px; }
.mi-wk-l[data-tip] { cursor: help; }
.mi-wk-o { display: inline-flex; gap: 5px; align-items: baseline; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; cursor: help; }
.mi-wk-o.ok { border-color: var(--bull); }
.mi-wk-o.no { border-color: var(--bear); }

/* ── Evidence page ── */
.mi-evg { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 10px; align-items: start; }
.mi-acc { border-top: 1px solid var(--row-border); }
.mi-acc:first-child { border-top: 0; }
.mi-acc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 2px; }
.mi-acc > summary::-webkit-details-marker { display: none; }
.mi-acc > summary::before { content: '▸'; color: var(--muted); font-size: 11px; width: 10px; flex: none; }
.mi-acc[open] > summary::before { content: '▾'; }
.mi-acc-t { font-size: 13px; font-weight: 650; min-width: 0; margin-right: auto; }
.mi-acc-v { font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.mi-acc-b { padding: 0 2px 12px 20px; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; line-height: 1.5; max-width: 880px; }
.mi-acc-b .mi-eff { max-width: 360px; }
.mi-impl { font-weight: 600; }
.mi-page p.mi-read { margin: 0 0 7px; font-size: 12.5px; line-height: 1.55; }
.mi-terms { list-style: none; margin: 4px 0 0; padding: 0; }
.mi-terms li { display: flex; align-items: baseline; gap: 4px 8px; padding: 4px 0; border-top: 1px solid var(--row-border); font-size: 12px; flex-wrap: wrap; }
.mi-terms .n { flex: 1 1 180px; min-width: 0; }
.mi-nulls { list-style: none; margin: 0; padding: 0; }
.mi-nulls li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; border-top: 1px solid var(--row-border); font-size: 11.5px; color: var(--muted); }
.mi-nulls li:first-child { border-top: 0; padding-top: 0; }
.mi-nulls li > span:first-child { flex: 1 1 260px; min-width: 0; }
.mi-nulls li .mi-eff { flex: 0 0 170px; }
.mi-ins { display: flex; flex-wrap: wrap; gap: 3px 12px; }
.mi-in { font-size: 11.5px; color: var(--muted); white-space: nowrap; cursor: help; }
.mi-in i { font-style: normal; opacity: .8; }
.mi-in.stale { color: var(--amber); text-decoration: line-through dotted; }
.mi-drawer {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: 2px 0 0;
  padding: 7px 9px; background: var(--bg); border: 1px solid var(--row-border); border-radius: 6px; font-size: 12px;
}
.mi-drawer dt { color: var(--muted); cursor: default; }
.mi-drawer dt[data-tip] { cursor: help; }
.mi-drawer dd { margin: 0; min-width: 0; }
.mi-flash { animation: mi-flash 1.6s ease-out; }
@keyframes mi-flash { from { box-shadow: 0 0 0 2px var(--accent); } to { box-shadow: 0 0 0 2px transparent; } }

/* ── what each page takes off the screen ── */
/* a page that does not show the face's table hides it and the toolbar that filters it */
main:has(#custom-top > .mi-page[data-mi-table="0"]) #table-wrap,
main:has(#custom-top > .mi-page[data-mi-table="0"]) #controls,
main:has(#custom-top > .mi-page[data-mi-table="0"]) #metric-guide { display: none !important; }
/* the Δ-horizon row only drives the currency board */
.mac-chrome:has(~ .mi-page[data-mi-hz="0"]) .mac-hzbar { display: none; }
/* the toolbar's hide-the-board switch is replaced by the Currency board / Pairs table pages */
main:has(#custom-top > .mi-page:not(.mi-compat)) #f-fxboard { display: none !important; }
/* on a board page the long legacy captions give way to the page's one-line hint */
.mi-page:not(.mi-compat) .fx-board > .block-title,
.mi-page:not(.mi-compat) .fx-numbar .block-title .muted { display: none; }
.mi-page .fx-numbar { margin: 0; flex: none; }
.mi-page .fx-numbar .block-title { flex: none; margin: 0; }
.mi-page .fx-board { margin-bottom: 4px; }
.mi-p-pairs .fx-board { display: none; }
.mi-how .pb-strip { margin: 0; }
.mi-compat [data-mi-go] { display: none; }

/* ── backdrop: four pills on every Macro face ── */
.mi-bd { flex: 1 1 100%; display: flex; align-items: center; gap: 4px 6px; min-width: 0; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); padding: 1px 2px 0; }
.mi-bd-lab { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-right: 2px; cursor: help; }
.mi-bd-item {
  display: inline-flex; align-items: baseline; gap: 5px; max-width: 100%; padding: 1px 9px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--panel); color: var(--muted); text-decoration: none; white-space: nowrap;
}
.mi-bd-item b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.mi-bd-item:hover { border-color: var(--accent); }
.mi-bd-item.cur { border-color: var(--accent); background: var(--accent-soft); }
.mi-bd-item.amber b { color: var(--amber); }
.mi-bd-item.stale { opacity: .6; }

@media (max-width: 1180px) {
  .mi-grid2, .mi-evg { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .mi-tabs-r { margin-left: 0; flex: 1 1 100%; padding-top: 4px; }
  .mi-page .mi-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .mi-tile-w { grid-column: 1 / -1; }
  .mi-fs { grid-template-columns: minmax(0, 1fr); }
  .mi-eq { flex-direction: column; gap: 2px; }
  .mi-lvs { grid-template-columns: minmax(0, 1fr); }
  .mi-c-more { margin-left: 0; }
  .mi-p-summary > .mi-body, .mi-p-stocks > .mi-body, .mi-p-evidence > .mi-body { padding: 6px; }
}

/* ---- Home: Backdrop card (home.js h2Backdrop) ---- */
.h2-bd { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.h2-bd-item {
  display: block; text-align: left; font: inherit; color: var(--text); background: var(--panel);
  border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; cursor: pointer; min-width: 0;
}
.h2-bd-item:hover { border-color: var(--grey-chip); }
.h2-bd-item.h2-bd-amber { border-left: 3px solid var(--amber); }
.h2-bd-item.h2-bd-stale { opacity: .6; }
.h2-bd-h { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 12px; }
.h2-bd-h b { font-size: 12.5px; }
.h2-bd-h small { color: var(--muted); font-weight: 600; letter-spacing: .03em; }
.h2-bd-l { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.h2-bd-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 10px 0 0; }
.reg-title { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-right: 6px; cursor: help; }
