:root {
  --bg: #090a0c; --panel: #111318; --panel-2: #171a20;
  --line: #262a32; --line-2: #343944; --text: #f1f2f4;
  --muted: #aab0bb; --faint: #838a96; --history: #d5d9df;
  --green: #35c88a; --green-soft: rgba(53, 200, 138, .12);
  --red: #eb6a62; --red-soft: rgba(235, 106, 98, .1);
  --gold: #c7a95a; --gold-soft: rgba(199, 169, 90, .12);
  --orange: #e39b59; --orange-soft: rgba(227, 155, 89, .11);
  --api: #55a7ff; --api-soft: rgba(85, 167, 255, .1);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 var(--mono); }
button { font: inherit; }
.shell { max-width: none; width: 100%; margin: 0; padding: 0 0 48px; }
.shell > section { width: min(1180px, 100%); max-width: 1180px; margin: 0 auto; padding: 14px 24px 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand > span { padding: 6px 8px; background: var(--text); color: var(--bg); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.brand b { font-weight: 500; font-size: 16px; }
.system { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.system i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); flex: 0 0 auto; }
.system small { display: none; }

.tabs { display: flex; align-items: stretch; gap: 4px; flex: 1 1 auto; min-width: 0; overflow: visible; }
.tab { padding: 0 10px; height: 52px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font: 12px var(--mono); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--green); }
.tab.test.active { border-bottom-color: var(--gold); }
.tab-cluster { position: relative; display: flex; align-items: stretch; }
.tab-cluster > .tab { padding-right: 3px; }
.tab-menu { position: relative; }
.tab-menu-toggle {
  display: grid; width: 18px; height: 52px; place-items: center; border: 0;
  border-bottom: 2px solid transparent; background: transparent; color: var(--faint);
  cursor: pointer; font: 9px var(--mono); list-style: none;
}
.tab-menu-toggle::-webkit-details-marker { display: none; }
.tab-menu-toggle:hover, .tab-menu-toggle.active { color: var(--text); }
.tab-menu-toggle.active { border-bottom-color: var(--green); }
.tab-menu-popover {
  position: absolute; z-index: 40; top: 47px; left: -69px; min-width: 105px; padding: 5px;
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel); box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.tab-menu-popover button {
  width: 100%; padding: 7px 9px; border: 0; border-radius: 4px; background: transparent;
  color: var(--muted); cursor: pointer; font: 10px var(--mono); text-align: left; white-space: nowrap;
}
.tab-menu-popover button:hover, .tab-menu-popover button.active { background: var(--panel-2); color: var(--text); }
.manager-picker { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--faint); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.manager-picker select, .page-size-label select { height: 30px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--panel); color: var(--text); font: 11px var(--mono); }
.manager-picker select { width: 200px; padding: 0 28px 0 10px; }
.manager-picker > span { display: none; }

h1, h2, h3 { margin: 0; font-weight: 500; }
h1 { font: 500 22px/1.15 var(--mono); letter-spacing: 0; }
h2 { font-size: 15px; } h3 { font-size: 14px; }
.overview-head, .manager-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 4px 0 12px; }
.overview-head > div > .eyebrow { display: none; }
.overview-head p, .manager-head p, .panel-head p { margin: 0 0 3px; color: var(--faint); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.manager-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.manager-notes span { padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); font-size: 10px; }
.head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.live-pill { padding: 5px 8px; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.live-pill.error { color: var(--red); background: var(--red-soft); }
.live-pill.api-account { color: var(--api); background: var(--api-soft); }
.live-pill.live-account { color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(53, 200, 138, .22); }
.positive { color: var(--green) !important; } .negative { color: var(--red) !important; }
/* Direction rather than profit. Same hues, dropped to roughly half strength, so
   a net short still reads as short at a glance without shouting like a loss. */
.signed-soft.positive { color: color-mix(in srgb, var(--green) 55%, var(--text)) !important; }
.signed-soft.negative { color: color-mix(in srgb, var(--red) 55%, var(--text)) !important; }

/* Fidelity */
.fidelity-head { align-items: flex-end; padding: 10px 0 8px; }
.fidelity-head .eyebrow { display: none; }
.fidelity-controls { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.fidelity-managers { display: grid; gap: 14px; }
.fidelity-panel { overflow: hidden; margin: 0; }
.fidelity-panel-head { min-height: 54px; align-items: center; gap: 12px; padding: 11px 16px; }
.fidelity-panel-head h2 { font-size: 15px; }
.fidelity-panel-head p { display: block; margin: 3px 0 0; color: var(--faint); font-size: 9px; letter-spacing: 0; text-transform: none; }
.fidelity-card-modes { margin-left: auto; }
.fidelity-board {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) 92px 92px 92px;
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
  padding: 11px 16px 13px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.fidelity-board-head { color: var(--faint); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.fidelity-board-head:not(:first-child), .fid-now, .fid-extra, .fid-corr { text-align: right; }
.fid-name { color: var(--muted); font-size: 11px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fid-now, .fid-extra, .fid-corr { font-size: 15px; font-weight: 600; }
.fid-corr { grid-row: 2 / 4; grid-column: 4; align-self: center; }
.fidelity-chart { height: 260px; }
.fidelity-chart svg { width: 100%; height: 100%; display: block; }

/* overview cards */
.overview-groups { display: flex; flex-direction: column; gap: 22px; margin-bottom: 18px; }
.overview-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.overview-group-head h2 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.overview-group-head span { color: var(--faint); font-size: 10px; }
.overview-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.overview-empty { color: var(--faint); padding: 30px 4px; }
.overview-table-panel { overflow: hidden; }
.overview-table-panel .table-scroll { max-height: none; }
.manager-summary-table { min-width: 880px; table-layout: fixed; }
.manager-summary-table th, .manager-summary-table td { padding: 10px 12px; }
.manager-summary-table .source-badge { margin-top: 0; }
.manager-summary-table th:first-child, .manager-summary-table td:first-child { width: 240px; }
.manager-summary-table th:last-child, .manager-summary-table td:last-child { width: 150px; }
.manager-summary-table tbody td:nth-child(3), .manager-summary-table tbody td:nth-child(4) { color: var(--text); }
.overview-sort { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; }
.manager-summary-table th:first-child .overview-sort { justify-content: flex-start; }
.overview-sort:hover, .overview-sort.active { color: var(--text); }
.overview-sort i { color: var(--faint); font-style: normal; }
.overview-sort.active i { color: var(--api); }
.overview-curve-cell { padding-top: 5px !important; padding-bottom: 5px !important; }
.overview-sparkline { display: block; width: 100%; height: 34px; }
.overview-manager-cell { width: 240px; }
.overview-manager-line { min-width: 0; display: flex; align-items: center; gap: 8px; }
.overview-manager-link { min-width: 0; overflow: hidden; padding: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; font: 500 11px var(--mono); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.overview-manager-link:hover { color: var(--green); }

/* Evidence-first overview: observed, modelled, and funded records stay separate. */
.evidence-page-head { align-items: flex-end; padding-bottom: 14px; }
.evidence-page-head h1, .risk-page-head h1, .fidelity-head h1 { font: 500 20px/1.2 var(--mono); letter-spacing: 0; }
.evidence-page-note { max-width: 760px; margin: 7px 0 0 !important; color: var(--muted) !important; font-size: 10px !important; letter-spacing: 0 !important; line-height: 1.55; text-transform: none !important; }
.evidence-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.evidence-key > div { position: relative; display: grid; grid-template-columns: 9px auto; column-gap: 8px; padding: 12px 14px; border-right: 1px solid var(--line); }
.evidence-key > div:last-child { border-right: 0; }
.evidence-key i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--muted); }
.evidence-key i.api { background: var(--api); } .evidence-key i.model { background: var(--history); } .evidence-key i.live { background: var(--green); }
.evidence-key b { color: var(--text); font-size: 10px; font-weight: 500; }
.evidence-key span { grid-column: 2; margin-top: 3px; color: var(--faint); font-size: 8px; line-height: 1.5; }
.evidence-table-panel { overflow: hidden; }
.evidence-table-panel .table-scroll { max-height: none; overflow: visible; }
.evidence-table { width: 100%; table-layout: fixed; }
.evidence-table th, .evidence-table td { overflow: hidden; vertical-align: middle; }
.evidence-table th:first-child, .evidence-table td:first-child { width: 16%; }
.evidence-table th:nth-child(2), .evidence-table td:nth-child(2) { width: 11%; }
.evidence-table th:nth-child(3), .evidence-table td:nth-child(3),
.evidence-table th:nth-child(4), .evidence-table td:nth-child(4),
.evidence-table th:nth-child(5), .evidence-table td:nth-child(5),
.evidence-table th:nth-child(6), .evidence-table td:nth-child(6) { width: 8%; }
.evidence-table th:nth-child(7), .evidence-table td:nth-child(7) { width: 6%; }
.evidence-table th.bench-col, .evidence-table td.bench-col { width: 7%; }
.evidence-table th:nth-last-child(3), .evidence-table td:nth-last-child(3) { width: 11%; }
.evidence-table th:nth-last-child(2), .evidence-table td:nth-last-child(2) { width: 12%; }
.evidence-table th:last-child, .evidence-table td:last-child { width: 12%; }
.evidence-row { cursor: pointer; }
.evidence-row:hover td { background: var(--panel-2); }
.evidence-num b { font-size: 14px; font-weight: 500; }
.evidence-num b.strong-num { font-size: 16px; }
.evidence-tier-cell .evidence-source { display: block; margin-top: 6px; font-size: 9px; }
.evidence-sort { display: inline-flex; align-items: center; gap: 5px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.evidence-sort:hover, .evidence-sort.active { color: var(--text); }
/* The button fills its cell, so th.num's text-align never reached it and every
   numeric header sat left of the column it labelled. Align the button, not the cell. */
.evidence-table th.num .evidence-sort { justify-content: flex-end; }
.evidence-sort i { color: var(--faint); font-style: normal; } .evidence-sort.active i { color: var(--api); }
.evidence-manager b, .evidence-manager span, .evidence-metric b, .evidence-metric span, .evidence-gap b, .evidence-gap span, .evidence-live b, .evidence-live span { display: block; }
.evidence-manager button { padding: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; font: 500 11px var(--mono); text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.evidence-manager button:hover { color: var(--green); }
.evidence-manager span { margin-top: 5px; color: var(--faint); font-size: 9.5px; line-height: 1.45; white-space: normal; }
.evidence-metric b { color: var(--text); font-size: 17px; font-weight: 500; line-height: 1.1; }
.evidence-metric b em { color: var(--faint); font-size: 8px; font-style: normal; font-weight: 400; }
.evidence-metric span { margin-top: 5px; color: var(--muted); font-size: 8px; white-space: normal; }
.evidence-metric small { display: block; margin-top: 5px; color: var(--faint); font-size: 9px; line-height: 1.45; white-space: normal; }
.evidence-info { display: inline-grid !important; place-content: center; width: 13px; height: 13px; margin-top: 7px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--faint); cursor: help; font-size: 8px !important; font-style: italic; }
.evidence-gap b { color: var(--text); font-size: 15px; font-weight: 500; }
.evidence-gap span { margin-top: 5px; color: var(--faint); font-size: 8px; }
.evidence-adjusted b { color: var(--api); font-size: 20px; }
.evidence-live b { color: var(--text); font-size: 14px; font-weight: 500; }
.evidence-live span { margin-top: 5px; color: var(--faint); font-size: 8px; }
.evidence-live b, .evidence-live span, .evidence-status small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-curve { display: block; width: 100%; height: 36px; }
.evidence-curve-cell { overflow: visible !important; }
.chart-wrap.overview-curve-wrap { height: 40px; overflow: visible; padding: 0; }
.overview-curve-wrap .chart-tooltip { z-index: 30; }
.evidence-table-note { margin: 0; padding: 11px 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 8px; line-height: 1.55; }
.correlation-panel { overflow: hidden; margin: 18px 0 12px; border: 1px solid var(--line); background: var(--panel); }
.correlation-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
/* Correlation is a monthly question sitting in a daily-use slot, so it is folded
   away by default and the summary row is the affordance to open it. */
summary.correlation-head { cursor: pointer; list-style: none; }
summary.correlation-head::-webkit-details-marker { display: none; }
summary.correlation-head::after { content: "show"; flex: none; align-self: center; padding: 3px 8px; border: 1px solid var(--line-2); color: var(--faint); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
#overview-matrix[open] > summary.correlation-head::after { content: "hide"; }
summary.correlation-head:hover::after { color: var(--text); border-color: var(--muted); }
#overview-matrix:not([open]) > summary.correlation-head { border-bottom: 0; }
.correlation-head p { margin: 0 0 2px; color: var(--faint); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.correlation-head > span { color: var(--faint); font-size: 9px; text-align: right; }
.correlation-filters { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-height: 52px; padding: 9px 14px; background: rgba(9, 10, 12, .28); border-bottom: 1px solid var(--line); }
.matrix-filter-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.matrix-filter-group.hidden-managers { padding-left: 16px; border-left: 1px solid var(--line); }
.matrix-filter-label { margin-right: 2px; color: var(--faint); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.matrix-filter { display: inline-flex; align-items: center; gap: 7px; padding: 4px 7px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 8px; }
.matrix-filter small { color: var(--faint); font-size: 10px; line-height: 1; }
.matrix-filter:hover { border-color: var(--green); color: var(--text); }
.matrix-filter.is-hidden { border-style: dashed; background: transparent; color: var(--faint); }
.matrix-filter.is-hidden:hover { color: var(--green); }
.correlation-scroll { max-width: 100%; overflow: auto; }
.correlation-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.correlation-table th, .correlation-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.correlation-table tr:last-child th, .correlation-table tr:last-child td { border-bottom: 0; }
.correlation-table th:last-child, .correlation-table td:last-child { border-right: 0; }
.correlation-table thead th { position: sticky; top: 0; z-index: 2; height: 82px; padding: 7px; background: #14171c; text-align: left; vertical-align: bottom; }
.correlation-table .correlation-corner { left: 0; z-index: 4; width: 190px; height: auto; padding: 10px 12px; color: var(--faint); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.correlation-table .correlation-column { width: 88px; }
.correlation-table .correlation-row { position: sticky; left: 0; z-index: 1; width: 190px; height: 52px; padding: 7px 12px; background: #111318; text-align: left; }
.correlation-stream { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.correlation-stream:hover b { color: var(--red); text-decoration: line-through; }
.correlation-stream b { display: block; overflow: hidden; color: var(--text); font-size: 9px; font-weight: 500; line-height: 1.35; text-overflow: ellipsis; }
.correlation-stream.row b { white-space: nowrap; }
.correlation-stream.column b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.source-badge { display: inline-block; margin-top: 5px; padding: 2px 5px; background: var(--panel-2); color: var(--muted); font-size: 7px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.source-badge.live { color: var(--green); background: var(--green-soft); }
.source-badge.api { color: var(--api); background: var(--api-soft); }
.source-badge.csv { color: var(--history); background: rgba(201, 205, 211, .08); }
.correlation-cell { height: 52px; padding: 7px 4px; background: rgba(255, 255, 255, .012); text-align: center; font-variant-numeric: tabular-nums; }
.correlation-cell b, .correlation-cell small { display: block; }
.correlation-cell b { font-size: 12px; font-weight: 500; }
.correlation-cell small { margin-top: 2px; color: rgba(241, 242, 244, .48); font-size: 7px; }
.correlation-cell.diagonal { background: rgba(255, 255, 255, .045); color: var(--muted); }
.correlation-cell.diverse { background: rgba(53, 200, 138, .18); color: var(--green); }
.correlation-cell.low { background: rgba(85, 167, 255, .1); color: var(--muted); }
.correlation-cell.medium { background: rgba(199, 169, 90, .13); color: var(--gold); }
.correlation-cell.high { background: rgba(235, 106, 98, .15); color: var(--red); }
.correlation-cell.insufficient { color: var(--faint); }
.correlation-legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 38px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 8px; }
.correlation-legend span { display: inline-flex; align-items: center; gap: 6px; }
.correlation-legend i { width: 10px; height: 10px; border: 1px solid var(--line); }
.correlation-legend i.diverse { background: rgba(53, 200, 138, .18); }
.correlation-legend i.low { background: rgba(85, 167, 255, .1); }
.correlation-legend i.medium { background: rgba(199, 169, 90, .13); }
.correlation-legend i.high { background: rgba(235, 106, 98, .15); }
.table-pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 9px 12px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9px; }
.table-page-tools, .table-page-numbers { display: flex; align-items: center; gap: 5px; }
.table-page-button { min-width: 28px; height: 28px; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font: 9px var(--mono); }
.table-page-button:hover:not(:disabled) { border-color: var(--api); color: var(--text); }
.table-page-button.active { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.table-page-button:disabled { opacity: .3; cursor: default; }
.table-page-ellipsis { min-width: 20px; text-align: center; }
.page-size-label { display: flex; align-items: center; gap: 7px; }
.page-size-label select { height: 28px; min-width: 66px; padding: 0 6px; }
.manager-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 15px 16px; cursor: pointer; transition: border-color .12s; }
.manager-card:hover { border-color: var(--line-2); }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mc-rung { padding: 3px 8px; border-radius: 4px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); }
.mc-rung.good { color: var(--green); background: var(--green-soft); }
.mc-rung.api { color: var(--api); background: var(--api-soft); }
.mc-rung.live { color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(53, 200, 138, .22); }
.mc-rung.warn { color: var(--gold); background: var(--gold-soft); }
.mc-rung.bad { color: var(--red); background: var(--red-soft); }
.mc-mandate { margin: 3px 0 10px; color: var(--faint); font-size: 10px; }
.spark { width: 100%; height: 46px; display: block; overflow: visible; }
.mc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 6px; margin: 12px 0 4px; }
.mc-stat span { display: block; color: var(--faint); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.mc-stat b { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mc-decision { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.mc-decision.good, .mc-decision.live { color: var(--green); } .mc-decision.api { color: var(--api); } .mc-decision.warn { color: var(--gold); } .mc-decision.bad { color: var(--red); }

/* live manager risk */
.live-overview-head { align-items: flex-end; padding-bottom: 16px; }
.live-model-basis { color: var(--muted); font-size: 10px; text-align: right; }
.live-account-overview { overflow: hidden; margin: 0 0 14px; }
.live-account-overview > summary { cursor: pointer; list-style: none; }
.live-account-overview > summary::-webkit-details-marker { display: none; }
.live-account-overview > summary::after { content: "show"; color: var(--faint); font: 8px var(--mono); text-transform: uppercase; }
.live-account-overview[open] > summary::after { content: "hide"; }
.live-account-table { min-width: 760px; table-layout: fixed; }
.live-account-table th, .live-account-table td { padding: 9px 11px; white-space: nowrap; }
.live-account-table th:first-child, .live-account-table td:first-child { width: 170px; }
.live-account-table .live-account-name { color: var(--text); font-weight: 500; }
.live-policy-strip { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.live-policy-strip > div { position: relative; display: flex; align-items: center; gap: 9px; padding: 12px 14px 12px 16px; border-right: 1px solid var(--line); }
.live-policy-strip > div::before { content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%; }
.live-policy-strip > div:last-child { border-right: 0; }
.live-policy-strip span { display: inline-grid; place-content: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 4px; font-size: 8px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.live-policy-strip b { font-size: 11px; font-weight: 500; color: var(--text); }
.live-policy-strip .green { background: var(--green-soft); }
.live-policy-strip .green::before { background: var(--green); }
.live-policy-strip .green span { color: var(--green); background: rgba(53, 200, 138, .16); }
.live-policy-strip .yellow::before { background: var(--gold); }
.live-policy-strip .yellow span { color: var(--gold); background: var(--gold-soft); }
.live-policy-strip .orange::before { background: var(--orange); }
.live-policy-strip .orange span { color: var(--orange); background: var(--orange-soft); }
.live-policy-strip .red::before { background: var(--red); }
.live-policy-strip .red span { color: var(--red); background: var(--red-soft); }
.live-manager-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 14px; }
.live-manager-card { display: flex; flex-direction: column; width: 100%; overflow: hidden; margin: 0; border-radius: 10px; border-left: 3px solid var(--line-2); }
.live-manager-card.status-green { border-left-color: var(--green); }
.live-manager-card.status-collecting { border-left-color: var(--line-2); }
.live-manager-card.status-hold { border-left-color: var(--gold); }
.live-manager-card.status-cut { border-left-color: var(--orange); }
.live-manager-card.status-exit { border-left-color: var(--red); }
.live-manager-card-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.live-manager-card-head p { margin: 0 0 2px; color: var(--faint); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.live-manager-card-head h2 { font: 500 15px/1.2 var(--mono); }
.live-card-actions { display: flex; align-items: center; gap: 10px; }
.live-card-equity { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.live-current { padding: 14px; border-bottom: 1px solid var(--line); background: rgba(53, 200, 138, .025); }
.live-current.hold { background: rgba(199, 169, 90, .045); }
.live-current.cut { background: rgba(227, 155, 89, .05); }
.live-current.exit { background: rgba(235, 106, 98, .05); }
.live-current-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-current-head > div:first-child > b { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; }
.live-current-title { display: flex; align-items: center; gap: 5px; color: var(--faint); font-size: 8px; letter-spacing: .09em; text-transform: uppercase; }
.live-current-status { min-width: 92px; padding: 6px 9px; border-radius: 5px; background: var(--panel-2); text-align: right; }
.live-current-status b, .live-current-status span { display: block; }
.live-current-status b { color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.live-current-status span { margin-top: 1px; color: var(--faint); font-size: 7px; }
.live-current-status.green b { color: var(--green); }
.live-current-status.hold b { color: var(--gold); }
.live-current-status.cut b { color: var(--orange); }
.live-current-status.exit b { color: var(--red); }
.live-current-limits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 13px; }
.live-risk-value { min-width: 0; }
.live-risk-label { display: flex; align-items: center; gap: 5px; min-width: 0; }
.live-risk-label > span { overflow: hidden; color: var(--faint); font-size: 8px; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.live-risk-value > b { display: block; overflow: hidden; margin-top: 2px; color: var(--text); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.live-risk-value > small { display: block; margin-top: 1px; color: var(--faint); font-size: 7px; white-space: nowrap; }
.live-risk-value.hold b { color: var(--gold); }
.live-risk-value.cut b { color: var(--orange); }
.live-risk-value.exit b { color: var(--red); }
.live-risk-value.current b { color: var(--green); }
.live-current.hold .live-risk-value.current b { color: var(--gold); }
.live-current.cut .live-risk-value.current b { color: var(--orange); }
.live-current.exit .live-risk-value.current b { color: var(--red); }
/* Zoned drawdown gauge: continue → no-new-capital → cut → exit */
.risk-gauge { margin-top: 16px; }
.risk-track { position: relative; height: 9px; border-radius: 999px; background: #191d24; overflow: visible; }
.risk-zone { position: absolute; top: 0; bottom: 0; }
.risk-zone.continue { background: var(--green-soft); border-radius: 999px 0 0 999px; }
.risk-zone.hold { background: var(--gold-soft); }
.risk-zone.cut { background: var(--orange-soft); }
.risk-zone.exit { background: var(--red-soft); border-radius: 0 999px 999px 0; }
.risk-tick { position: absolute; top: -3px; width: 2px; height: 15px; border-radius: 1px; transform: translateX(-1px); }
.risk-tick.hold { background: var(--gold); }
.risk-tick.cut { background: var(--orange); }
.risk-tick.exit { background: var(--red); }
.risk-live-marker { position: absolute; top: 50%; z-index: 2; width: 13px; height: 13px; border: 2px solid var(--bg); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(53, 200, 138, .18); transform: translate(-50%, -50%); }
.risk-live-marker.hold { background: var(--gold); box-shadow: 0 0 0 3px rgba(199, 169, 90, .2); }
.risk-live-marker.cut { background: var(--orange); box-shadow: 0 0 0 3px rgba(227, 155, 89, .2); }
.risk-live-marker.exit { background: var(--red); box-shadow: 0 0 0 3px rgba(235, 106, 98, .22); }
.risk-live-marker.collecting { background: var(--muted); box-shadow: 0 0 0 3px rgba(140, 146, 157, .16); }
.risk-scale { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; color: var(--faint); font-size: 8px; font-variant-numeric: tabular-nums; }
.risk-scale-mid { letter-spacing: .05em; text-transform: uppercase; }
.risk-gauge.pending .risk-track { background: repeating-linear-gradient(90deg, #191d24 0 7px, #14171d 7px 14px); }
.risk-gauge.pending .risk-scale { justify-content: center; }
.risk-scale-note { color: var(--faint); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.live-path-check { padding: 10px 14px 12px; border-bottom: 1px solid var(--line); background: rgba(9, 10, 12, .22); }
.live-path-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.live-path-head b { color: var(--muted); font-size: 9px; font-weight: 500; }
.live-path-head span { color: var(--faint); font-size: 8px; }
.live-path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.live-path-grid .live-risk-value > b { font-size: 13px; }
.live-path-empty { margin: 0; color: var(--faint); font-size: 9px; }
.live-compare { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.live-compare-block { min-width: 0; padding: 11px 14px 12px; }
.live-compare-block + .live-compare-block { border-left: 1px solid var(--line); background: rgba(53, 200, 138, .02); }
.live-compare-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.live-compare-head > b { color: var(--muted); font-size: 9px; font-weight: 500; }
.live-compare-head .source-badge { max-width: 130px; overflow: hidden; margin: 0; text-overflow: ellipsis; }
.live-compact-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.live-compact-stat span, .live-compact-stat b { display: block; }
.live-compact-stat span { color: var(--faint); font-size: 7px; letter-spacing: .06em; text-transform: uppercase; }
.live-compact-stat b { margin-top: 2px; color: var(--text); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.live-six-month { padding: 11px 14px 13px; background: rgba(9, 10, 12, .2); }
.live-six-month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.live-six-month-title { display: flex; align-items: center; gap: 5px; }
.live-six-month-head b { color: var(--muted); font-size: 9px; font-weight: 500; }
.live-six-month-head span { color: var(--faint); font-size: 8px; }
.live-six-month-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.live-six-month-grid .live-risk-value b { font-size: 13px; }
.live-six-month-grid .live-risk-value.stress b { color: var(--muted); }
.reference-risk-panel { margin-top: 14px; overflow: hidden; }
.reference-risk-table { min-width: 720px; }
.reference-risk-table th, .reference-risk-table td { padding: 10px 12px; white-space: nowrap; }
.reference-risk-table .risk-context { color: var(--text); font-weight: 600; }
.reference-risk-table .risk-now { color: var(--text); font-weight: 600; }
.risk-progress-cell { min-width: 190px; }
.risk-progress { position: relative; height: 7px; border-radius: 999px; background: #191d24; overflow: hidden; }
.risk-progress-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--green); }
.risk-progress-fill.hold { background: var(--gold); }
.risk-progress-fill.cut { background: var(--orange); }
.risk-progress-fill.exit { background: var(--red); }
.risk-progress-fill.collecting { background: var(--muted); }
.risk-progress-tick { position: absolute; top: 0; bottom: 0; z-index: 1; width: 2px; transform: translateX(-1px); }
.risk-progress-tick.hold { background: var(--gold); }
.risk-progress-tick.cut { background: var(--orange); }
.risk-progress-label { display: block; margin-top: 4px; color: var(--faint); font-size: 9px; }
.reference-risk-table .risk-hold { color: var(--gold); }
.reference-risk-table .risk-cut { color: var(--orange); }
.reference-risk-table .risk-exit { color: var(--red); }
.risk-info { position: relative; display: inline-grid !important; place-content: center; flex: 0 0 auto; width: 13px; height: 13px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--muted) !important; font-size: 8px !important; font-style: italic; font-weight: 500; letter-spacing: 0 !important; line-height: 1; cursor: help; text-align: center; text-transform: none !important; white-space: normal !important; overflow: visible !important; }
.risk-info-tip { position: absolute; top: calc(100% + 7px); left: 50%; z-index: 20; width: 240px; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: #1b1e24; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); color: var(--text) !important; font: 9px/1.5 var(--mono) !important; font-style: normal; letter-spacing: 0 !important; opacity: 0; pointer-events: none; text-align: left; text-transform: none !important; transform: translateX(-50%); transition: opacity .1s; white-space: normal !important; }
.risk-info.align-right .risk-info-tip { right: 0; left: auto; transform: none; }
.risk-info:hover .risk-info-tip, .risk-info:focus .risk-info-tip { opacity: 1; }
.live-six-month .risk-info-tip { top: auto; bottom: calc(100% + 7px); }
.risk-method { overflow: hidden; }
.risk-method summary { padding: 11px 14px; color: var(--muted); font-size: 9px; cursor: pointer; }
.risk-method p { margin: 0; padding: 0 14px 13px; color: var(--faint); font-size: 9px; }
.live-risk-missing { flex: 1; display: grid; place-content: center; gap: 4px; margin: 0; min-height: 120px; padding: 28px 16px; color: var(--faint); font-size: 11px; text-align: center; }
.live-risk-missing::before { content: "Awaiting evidence"; color: var(--muted); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }

/* Underwater (drawdown vs limits) panel on each live manager card */
.live-head-controls { display: flex; align-items: center; gap: 14px; }
.live-underwater { padding: 12px 14px 14px; border-bottom: 1px solid var(--line); }
.live-underwater-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.live-underwater-title p { margin: 0 0 3px; color: var(--faint); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.live-underwater-title b { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.live-card-name { padding: 0; border: 0; background: none; color: var(--text); font: 500 15px/1.2 var(--mono); text-align: left; cursor: pointer; }
.live-card-name:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.live-uw-subhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.live-uw-subhead + .live-uw-subhead { margin-top: 18px; }
.live-uw-subhead p { display: flex; align-items: center; gap: 5px; margin: 0 0 2px; color: var(--faint); font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }
.live-uw-value { display: block; color: var(--text); font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.live-uw-daysmeta { text-align: right; }
.live-uw-daysmeta b { display: block; color: var(--text); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.live-uw-daysmeta span { display: block; margin-top: 2px; color: var(--faint); font-size: 9px; font-variant-numeric: tabular-nums; }
.live-uw-equitychart { position: relative; height: 132px; margin-top: 6px; }
.live-uw-equity { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; margin-bottom: 11px; padding-bottom: 11px; border-bottom: 1px dashed var(--line); }
.live-uw-equity-label { display: flex; flex-direction: column; gap: 2px; }
.live-uw-equity-label span { color: var(--faint); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.live-uw-equity-label b { color: var(--text); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.uw-spark { width: 100%; height: 40px; display: block; overflow: visible; }
.live-uw-chart { position: relative; height: 186px; margin-top: 6px; }
.uw-svg { width: 100%; height: 100%; display: block; }
.live-uw-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 11px; }
.uw-legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.uw-swatch { flex: 0 0 auto; width: 15px; height: 3px; border-radius: 2px; }
.uw-swatch.historical { background: var(--history); }
.uw-swatch.live { background: var(--green); }
.uw-swatch.live.hold { background: var(--gold); }
.uw-swatch.live.cut { background: var(--orange); }
.uw-swatch.live.exit { background: var(--red); }
.uw-swatch.live.collecting { background: var(--muted); }
.uw-swatch.line-hold, .uw-swatch.line-cut, .uw-swatch.line-exit { height: 0; border-radius: 0; border-top: 2px dashed; }
.uw-swatch.line-hold { border-color: var(--gold); }
.uw-swatch.line-cut { border-color: var(--orange); }
.uw-swatch.line-exit { border-color: var(--red); }
.live-uw-limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; padding-top: 13px; border-top: 1px solid var(--line); }
.live-uw-limits .live-risk-value > b { font-size: 16px; }
.live-uw-limits .live-risk-value > small { white-space: normal; line-height: 1.35; }
.live-uw-pending { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 11px 0 0; color: var(--faint); font-size: 9px; line-height: 1.5; }
.live-uw-caption { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.uw-caption-stat { display: flex; flex-direction: column; gap: 3px; }
.uw-caption-stat small { color: var(--faint); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.uw-caption-stat b { color: var(--text); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.uw-caption-stat.hold b { color: var(--gold); }
.uw-caption-stat.cut b { color: var(--orange); }
.uw-caption-stat.exit b { color: var(--red); }
.uw-caption-stat.green b { color: var(--green); }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; }
.panel-head { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.performance-panel > .panel-head { min-height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, auto); }
.panel-head.compact { min-height: 48px; }
.panel-head > span { color: var(--faint); font-size: 9px; }
.control-cluster { min-width: 300px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.seg { display: flex; }
.seg button { padding: 7px 11px; margin-left: -1px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.seg button:first-child { border-radius: 5px 0 0 5px; } .seg button:last-child { border-radius: 0 5px 5px 0; }
.seg button:hover:not(:disabled) { color: var(--text); background: var(--panel-2); }
.seg button.active { z-index: 1; color: var(--green); border-color: var(--green); background: var(--green-soft); }
#curve-controls button[data-mode="backtest"].active { color: var(--history); border-color: var(--history); background: rgba(201, 205, 211, .08); }
#curve-controls button[data-mode="api"].active { color: var(--api); border-color: var(--api); background: var(--api-soft); }
#curve-controls button[data-mode="live"].active { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.seg button:disabled { opacity: .3; cursor: default; }
.seg.small button { padding: 7px 9px; min-width: 30px; text-align: center; }
.chart-toolbar { min-height: 86px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 7px 16px; border-bottom: 1px solid var(--line); background: rgba(9, 10, 12, .22); }
.chart-filters { min-height: 70px; display: flex; align-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.period-seg button { min-width: 42px; }
.period-label { color: var(--faint); font-size: 9px; white-space: nowrap; }
.chart-legend { display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 9px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend-swatch { width: 18px; height: 2px; border-radius: 2px; }
.chart-actions { min-width: 235px; display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap; }
.download-btn { padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font: 9px var(--mono); white-space: nowrap; }
.download-btn:hover:not(:disabled) { color: var(--text); border-color: var(--api); background: var(--api-soft); }
.download-btn:disabled { opacity: .35; cursor: default; }

/* compact stat strip inside panel head */
.head-stats { width: 100%; display: grid; grid-template-columns: repeat(6, minmax(88px, 1fr)); gap: 10px; }
.hs { min-width: 0; }
.hs span { display: block; color: var(--faint); font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.hs b { display: block; margin-top: 1px; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* chart (fills its box; viewBox set to pixels in JS) */
.chart-wrap { position: relative; height: 220px; overflow: hidden; padding: 4px 8px 0; }
.chart-wrap.tall { height: 220px; }
#performance-chart, #exec-chart, #underwater-chart, #rolling-sharpe-chart,
#live-new-combined-chart, #live-new-test-chart,
#mn-chart, #mn-exposure-chart, #mn-underwater-chart, #mn-rolling-chart { width: 100%; height: 100%; display: block; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.zero-line { stroke: #59616e; stroke-width: 1.5; }
.zero-label { fill: var(--text); font-weight: 600; }
.vertical-grid { stroke: #20242b; }
.axis-label { fill: var(--faint); font: 10px var(--mono); }
.curve { fill: none; vector-effect: non-scaling-stroke; }
.curve-area { stroke: none; pointer-events: none; }
.curve-dot { stroke: var(--panel); stroke-width: 2; vector-effect: non-scaling-stroke; }
.gap-line { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.live-boundary { stroke: var(--green); stroke-width: 1; stroke-dasharray: 4 5; opacity: .55; }
.boundary-label { fill: var(--green); font: 9px var(--mono); }
.event-line { stroke: var(--gold); stroke-width: 1; stroke-dasharray: 3 5; opacity: .72; vector-effect: non-scaling-stroke; }
.event-label { fill: var(--gold); font: 8px var(--mono); }
.hover-line { stroke: #59616e; stroke-width: 1; stroke-dasharray: 4 4; }
.hover-dot { stroke: var(--text); stroke-width: 1; }
.average-line { stroke: #aeb4bf; stroke-width: 1.2; stroke-dasharray: 5 5; opacity: .85; vector-effect: non-scaling-stroke; }
.average-label { fill: #c8cdd5; font: 9px var(--mono); }
.threshold-line { stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .8; vector-effect: non-scaling-stroke; }
.threshold-line.hold { stroke: var(--gold); }
.threshold-line.cut { stroke: var(--orange); }
.threshold-line.exit { stroke: var(--red); }
.threshold-line.avg { stroke: #aeb4bf; }
.threshold-line.model { stroke: var(--gold); }
.threshold-label { font: 8px var(--mono); letter-spacing: .02em; }
.threshold-label.avg { fill: #c8cdd5; font-size: 9px; }
.threshold-label.model { fill: var(--gold); font-size: 9px; }
.threshold-label.hold { fill: var(--gold); }
.threshold-label.cut { fill: var(--orange); }
.threshold-label.exit { fill: var(--red); }
.chart-tooltip { position: absolute; z-index: 5; min-width: 150px; padding: 9px 11px; pointer-events: none; border: 1px solid var(--line-2); border-radius: 4px; background: rgba(23, 26, 32, .98); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); font-size: 10px; }
.chart-tooltip time, .chart-tooltip span, .chart-tooltip b { display: block; }
.chart-tooltip time { color: var(--faint); margin-bottom: 5px; }
.chart-tooltip span { color: var(--muted); }
.chart-tooltip b { margin-top: 3px; font-size: 13px; font-weight: 500; }
.chart-tooltip em { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--faint); font-style: normal; }
.chart-tooltip em i { color: var(--text); font-style: normal; text-align: right; }
.chart-empty { position: absolute; inset: 0; display: grid; place-content: center; color: var(--faint); font-size: 11px; }
.chart-empty[hidden] { display: none; }
.chart-note { margin: 0; padding: 8px 16px 11px; color: var(--faint); font-size: 9px; border-bottom: 1px solid var(--line); }
.timeline-controls { min-height: 48px; display: grid; grid-template-columns: 112px minmax(160px, 1fr) 112px; align-items: center; gap: 12px; padding: 8px 16px 6px; border-top: 1px solid rgba(38, 42, 50, .55); }
.timeline-controls time { color: var(--muted); font-size: 9px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline-controls time:last-child { text-align: right; }
.timeline-range { --range-start: 0%; --range-end: 100%; position: relative; height: 28px; }
.timeline-range::before, .timeline-range::after { content: ""; position: absolute; top: 13px; height: 2px; border-radius: 2px; pointer-events: none; }
.timeline-range::before { left: 0; right: 0; background: var(--line-2); }
.timeline-range::after { left: var(--range-start); right: calc(100% - var(--range-end)); background: var(--api); }
.timeline-range input { position: absolute; inset: 0; width: 100%; height: 28px; margin: 0; background: transparent; appearance: none; pointer-events: none; }
.timeline-range input::-webkit-slider-runnable-track { height: 2px; background: transparent; }
.timeline-range input::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -6px; border: 2px solid var(--panel); border-radius: 50%; background: var(--api); box-shadow: 0 0 0 1px var(--api); appearance: none; pointer-events: auto; cursor: ew-resize; }
.timeline-range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--api); }

.diagnostic-charts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.diagnostic-panel { min-width: 0; }
.diagnostic-panel + .diagnostic-panel { border-left: 1px solid var(--line); }
.diagnostic-head { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 14px 3px; }
.diagnostic-head p { margin: 0 0 1px; color: var(--faint); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.diagnostic-head h3 { font-size: 11px; }
.diagnostic-head > span { color: var(--faint); font-size: 8px; text-align: right; white-space: nowrap; }
.chart-wrap.diagnostic { height: 154px; padding-top: 0; }

.performance-stats { display: grid; grid-template-columns: repeat(5, 1fr); }
.performance-stats article { min-width: 0; padding: 10px 16px 9px; border-right: 1px solid var(--line); }
.performance-stats article:nth-child(5n) { border-right: 0; }
.performance-stats article:nth-child(-n+5) { border-bottom: 1px solid var(--line); }
.performance-stats span { display: block; color: var(--faint); font-size: 8px; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.performance-stats strong { display: block; margin-top: 3px; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* compact uncertainty readout for API/live evidence */
.confidence-panel { border-color: rgba(85, 167, 255, .28); }
.confidence-panel .panel-head { background: linear-gradient(90deg, rgba(85, 167, 255, .09), transparent 58%); }
.confidence-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.confidence-metric { min-width: 0; padding: 12px 14px 11px; border-right: 1px solid var(--line); }
.confidence-metric:last-child { border-right: 0; }
.confidence-metric span { display: block; overflow: hidden; color: var(--faint); font-size: 8px; letter-spacing: .07em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.confidence-metric b { display: block; margin-top: 4px; color: var(--text); font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.confidence-metric small { display: block; margin-top: 2px; overflow: hidden; color: var(--faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.confidence-reading, .confidence-caveat { margin: 0; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 9px; line-height: 1.55; }
.confidence-reading { color: var(--muted); }
.confidence-caveat { color: var(--faint); background: rgba(199, 169, 90, .035); }

/* monthly calendar */
.monthly-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.monthly-table th { position: static; padding: 9px 8px; color: var(--faint); background: transparent; border-bottom: 1px solid var(--line); text-align: right; font-weight: 400; text-transform: uppercase; letter-spacing: .05em; }
.monthly-table th:first-child { text-align: left; }
.monthly-table td { padding: 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; text-align: right; color: var(--faint); }
.monthly-table td.strong { color: var(--text); }
.monthly-table td.strong:first-child { text-align: left; }
.monthly-table td.num.strong { text-align: right; }
.monthly-table td.month.up { color: var(--green); } .monthly-table td.month.down { color: var(--red); }

/* allocator */
.verif-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.verif-grid .vm { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.verif-grid .vm:nth-child(3n) { border-right: 0; }
.verif-grid .vm:nth-last-child(-n+3) { border-bottom: 0; }
.vm span { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.vm b { display: block; margin-top: 5px; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.info { display: inline-grid; place-content: center; width: 13px; height: 13px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--faint); font-size: 8px; font-style: italic; cursor: help; text-transform: none; }
.verif-note { margin: 0; padding: 12px 16px; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line); }
.api-evidence { border-color: rgba(85, 167, 255, .35); }
.api-evidence .panel-head { background: linear-gradient(90deg, var(--api-soft), transparent 55%); }
.api-status { color: var(--api) !important; }
.api-positions { max-height: 300px; border-top: 1px solid var(--line); }
.rung-badge { padding: 4px 9px; border-radius: 4px; font-size: 10px; color: var(--muted); background: var(--panel-2); }
.rung-badge.good { color: var(--green); background: var(--green-soft); }
.rung-badge.warn { color: var(--gold); background: var(--gold-soft); }
.rung-badge.bad { color: var(--red); background: var(--red-soft); }
.decision-rows { padding: 6px 0; }
.drow { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: 0; }
.drow span { color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.drow b { font-weight: 500; font-size: 11px; text-align: right; }

.exec-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 24px; padding: 12px 16px; margin-bottom: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.exec-positions { min-height: 0; }
.exec-positions .table-scroll { max-height: 300px; }
.exec-fills { min-height: 360px; }
.activity-note { margin: 0; padding: 9px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9px; line-height: 1.5; }
.raw-activity { overflow: hidden; }
.raw-activity summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; color: var(--muted); font-size: 10px; cursor: pointer; list-style-position: inside; }
.raw-activity summary span:last-child { color: var(--faint); font-size: 9px; }
.raw-activity[open] summary { border-bottom: 1px solid var(--line); }

/* Sharpe tab */
.sharpe-page-head { align-items: center; padding-bottom: 16px; }
.sharpe-manager-picker { display: flex; align-items: center; gap: 9px; color: var(--faint); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.sharpe-manager-picker select { min-width: 280px; height: 32px; padding: 0 32px 0 10px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--panel); color: var(--text); font: 11px var(--mono); }
.sharpe-source-panel { overflow: hidden; margin-bottom: 12px; }
.sharpe-source-panel .panel-head { margin-bottom: 0; }
.sharpe-source-meta { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--faint); font-size: 9px; }
.sharpe-reference-chart { height: 300px; }
.sharpe-estimate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.sharpe-estimate-card { min-height: 146px; padding: 16px; }
.sharpe-estimate-card.shrunk { border-color: rgba(85, 167, 255, .42); background: linear-gradient(145deg, rgba(85, 167, 255, .13), var(--panel) 72%); }
.sharpe-estimate-card.operating { border-color: rgba(53, 200, 138, .36); background: linear-gradient(145deg, rgba(53, 200, 138, .11), var(--panel) 72%); }
.sharpe-estimate-card > span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.sharpe-estimate-card > b { display: block; margin-top: 22px; font-size: 34px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.04em; }
.sharpe-estimate-card > small { display: block; margin-top: 14px; color: var(--faint); font-size: 9px; line-height: 1.4; }
.sharpe-info { position: relative; display: inline-grid; place-content: center; width: 14px; height: 14px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--faint); font-size: 8px; font-style: italic; cursor: help; letter-spacing: 0; text-transform: none; }
.sharpe-info > span { position: absolute; top: calc(100% + 7px); left: 50%; z-index: 20; width: 250px; padding: 10px 11px; border: 1px solid var(--line-2); background: #0e1115; box-shadow: 0 12px 30px rgba(0,0,0,.35); color: var(--text); font-size: 9px; font-style: normal; font-weight: 400; letter-spacing: 0; line-height: 1.55; opacity: 0; pointer-events: none; text-align: left; text-transform: none; transform: translateX(-50%) translateY(-2px); transition: opacity .12s, transform .12s; }
.sharpe-info.align-right > span { right: -8px; left: auto; transform: translateY(-2px); }
.sharpe-info:hover > span, .sharpe-info:focus > span { opacity: 1; transform: translateX(-50%) translateY(0); }
.sharpe-info.align-right:hover > span, .sharpe-info.align-right:focus > span { transform: translateY(0); }
.sharpe-info:focus-visible { outline: 2px solid var(--api); outline-offset: 2px; }
.sharpe-detail-grid { display: grid; grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr); gap: 12px; margin-bottom: 12px; }
.sharpe-probability-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sharpe-probability-grid > div { padding: 18px 14px; border-right: 1px solid var(--line); }
.sharpe-probability-grid > div:last-child { border-right: 0; }
.sharpe-probability-grid span, .sharpe-probability-grid b { display: block; }
.sharpe-probability-grid span { color: var(--faint); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.sharpe-probability-grid b { margin-top: 8px; font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sharpe-range { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 2px 0; }
.sharpe-range span { color: var(--faint); font-size: 9px; text-transform: uppercase; }
.sharpe-range b { font-size: 14px; font-weight: 500; }
.sharpe-formula-panel { padding-bottom: 14px; }
.sharpe-equations { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.sharpe-equations > div { min-width: 0; padding: 11px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sharpe-equations > div:nth-child(2n) { border-right: 0; }
.sharpe-equations > div:nth-last-child(-n+2) { border-bottom: 0; }
.sharpe-equations span { display: block; margin-bottom: 5px; color: var(--faint); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.sharpe-equations code { display: block; overflow-x: auto; color: var(--text); font: 10px/1.45 var(--mono); white-space: nowrap; }
.sharpe-equations .substitution { background: rgba(85, 167, 255, .06); }
.sharpe-equations .substitution code + code { margin-top: 4px; }
.sharpe-variables { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 12px 0 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sharpe-variables div { min-width: 0; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sharpe-variables dt, .sharpe-variables dd { margin: 0; }
.sharpe-variables dt { color: var(--api); font-size: 9px; }
.sharpe-variables dd { margin-top: 3px; color: var(--faint); font-size: 8px; line-height: 1.4; }
.sharpe-comparison-panel { overflow: hidden; }
.sharpe-comparison-table { min-width: 1160px; }
.sharpe-comparison-table tbody tr { cursor: pointer; }
.sharpe-comparison-table tbody tr.selected td { background: var(--green-soft); color: var(--text); }
.sharpe-manager-cell { color: var(--text); font-weight: 500; }

/* Experimental live equity and Prosperitee views */
.risk-page-head { align-items: center; padding-bottom: 16px; }
.page-asof { color: var(--faint); font-size: 9px; }
.live-stamp { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-variant-numeric: tabular-nums; }
.live-stamp::before { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); content: ""; }
.live-stamp.stale::before { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.page-refresh-block { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.page-refresh-note { color: var(--faint); font-size: 8px; }
.page-refresh-note.stale { color: var(--red); }
.prosperitee-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.risk-summary-card { min-width: 0; min-height: 124px; padding: 15px; }
.risk-summary-card.accent { border-color: rgba(85, 167, 255, .38); background: linear-gradient(145deg, rgba(85, 167, 255, .1), var(--panel) 76%); }
.risk-summary-card > span { display: flex; align-items: center; gap: 5px; min-height: 22px; color: var(--muted); font-size: 8px; letter-spacing: .07em; line-height: 1.35; text-transform: uppercase; }
.risk-summary-card > b { display: block; overflow: hidden; margin-top: 15px; font-size: clamp(20px, 2vw, 29px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.risk-summary-card > small { display: block; overflow: hidden; margin-top: 10px; color: var(--faint); font-size: 8px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.risk-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.risk-chart-panel { overflow: hidden; }
.risk-chart-panel .panel-head > span { color: var(--faint); font-size: 9px; }
.risk-chart-wrap { height: 200px; padding-top: 0; }
.exposure-chart-wrap { height: 160px; }
.risk-chart-legend { display: flex; align-items: center; gap: 16px; min-height: 34px; padding: 7px 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--faint); font-size: 8px; }
.risk-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.risk-chart-legend i { width: 17px; height: 2px; background: var(--api); }
.risk-chart-legend i.net, .risk-chart-legend i.live { background: var(--green); }
.risk-chart-legend i.reference { background: var(--history); }
.risk-data-note { margin: 0; padding: 9px 15px; border-top: 1px solid var(--line); color: var(--faint); font-size: 8px; line-height: 1.5; }
.live-equity-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.live-equity-summary article { min-width: 0; padding: 8px 10px; border-right: 1px solid var(--line); }
.live-equity-summary article:last-child { border-right: 0; }
.live-equity-summary span, .live-equity-summary b { display: block; }
.live-equity-summary span { color: var(--faint); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.live-equity-summary b { margin-top: 3px; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.live-equity-summary small { display: block; margin-top: 2px; color: var(--faint); font-size: 9px; }
.live-equity-panel { overflow: hidden; }
.live-equity-panel { margin-bottom: 12px; }
.live-equity-chart-wrap { height: 220px; }
.live-new-manager-panel { overflow: hidden; }
.live-new-manager-table { min-width: 720px; }
.live-new-manager-table td:first-child { color: var(--text); font-weight: 500; }
.funded-accounts-panel .table-scroll { max-height: none; }
.prosperitee-primary-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(340px, .78fr); gap: 12px; margin-bottom: 12px; align-items: stretch; }
.prosperitee-curve-panel { overflow: hidden; margin: 0; }
.prosperitee-chart-wrap { height: 410px; }
.prosperitee-curve-controls { display: flex; align-items: center; gap: 10px; }
.prosperitee-timeline { min-height: 43px; display: grid; grid-template-columns: 104px minmax(160px, 1fr) 104px; align-items: center; gap: 10px; padding: 6px 14px; border-top: 1px solid var(--line); }
.prosperitee-timeline time { color: var(--muted); font-size: 8px; white-space: nowrap; }
.prosperitee-timeline time:last-child { text-align: right; }
.prosperitee-period-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.prosperitee-period-stats > div { min-width: 0; padding: 10px 12px; border-right: 1px solid var(--line); }
.prosperitee-period-stats > div:last-child { border-right: 0; }
.prosperitee-period-stats span, .prosperitee-period-stats b { display: block; }
.prosperitee-period-stats span { color: var(--faint); font-size: 7px; letter-spacing: .05em; text-transform: uppercase; }
.prosperitee-period-stats b { margin-top: 4px; color: var(--text); font-size: 13px; font-weight: 500; }
.prosperitee-confidence-panel { overflow: hidden; }
.prosperitee-confidence-panel .panel-head > span { color: var(--faint); font-size: 8px; }
.confidence-estimates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.confidence-estimates > div { min-width: 0; padding: 15px; border-right: 1px solid var(--line); }
.confidence-estimates > div:last-child { border-right: 0; }
.confidence-estimates .accent { background: var(--api-soft); }
.confidence-estimates span, .confidence-estimates b, .confidence-estimates small { display: block; }
.confidence-estimates span { color: var(--faint); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.confidence-estimates b { margin-top: 7px; font-size: 28px; font-weight: 500; }
.confidence-estimates small { overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.confidence-model-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.confidence-model-grid > div { min-width: 0; padding: 11px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.confidence-model-grid > div:nth-child(2n) { border-right: 0; }
.confidence-model-grid span, .confidence-model-grid b, .confidence-model-grid small { display: block; }
.confidence-model-grid span { color: var(--faint); font-size: 7px; letter-spacing: .05em; text-transform: uppercase; }
.confidence-model-grid b { margin-top: 4px; font-size: 15px; font-weight: 500; }
.confidence-model-grid small { margin-top: 2px; color: var(--faint); font-size: 7px; }
.confidence-probabilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.confidence-probabilities > div { padding: 11px 10px; border-right: 1px solid var(--line); text-align: center; }
.confidence-probabilities > div:last-child { border-right: 0; }
.confidence-probabilities span, .confidence-probabilities b { display: block; }
.confidence-probabilities span { color: var(--faint); font-size: 7px; }
.confidence-probabilities b { margin-top: 4px; font-size: 16px; font-weight: 500; }
.confidence-range { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.confidence-range span { color: var(--faint); font-size: 8px; text-transform: uppercase; }
.confidence-range b { font-size: 14px; font-weight: 500; }
.confidence-method summary { padding: 11px 14px; color: var(--muted); cursor: pointer; font-size: 9px; }
.confidence-method[open] summary { border-bottom: 1px solid var(--line); }
.confidence-method p, .confidence-method code { display: block; margin: 0; padding: 9px 14px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.confidence-method code { color: var(--api); background: rgba(85, 167, 255, .05); font-family: var(--mono); }
.shrinkage-explainer { overflow: hidden; margin-bottom: 12px; }
.shrinkage-plain-formula { padding: 15px 16px; border-top: 1px solid var(--line); }
.shrinkage-plain-formula > span { display: block; color: var(--faint); font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.shrinkage-plain-formula > b { display: block; margin-top: 7px; font-size: 12px; font-weight: 500; line-height: 1.55; }
.shrinkage-plain-formula > code { display: block; margin-top: 12px; padding: 10px 11px; background: var(--api-soft); color: var(--api); font: 11px/1.45 var(--mono); }
.shrinkage-plain-formula > p { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.prosperitee-probability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.prosperitee-probability-grid > div { padding: 13px 16px; border-right: 1px solid var(--line); }
.prosperitee-probability-grid > div:last-child { border-right: 0; }
.prosperitee-probability-grid span, .prosperitee-probability-grid b { display: block; }
.prosperitee-probability-grid span { color: var(--faint); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.prosperitee-probability-grid b { margin-top: 5px; font-size: 18px; font-weight: 500; }
.prosperitee-detail-grid { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr); gap: 12px; margin-bottom: 12px; }
.prosperitee-risk-panel, .prosperitee-assets-panel, .prosperitee-fills-panel { overflow: hidden; }
.prosperitee-risk-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.prosperitee-risk-list > div { min-width: 0; padding: 14px 15px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.prosperitee-risk-list > div:nth-child(2n) { border-right: 0; }
.prosperitee-risk-list dt, .prosperitee-risk-list dd { margin: 0; }
.prosperitee-risk-list dt { color: var(--faint); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.prosperitee-risk-list dd { margin-top: 6px; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.prosperitee-assets-panel .table-scroll { max-height: 260px; }
.prosperitee-fills-panel .table-scroll { max-height: 430px; }
.prosperitee-fill-table { min-width: 830px; }
.prosperitee-exposure-panel { margin-bottom: 12px; }
.prosperitee-exposure-panel .panel-head > div > span { display: block; margin-top: 4px; color: var(--faint); font-size: 8px; }
.detail-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 12px; align-items: stretch; }
.table-panel { min-height: 300px; display: flex; flex-direction: column; }
.table-scroll { overflow: auto; flex: 1 1 auto; min-height: 0; max-height: 540px; }
.table-scroll.tall { max-height: 540px; }
#monthly-wrap { flex: none; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { position: sticky; top: 0; z-index: 1; padding: 8px 12px; background: var(--panel); color: var(--faint); border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
td { padding: 8px 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num, td.num { text-align: right; }
tbody tr:hover td { color: var(--text); background: var(--panel-2); }
.empty-cell { height: 120px; text-align: center !important; color: var(--faint); display: block; padding: 40px 0; }

@media (max-width: 1120px) {
  .live-manager-list { grid-template-columns: 1fr; }
  .prosperitee-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prosperitee-primary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .shell { padding: 0 0 40px; }
  .topbar { padding: 0 12px; }
  .shell > section { padding: 12px 12px 0; }
  .system small { display: none; }
  h1 { font-size: 22px; }
  .overview-head { align-items: center; }
  .evidence-page-head { align-items: flex-start; flex-direction: column; }
  .evidence-key { grid-template-columns: 1fr; }
  .evidence-key > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-key > div:last-child { border-bottom: 0; }
  .live-overview-head { align-items: flex-start; flex-direction: column; }
  .live-model-basis { text-align: left; }
  .live-policy-strip { grid-template-columns: repeat(2, 1fr); }
  .live-policy-strip > div { align-items: flex-start; flex-direction: column; gap: 1px; padding: 9px 10px; }
  .live-policy-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .live-policy-strip > div:nth-child(2) { border-right: 0; }
  .correlation-head { align-items: flex-start; }
  .correlation-filters { align-items: flex-start; flex-direction: column; gap: 8px; }
  .matrix-filter-group.hidden-managers { padding: 8px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .performance-stats { grid-template-columns: repeat(2, 1fr); }
  .performance-stats article { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .performance-stats article:nth-child(2n) { border-right: 0 !important; }
  .confidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .confidence-metric { border-bottom: 1px solid var(--line); }
  .confidence-metric:nth-child(2n) { border-right: 0; }
  .confidence-metric:nth-last-child(-n+2) { border-bottom: 0; }
  .verif-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .exec-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { align-items: stretch; }
  .manager-picker { min-width: 0; flex: 1; }
  .manager-picker select { width: 100%; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .performance-panel > .panel-head { grid-template-columns: 1fr; min-height: 120px; }
  .head-stats { grid-template-columns: repeat(3, 1fr); }
  .control-cluster { min-width: 0; justify-content: flex-start; }
  .chart-toolbar { grid-template-columns: 1fr; min-height: 142px; }
  .chart-filters { min-height: 70px; }
  .chart-legend { justify-content: flex-start; }
  .chart-actions { justify-content: flex-start; }
  .timeline-controls { grid-template-columns: 1fr 1fr; }
  .timeline-range { grid-column: 1 / -1; grid-row: 1; }
  .prosperitee-timeline { grid-template-columns: 1fr 1fr; }
  .prosperitee-timeline .timeline-range { grid-column: 1 / -1; grid-row: 1; }
  .prosperitee-period-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prosperitee-period-stats > div { border-bottom: 1px solid var(--line); }
  .diagnostic-charts { grid-template-columns: 1fr; }
  .diagnostic-panel + .diagnostic-panel { border-left: 0; border-top: 1px solid var(--line); }
  .sharpe-page-head { align-items: stretch; flex-direction: column; }
  .sharpe-manager-picker { align-items: stretch; flex-direction: column; }
  .sharpe-manager-picker select { width: 100%; min-width: 0; }
  .sharpe-estimate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sharpe-detail-grid { grid-template-columns: 1fr; }
  .risk-page-head { align-items: flex-start; }
  .risk-chart-grid, .prosperitee-detail-grid { grid-template-columns: 1fr; }
  .live-equity-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-equity-summary article:nth-child(2) { border-right: 0; }
  .live-equity-summary article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .prosperitee-curve-controls { align-items: stretch; flex-direction: column; width: 100%; }
  .prosperitee-curve-controls .seg { width: 100%; }
  .prosperitee-curve-controls .seg button { flex: 1; }
  .prosperitee-probability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prosperitee-probability-grid > div:nth-child(2) { border-right: 0; }
  .prosperitee-probability-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .live-manager-card-head { align-items: flex-start; }
  .live-card-actions { align-items: flex-end; flex-direction: column; gap: 5px; }
  .live-compare { grid-template-columns: 1fr; }
  .live-compare-block + .live-compare-block { border-top: 1px solid var(--line); border-left: 0; }
  .live-current-limits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .live-path-grid { grid-template-columns: 1fr; gap: 9px; }
  .live-policy-strip b { font-size: 9px; }
  .sharpe-estimate-grid { grid-template-columns: 1fr; }
  .sharpe-probability-grid { grid-template-columns: 1fr; }
  .sharpe-probability-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .sharpe-probability-grid > div:last-child { border-bottom: 0; }
  .sharpe-equations { grid-template-columns: 1fr; }
  .sharpe-equations > div, .sharpe-equations > div:nth-child(2n), .sharpe-equations > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .sharpe-equations > div:last-child { border-bottom: 0; }
  .sharpe-variables { grid-template-columns: 1fr 1fr; }
  .prosperitee-summary-grid { grid-template-columns: 1fr; }
  .risk-summary-card { min-height: 112px; }
  .live-equity-summary { grid-template-columns: 1fr; }
  .live-equity-summary article, .live-equity-summary article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .live-equity-summary article:last-child { border-bottom: 0; }
  .table-pager { align-items: flex-start; flex-direction: column; }
}

/* ---------- new-page shared bits ---------- */
.eyebrow { margin: 0 0 3px; color: var(--faint); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--faint) !important; }
.warn { color: var(--gold) !important; }

/* Evidence tier chips */
.evidence-tier { display: inline-block; padding: 4px 9px; border-radius: 4px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.evidence-tier.tier-strong { color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(53, 200, 138, .25); }
.evidence-tier.tier-api { color: var(--api); background: var(--api-soft); }
.evidence-tier.tier-csvlive { color: var(--gold); background: var(--gold-soft); }
.evidence-tier.tier-csv { color: var(--orange); background: var(--orange-soft); }
.evidence-source { color: var(--faint) !important; }
.reliability-meter { display: block; width: 90px; height: 4px; margin: 7px 0 0; border-radius: 999px; background: #191d24; overflow: hidden; }
.reliability-meter i { display: block; height: 100%; border-radius: 999px; background: var(--api); }
.evidence-adjusted b { color: var(--api); }
.evidence-curve-cell .evidence-curve { width: 100%; height: 40px; }

/* Explainer panels */
.explain-panel { margin-top: 14px; }
.explain-panel summary { padding: 12px 14px; color: var(--muted); cursor: pointer; font-size: 11px; }
.explain-panel summary:hover { color: var(--text); }
.explain-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; padding: 4px 14px 16px; }
.explain-body h3 { margin: 0 0 6px; color: var(--text); font-size: 11px; letter-spacing: .04em; }
.explain-body p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.explain-body b { color: var(--text); font-weight: 600; }

/* Live (NEW) summary tiles */
.live-equity-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 14px 0; }
.live-equity-summary article { padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.live-equity-summary article span { display: block; margin-bottom: 5px; color: var(--faint); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.live-equity-summary article b { display: block; font-size: 19px; font-weight: 500; line-height: 1.15; }
.live-equity-summary article small { display: block; margin-top: 4px; color: var(--faint); font-size: 8px; line-height: 1.4; }
.status-text.green { color: var(--green); } .status-text.collecting { color: var(--muted); }
.status-text.hold { color: var(--gold); } .status-text.cut { color: var(--orange); } .status-text.exit { color: var(--red); }

/* Live (NEW) manager cards */
.live-new-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; margin: 14px 0; }
.live-new-card { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 14px; border-radius: 10px; border-left: 3px solid var(--line-2); cursor: pointer; }
.live-new-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.live-new-card.status-green { border-left-color: var(--green); }
.live-new-card.status-collecting { border-left-color: var(--line-2); }
.live-new-card.status-hold { border-left-color: var(--gold); }
.live-new-card.status-cut { border-left-color: var(--orange); }
.live-new-card.status-exit { border-left-color: var(--red); }
.live-new-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.live-new-card-head p { margin: 4px 0 0; color: var(--faint); font-size: 9px; }
.live-new-card .live-card-name { padding: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; font: 500 15px/1.2 var(--mono); text-align: left; }
.live-new-card .live-card-name:hover { color: var(--green); }
.live-new-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.live-new-card-stats span { display: block; margin-bottom: 3px; color: var(--faint); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.live-new-card-stats b { font-size: 13px; font-weight: 500; }
.live-new-gauge { display: flex; flex-direction: column; gap: 6px; }
.live-new-gauge .risk-progress-label { color: var(--faint); font-size: 8px; }
.live-new-card-foot { display: flex; justify-content: flex-end; }
.sync-pill { padding: 3px 8px; border-radius: 4px; font-size: 8px; letter-spacing: .05em; }
.sync-pill.fresh { color: var(--muted); background: #171a20; }
.sync-pill.stale { color: var(--red); background: var(--red-soft); }

/* Manager click-in: live risk section */
.manager-risk-panel { margin-top: 14px; }
.manager-risk-charthead { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 14px 14px 6px; }
.manager-risk-charthead b { color: var(--text); font-size: 11px; font-weight: 600; }
.manager-risk-charthead span { color: var(--faint); font-size: 9px; }
.manager-fills-panel { margin-top: 14px; }

/* ---------- Manager (NEW) template ---------- */
.mn-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 12px 0 2px; }
.mn-picker .matrix-filter.active-chip { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.mn-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 12px; align-items: stretch; }
@media (max-width: 1080px) { .mn-grid { grid-template-columns: 1fr; } }
.mn-grid > .mn-chart-panel { margin: 0; display: flex; flex-direction: column; }
.mn-chart-panel .mn-chart-wrap { flex: 1 1 auto; min-height: 0; }
.mn-diagnostics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 720px) { .mn-diagnostics { grid-template-columns: 1fr; } }
.mn-diagnostics .panel { margin: 0; }
.mn-diagnostic-wrap { height: 190px; }
.mn-record-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 12px; margin-top: 12px; align-items: start; }
.mn-record-grid.solo { grid-template-columns: 1fr; }
@media (max-width: 1080px) { .mn-record-grid { grid-template-columns: 1fr; } }
.mn-record-grid .panel { margin: 0; }
.mn-exposure-legend { gap: 6px; }
.expo-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 5px; background: transparent; color: var(--faint); cursor: pointer; font: 10px var(--mono); }
.expo-toggle.active { color: var(--text); border-color: var(--line-2); background: var(--panel-2); }
.expo-toggle i { width: 14px; height: 2px; border-radius: 2px; }
.expo-toggle:not(.active) i { opacity: .3; }
.gauge-legend { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: 8.5px; }
.gauge-legend .risk-hold { color: var(--gold); }
.gauge-legend .risk-cut { color: var(--orange); }
.gauge-legend .risk-exit { color: var(--red); }
.mn-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mn-main .panel { margin: 0; }
.mn-chart-wrap { height: 220px; }
.mn-rails-grid { display: flex; flex-direction: column; gap: 8px; padding: 4px 14px 10px; }
.mn-rail { display: grid; grid-template-columns: 64px 58px 1fr; gap: 10px; align-items: baseline; }
.mn-rail span { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.mn-rail b { font-size: 14px; font-weight: 500; }
.mn-rail small { color: var(--faint); font-size: 8px; line-height: 1.4; }
.mn-rail.risk-hold span, .mn-rail.risk-hold b { color: var(--gold); }
.mn-rail.risk-cut span, .mn-rail.risk-cut b { color: var(--orange); }
.mn-rail.risk-exit span, .mn-rail.risk-exit b { color: var(--red); }
.mn-rails-panel .live-new-gauge { padding: 2px 14px 10px; }
.mn-rails-note { margin: 0; padding: 8px 14px 13px; color: var(--faint); font-size: 9px; line-height: 1.6; }
.mn-conf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 14px 10px; }
.mn-conf-grid > div { padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); }
.mn-conf-grid > div.accent { border-color: rgba(85, 167, 255, .35); }
.mn-conf-grid span { display: block; margin-bottom: 4px; color: var(--faint); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.mn-conf-grid b { display: block; font-size: 16px; font-weight: 500; }
.mn-conf-grid > div.accent b { color: var(--api); }
.mn-conf-grid small { display: block; margin-top: 4px; color: var(--faint); font-size: 9.5px; line-height: 1.4; }
.mn-exposure-panel, .mn-trades-panel { margin-top: 12px; }

/* Manager (NEW): exposure + compact trades side by side */
.mn-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 12px; margin-top: 12px; align-items: start; }
@media (max-width: 1080px) { .mn-bottom-grid { grid-template-columns: 1fr; } }
.mn-bottom-grid .panel { margin: 0; }
.mn-exposure-wrap { height: 160px; }
.mn-trades-scroll { max-height: 300px; overflow-y: auto; }
.mn-trades-table { font-size: 10px; }
.mn-trades-table th, .mn-trades-table td { padding: 6px 8px; }


/* Live (NEW): narrower chart with cards beside it */
.live-new-mid-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 12px; align-items: start; margin: 14px 0; }
@media (max-width: 1080px) { .live-new-mid-grid { grid-template-columns: 1fr; } }
.live-new-mid-grid .live-equity-panel { margin: 0; }
.live-new-mid-grid .live-equity-chart-wrap { height: 220px; }
.live-new-cards-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.live-new-cards-col .live-new-cards { display: flex; flex-direction: column; gap: 12px; margin: 0; }

/* Evidence: observed → modeled inline arrow cells */
.evidence-arrow { display: flex; align-items: baseline; gap: 5px; justify-content: flex-end; }
.evidence-arrow .evidence-was { color: var(--faint); font-size: 11px; }
.evidence-arrow .evidence-arrowmark { color: var(--faint); font-size: 11px; }
.evidence-arrow b { font-size: 13px; font-weight: 500; }
.evidence-arrow b.strong-num { font-size: 15px; }
.evidence-static-th { color: var(--faint); }

/* Evidence: observed vs model window labels */
.evidence-windows { display: block; margin-top: 5px; font-size: 8px; line-height: 1.5; }
.evidence-windows small { display: inline; margin-right: 4px; }
.window-warn { color: var(--gold) !important; cursor: help; }

/* BTC benchmark toggle + row */
.bench-toggle { padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font: 11px var(--mono); white-space: nowrap; }
.bench-toggle:hover { color: var(--text); }
.bench-toggle.active { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.benchmark-row { cursor: default; }
.benchmark-row td { border-top: 1px solid var(--line-2); background: #101216; }
.benchmark-row:hover td { background: #101216; }
.benchmark-row .evidence-manager b { color: var(--gold); font-size: 12px; font-weight: 600; }
.benchmark-row .evidence-manager span { display: block; margin-top: 5px; color: var(--faint); font-size: 8px; }

/* Manager curve legend (multi-account managers) */
.mn-legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 14px 6px; color: var(--muted); font-size: 10px; }
.mn-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mn-legend i { width: 14px; height: 2px; border-radius: 2px; }
.panel-empty { margin: 0; padding: 14px; color: var(--faint); font-size: 10px; }
.panel-inactive { opacity: .55; }

/* Right column: fixed split so switching managers never resizes it */
.mn-rails-grid { flex: 0 0 auto; }
.mn-rails-note { margin-top: auto; }
/* disabled controls read as unavailable, not missing */
.seg button:disabled { opacity: .32; cursor: not-allowed; }
/* BTC comparison under each stat tile */
.mn-legend .legend-btc { cursor: pointer; color: var(--gold); }
.mn-legend .legend-btc small { margin-left: 5px; color: var(--faint); }
.mn-legend .legend-btc.off { color: var(--faint); }
.mn-legend .legend-btc.off i { background: var(--faint); opacity: .5; }

/* One-line note so a manager with a history note is the same height as one without */
.mn-chart-panel .chart-note { height: 15px; margin: 0; padding: 0 14px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--faint); font-size: 9px; }

/* One fixed height for the whole top row: the chart absorbs any difference in
   header, legend or note length, so no manager is taller than another. */

/* Manager page: curve left, statistics table right, cards on their own row */
.mn-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr); gap: 12px; align-items: stretch; }
@media (max-width: 1080px) { .mn-grid { grid-template-columns: 1fr; } }
.mn-grid > .panel { margin: 0; height: 430px; display: flex; flex-direction: column; overflow: hidden; }
.mn-chart-panel .mn-chart-wrap { flex: 1 1 auto; min-height: 0; }
.mn-stats-panel .table-scroll { flex: 1; max-height: none; }
.mn-stats-table { width: 100%; }
.mn-stats-table th, .mn-stats-table td { padding: 7px 14px; border-bottom: 1px solid var(--line); }
.mn-stats-head th { color: var(--faint); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }
.mn-stat-label { color: var(--muted); font-size: 10px; }
.mn-stats-table td.num b { font-size: 14px; font-weight: 500; }
.mn-stats-table .btc-col { color: var(--gold); }
.mn-stats-table td.btc-col b { color: var(--gold); font-size: 12px; font-weight: 400; }
.mn-stats-table tr:last-child th, .mn-stats-table tr:last-child td { border-bottom: 0; }

/* rails + confidence share a row and size to their content */
.mn-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; align-items: start; }
@media (max-width: 1080px) { .mn-cards { grid-template-columns: 1fr; } }
.mn-cards .panel { margin: 0; }

/* tooltip lines (one per series) */
.chart-tooltip .tip-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chart-tooltip .tip-dot { display: inline-block; width: 8px; height: 2px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* Details: same reference fields for every manager, bottom of the page */
.mn-details-panel { margin-top: 12px; }
.mn-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 24px; margin: 0; padding: 4px 14px 14px; }
.mn-details > div { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mn-details dt { color: var(--faint); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.mn-details dd { margin: 0; color: var(--text); font-size: 10px; line-height: 1.5; }
/* stats table keeps its columns fixed so toggling BTC never shifts them */
.mn-stats-table { table-layout: fixed; }
.mn-stats-table th:first-child, .mn-stats-table td:first-child { width: 46%; }
.mn-stats-table th:nth-child(2), .mn-stats-table td:nth-child(2) { width: 29%; }
.mn-stats-table th:last-child, .mn-stats-table td:last-child { width: 25%; }

/* Status verdict: one word, colour-coded by how much attention it needs */
.status-chip { display: inline-block; max-width: 100%; box-sizing: border-box; padding: 3px 6px; border-radius: 4px; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }
.evidence-status small { display: block; margin-top: 6px; color: var(--faint); font-size: 9px; }
.status-eligible, .live-pill.status-eligible { color: var(--green); background: var(--green-soft); }
.status-collecting, .live-pill.status-collecting { color: var(--muted); background: var(--panel-2); }
.status-hold, .live-pill.status-hold { color: var(--gold); background: var(--gold-soft); }
.status-cut, .live-pill.status-cut { color: var(--orange); background: var(--orange-soft); }
.status-exit, .live-pill.status-exit { color: var(--red); background: var(--red-soft); }
.status-data, .live-pill.status-data { color: var(--red); background: var(--red-soft); }
.status-unfunded, .live-pill.status-unfunded { color: var(--faint); background: var(--panel-2); }
/* uniform control widths so the strip never resizes between managers */
#mn-curve-controls button { min-width: 92px; }
.mn-rolling-head { display: flex; align-items: center; gap: 10px; }
.mn-rolling-head #mn-rolling-meta { white-space: nowrap; }
#mn-rolling-controls button { min-width: 58px; padding: 4px 8px; font-size: 9.5px; }
#mn-value-controls button { min-width: 34px; }
/* folded detail on the confidence card */
.mn-conf-more { padding: 0 14px 12px; }
.mn-conf-more summary { color: var(--muted); cursor: pointer; font-size: 10px; padding: 4px 0 8px; }
.mn-conf-more summary:hover { color: var(--text); }
.mn-conf-more .mn-conf-grid { padding: 0; }

/* ================= v9 preview · portfolio-analytics layout =================
   Parallel view. Nothing here is shared with the existing manager template,
   so it can be deleted in one block if the layout is rejected. */
#v9-view {
  --v9-sf: #12141a; --v9-sf2: #191c22; --v9-bd: #1e222a;
  --v9-tx: #f8f9fb; --v9-td: #c4c9d1; --v9-tm: #6b7179;
  --v9-tf: #555b64;
  --v9-ac: #c9a84c; --v9-acd: rgba(201, 168, 76, .12);
  --v9-gn: #47d68d; --v9-rd: #f0685c; --v9-r: 6px;
  padding-top: 14px;
}
#v9-view .v9-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--v9-bd); }
#v9-view .v9-head h1 { margin: 0; font-size: 18px; font-weight: 400; letter-spacing: -.01em; }
#v9-view .v9-head .v9-eyebrow { margin: 0 0 4px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--v9-tm); }
#v9-view .v9-head .v9-window { font-size: 10px; color: var(--v9-tm); text-align: right; }

#v9-view .v9-sec { margin-bottom: 18px; }
#v9-view .v9-st { font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--v9-tm); margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
#v9-view .v9-st::after { content: ''; flex: 1; height: 1px; background: var(--v9-bd); }

#v9-view .v9-pb { display: flex; flex-wrap: wrap; margin-bottom: 10px; }
#v9-view .v9-pp { padding: 4px 9px; font: 9.5px var(--mono); letter-spacing: .04em; background: var(--v9-sf); border: 1px solid var(--v9-bd); color: var(--v9-tm); cursor: pointer; margin-right: -1px; margin-bottom: -1px; transition: color .15s, background .15s, border-color .15s; }
#v9-view .v9-pp:first-child { border-radius: var(--v9-r) 0 0 var(--v9-r); }
#v9-view .v9-pp:last-child { border-radius: 0 var(--v9-r) var(--v9-r) 0; }
#v9-view .v9-pp:hover { color: var(--v9-td); background: var(--v9-sf2); position: relative; z-index: 1; }
#v9-view .v9-pp.ac { color: var(--v9-ac); background: var(--v9-acd); border-color: var(--v9-ac); position: relative; z-index: 2; }
#v9-view .v9-pp:disabled { opacity: .3; cursor: not-allowed; }

#v9-view .v9-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
#v9-view .v9-controls .v9-lbl { font-size: 11px; color: var(--v9-tm); letter-spacing: .04em; }
#v9-view .v9-controls .v9-spacer { flex: 1; }

#v9-view .v9-cc { background: var(--v9-sf); border: 1px solid var(--v9-bd); border-radius: var(--v9-r); padding: 16px 18px 12px; }
#v9-view .v9-chart-wrap { position: relative; height: 220px; }
#v9-view .v9-uw-wrap { position: relative; height: 142px; }
#v9-view #v9-chart, #v9-view #v9-underwater, #v9-view #v9-rolling-sharpe, #v9-view #v9-rolling-vol, #v9-view #v9-exposure { width: 100%; height: 100%; display: block; }
#v9-view .v9-legend { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; font-size: 11px; color: var(--v9-td); }
#v9-view .v9-legend button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: inherit; cursor: pointer; padding: 2px 4px; font: inherit; }
#v9-view .v9-legend button.off { opacity: .38; }
#v9-view .v9-legend i { width: 14px; height: 0; border-top: 2px solid currentColor; display: inline-block; }
#v9-view .v9-legend button.net i { border-top-style: dashed; }
#v9-view .v9-legend button.key { color: var(--muted); }

#v9-view .v9-mb { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 1px; background: var(--v9-bd); border: 1px solid var(--v9-bd); border-radius: var(--v9-r); overflow: hidden; }
#v9-view .v9-mb { background: var(--v9-bd); }
#v9-view .v9-mc { background: var(--v9-sf); padding: 9px 6px; text-align: center; }
#v9-view .v9-mc .v9-ml { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--v9-tm); margin-bottom: 3px; }
#v9-view .v9-mc .v9-mv { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }

#v9-view .v9-kg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
#v9-view .v9-kp { background: var(--v9-sf); border: 1px solid var(--v9-bd); border-radius: var(--v9-r); padding: 11px 12px; }
#v9-view .v9-kl { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--v9-tm); margin-bottom: 4px; }
#v9-view .v9-kv { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
#v9-view .v9-ks { font-size: 9px; color: var(--v9-tf); margin-top: 3px; }
#v9-view .v9-kb { font-size: 9px; color: var(--v9-ac); margin-top: 2px; font-variant-numeric: tabular-nums; }
#v9-view .v9-rmeta { font-size: 10px; color: var(--v9-td); font-variant-numeric: tabular-nums; display: flex; gap: 12px; }
#v9-view .v9-meta-btc { color: var(--v9-ac); }
#v9-view .v9-legend button small { color: var(--v9-tm); font-size: 10px; }
/* Marks the one book whose numbers fill the panels below the chart, so a reader
   can tell at a glance which line the figures belong to. */
#v9-view .v9-legend button small.v9-statsdot { color: currentColor; font-size: 8px; margin-left: 2px; }

#v9-view .v9-tw { overflow-x: auto; }
#v9-view .v9-tw table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
#v9-view .v9-tw thead th { text-align: left; padding: 6px 8px; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--v9-tm); border-bottom: 1px solid var(--v9-bd); font-weight: 400; white-space: nowrap; }
#v9-view .v9-tw thead th.num, #v9-view .v9-tw tbody td.num { text-align: right; }
#v9-view .v9-tw tbody td { padding: 3px 7px; border-bottom: 1px solid var(--v9-bd); color: var(--v9-td); font-variant-numeric: tabular-nums; white-space: nowrap; }
#v9-view .v9-tw tbody tr:hover td { background: var(--v9-sf2); color: var(--v9-tx); }
#v9-view .v9-basis-table { background: var(--v9-sf); border: 1px solid var(--v9-bd); border-radius: var(--v9-r); }
#v9-view .v9-basis-table thead tr:first-child th { text-align: center; color: var(--v9-td); }
#v9-view .v9-basis-table thead tr:first-child th:first-child { text-align: left; }
#v9-view .v9-basis-table tbody td:first-child { color: var(--v9-tx); font-weight: 600; }
#v9-view .v9-basis-note { margin: 7px 1px 0; color: var(--v9-tm); font-size: 10px; line-height: 1.45; }

#v9-view .v9-po { color: var(--v9-gn); }
#v9-view .v9-ne { color: var(--v9-rd); }
#v9-view .v9-empty { color: var(--v9-tm); font-size: 12px; padding: 18px 0; }

@media (max-width: 1080px) { #v9-view .v9-kg { grid-template-columns: repeat(2, 1fr); } }

/* smaller, lighter chart type — Jack wanted the curve labels sleeker than the rest of the dashboard */
#v9-view .axis-label { fill: var(--v9-tm); font: 9px var(--mono); letter-spacing: .02em; }
#v9-view .v9-legend { font-size: 10px; }
#v9-view .v9-dd-stats { margin-bottom: 10px; }
#v9-view .v9-dd-stats .v9-kv { font-size: 13.5px; }
#v9-view #v9-dd-table { margin-top: 10px; }

#v9-view .v9-ongoing { color: var(--v9-ac); }
#v9-view .v9-tw tbody td { color: var(--v9-td); }
#v9-view .v9-kv { color: var(--v9-tx); }

#v9-view .v9-attr-note { margin: 10px 0 0; font-size: 11px; color: var(--v9-tm); line-height: 1.6; }
#v9-view #v9-attr-chart { width: 100%; height: 100%; display: block; }

/* two-column rows: the trailing-risk pair, and drawdown beside live exposure */
#v9-view .v9-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
#v9-view .v9-col { min-width: 0; }
#v9-view .v9-sub { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 10px; color: var(--v9-td); }
#v9-view .v9-sub > span:first-child { color: var(--v9-tm); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; }
#v9-view .v9-sub .v9-rmeta { margin-left: auto; }
#v9-view .v9-sub-tight { margin-top: 14px; }
#v9-view .v9-rmeta { text-transform: none; letter-spacing: 0; }
/* The scroll box wraps only the table, so renderPaged() hangs the pager outside
   it instead of below the last row where it would need scrolling to reach. */
#v9-view #v9-trades .table-scroll { max-height: 260px; overflow-y: auto; }
#v9-view #v9-trades thead th { position: sticky; top: 0; background: var(--v9-sf); z-index: 1; }
#v9-view .empty-cell { padding: 14px 8px; color: var(--v9-tm); font-size: 11px; }
#v9-view .table-pager { font-size: 10px; }
@media (max-width: 1080px) { #v9-view .v9-two { grid-template-columns: 1fr; } }

/* Collapsible blocks. The summary keeps the headline numbers visible while the
   block is shut, so folding a section away never hides the reading itself. */
#v9-view .v9-dt > summary { cursor: pointer; list-style: none; }
#v9-view .v9-dt > summary::-webkit-details-marker { display: none; }
#v9-view .v9-dt > summary > span:first-child::before { content: '\25B8'; display: inline-block; width: 11px; color: var(--v9-tm); }
#v9-view .v9-dt[open] > summary > span:first-child::before { content: '\25BE'; }
#v9-view .v9-dt > summary:hover > span:first-child { color: var(--v9-td); }
#v9-view .v9-dt:not([open]) > summary { margin-bottom: 0; }
#v9-view .v9-dt-sub { margin-top: 12px; }
#v9-view .v9-dt-sub > summary { margin-bottom: 8px; }

/* One stat row must not be taller than the one beside it just because a tile
   carries a sub-line: the charts below them have to start on the same line. */
#v9-view .v9-dd-stats .v9-kp { min-height: 62px; }
/* The exposure legend sits on the section title line, not inside the chart box:
   an extra line inside one box made its chart shorter than the drawdown chart
   beside it, and the two are meant to read as one row. */
#v9-view .v9-legend-inline { margin: 0; justify-content: flex-start; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 9px; }
#v9-view .v9-legend-inline button { padding: 0; cursor: default; }

/* Chart furniture: a finer grid than the rest of the dashboard (the real v9 rules
   the plot both ways) and dimmer axis type, so the curve is the bright thing. */
#v9-view .grid-line { stroke: #191c22; }
#v9-view .vertical-grid { stroke: #15171c; }
#v9-view .minor-grid { stroke: #141619; }
#v9-view .zero-line { stroke: #3a414c; stroke-width: 1.2; }
#v9-view .zero-label { fill: var(--v9-td); font-weight: 400; }
#v9-view .axis-label { fill: var(--v9-tf); }

/* Months with no record are placeholders, not readings. */
#v9-view .v9-none { color: #3f444c; }
#v9-view .v9-flat { color: var(--v9-tf); }
#v9-view .v9-tw tbody tr:hover td { background: var(--v9-sf2); }

/* Rolling window pills sit above the pair, right-aligned. */
#v9-view .v9-winrow { display: flex; justify-content: flex-end; margin: -2px 0 10px; }
#v9-view .v9-pb-tight { margin-bottom: 0; }

/* Tile values carry their own sign colour. The generic .v9-kv colour rule below
   used to win on equal specificity, which is why every tile read white. */
#v9-view .v9-kv.v9-po { color: var(--v9-gn); }
#v9-view .v9-kv.v9-ne { color: var(--v9-rd); }

/* Gold, not green, for the active state of every toggle on this page: green is
   already the colour of a positive number here, so it read as a value. */
#v9-view .seg button.active { color: var(--v9-ac); border-color: var(--v9-ac); background: var(--v9-acd); }
#v9-view .seg button { border-color: var(--v9-bd); color: var(--v9-tm); }
#v9-view .seg button:hover:not(:disabled) { color: var(--v9-td); background: var(--v9-sf2); }

/* Panels lifted out of the retired click-in template, restyled to this page. */
#v9-view .v9-mounts .panel { background: var(--v9-sf); border-color: var(--v9-bd); margin: 0; }
#v9-view .v9-mounts .panel-head { border-color: var(--v9-bd); min-height: 0; padding: 10px 14px; }
#v9-view .v9-mounts .panel-head p { color: var(--v9-tm); }
#v9-view .v9-mounts .panel-head h2 { font-size: 13px; }
#v9-view .v9-mounts .panel-head > span { color: var(--v9-tf); }
#v9-view .v9-mounts #v9-mount-positions { margin-bottom: 16px; }
#v9-view .v9-mounts .mn-details > div { border-color: var(--v9-bd); }
#v9-view .v9-mounts .mn-details dt { color: var(--v9-tm); }
#v9-view .v9-mounts .mn-details dd { color: var(--v9-td); }
#v9-view .v9-headright { display: flex; align-items: center; gap: 12px; }

#v9-view .v9-chart-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 8px; }
#v9-view .v9-chart-head .v9-legend { margin-bottom: 0; }
#v9-view .v9-chart-head .seg.small { flex: none; }
#v9-view .v9-chart-toggles { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 720px) {
  #v9-view .v9-chart-head { flex-wrap: wrap; }
  #v9-view .v9-chart-toggles { width: 100%; justify-content: center; }
}

/* Sign colour on monthly cells. "#v9-view .v9-tw tbody td" carries more element
   selectors than "#v9-view .v9-po", so it won on specificity and repainted every
   month grey — the classes were there the whole time, just outranked. */
#v9-view .v9-tw tbody td.v9-po, #v9-view table tbody td.v9-po { color: var(--v9-gn); }
#v9-view .v9-tw tbody td.v9-ne, #v9-view table tbody td.v9-ne { color: var(--v9-rd); }
#v9-view .v9-tw tbody td.v9-flat, #v9-view table tbody td.v9-flat { color: var(--v9-tf); }
#v9-view .v9-tw tbody td.v9-none, #v9-view table tbody td.v9-none { color: #3f444c; }

/* ---------- manager trades (Live tab) ----------
   Green and red are already spoken for by P&L, and blue by API evidence, so
   side gets its own ramp: long is the unremarkable default and stays neutral,
   short is the thing worth noticing and goes orange. A losing short then never
   reads as a winning long. */
.mt-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
.mt-card { margin-bottom: 0; background: var(--panel-2); }
.mt-card.has-open { border-color: var(--line-2); }
.mt-card.has-borrow { border-color: rgba(227, 155, 89, .48); border-left: 3px solid var(--orange); }
.mt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.mt-card-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mt-card-name h3 { font-size: 13px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-head-exposure { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.mt-head-exposure > span { display: flex; align-items: baseline; gap: 6px; }
.mt-head-exposure small { color: var(--faint); font-size: 9px; letter-spacing: .08em; }
.mt-head-exposure b { color: var(--text); font: 600 16px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mt-card-badges { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.sync-pill.mt-drawn-pill { border-color: rgba(227, 155, 89, .4); background: var(--orange-soft); color: var(--orange); }
.fee-tier-pill {
  display: inline-block; padding: 3px 8px; border: 1px solid rgba(85, 167, 255, .32);
  border-radius: 4px; background: var(--api-soft); color: var(--api);
  font-size: 8px; letter-spacing: .05em; white-space: nowrap; cursor: help;
}
.mt-pill { display: inline-block; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--muted); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.mt-pill.is-short { border-color: rgba(227, 155, 89, .5); background: var(--orange-soft); color: var(--orange); }
.mt-pill.is-long { border-color: var(--line-2); background: rgba(255, 255, 255, .035); color: var(--history); }
.mt-pill.is-borrow { border-color: rgba(227, 155, 89, .5); background: var(--orange-soft); color: var(--orange); }

.mt-financing-summary {
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--green-soft);
  color: var(--green); font-size: 9px; font-weight: 600; letter-spacing: .055em;
}
.mt-financing-summary.is-active { background: var(--orange-soft); color: var(--orange); }
.mt-financing-alert {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid rgba(227, 155, 89, .28); background: rgba(227, 155, 89, .045);
}
.mt-financing-alert > div { min-width: 0; padding: 11px 14px; border-right: 1px solid rgba(227, 155, 89, .2); }
.mt-financing-alert > div:last-child { border-right: 0; }
.mt-financing-alert small, .mt-financing-alert b, .mt-financing-alert span { display: block; }
.mt-financing-alert small { color: var(--orange); font-size: 7px; letter-spacing: .08em; }
.mt-financing-alert b { margin-top: 4px; color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-financing-alert span { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.mt-expo-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: rgba(9, 10, 12, .3); }
.mt-expo-cell { padding: 11px 14px; border-right: 1px solid var(--line); }
.mt-expo-cell:last-child { border-right: 0; }
.mt-expo-cell small { display: block; color: var(--faint); font-size: 7px; letter-spacing: .11em; }
.mt-expo-cell b { display: block; margin-top: 4px; color: var(--text); font: 600 15px/1.15 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mt-expo-cell.is-focus b { font-size: 17px; font-weight: 600; }
.mt-expo-detail { display: block; margin-top: 3px; color: var(--faint); font-size: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-flat { margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 9px; }

/* Live is a state you act on, closed is history. The row itself carries it so
   the eye finds open positions without reading the status column. */
.mt-status { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 8px; letter-spacing: .06em; }
.mt-status.is-live { background: var(--green-soft); color: var(--green); border: 1px solid rgba(53, 200, 138, .45); }
.mt-status.is-closed { color: var(--faint); border: 1px solid transparent; }
.mt-positions tbody tr.is-live td { background: rgba(53, 200, 138, .05); color: var(--text); }
.mt-positions tbody tr.is-live td:first-child { box-shadow: inset 2px 0 0 var(--green); }

.mt-table th { background: var(--panel-2); }
.mt-table td { font-size: 9px; }
.mt-financing-cell b, .mt-financing-cell small { display: block; }
.mt-financing-cell b { font-weight: 500; }
.mt-financing-cell small { margin-top: 2px; color: var(--orange); font-size: 7px; white-space: nowrap; }
.mt-card-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.mt-card-foot span[title] { cursor: help; }
.mt-foot-cost { margin-left: auto; color: var(--faint); }
.mt-foot-cost + .mt-foot-cost { margin-left: 0; }
.mt-foot { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 8px; line-height: 1.55; }

@media (max-width: 900px) {
  .mt-cards { grid-template-columns: 1fr; padding: 10px; }
  .mt-card-head { flex-wrap: wrap; }
  .mt-financing-alert { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-financing-alert > div:nth-child(2) { border-right: 0; }
  .mt-financing-alert > div:nth-child(-n+2) { border-bottom: 1px solid rgba(227, 155, 89, .2); }
}

/* Modeled view: the only question is which numbers moved. Moved stays bright
   and gets a marker rail; unchanged goes quiet. No second number, no arrow. */
.evidence-num.stat-same b { color: var(--faint); font-weight: 400; }
.evidence-num.stat-moved { position: relative; }
.evidence-num.stat-moved b { color: var(--text); }
.evidence-num.stat-moved::before { content: ""; position: absolute; top: 50%; right: 4px; width: 3px; height: 3px; margin-top: -8px; border-radius: 50%; background: var(--api); }
.evidence-num.stat-unknown b { color: var(--faint); }

/* The test account has no strategy to rate, so its headline is what it holds. */
.v9-value { text-align: right; }
.v9-value small { display: block; color: var(--faint); font-size: 7px; letter-spacing: .11em; text-transform: uppercase; }
.v9-value b { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
#v9-attribution table { font-size: 9px; }


/* ---- Version log -------------------------------------------------------
   Jack asked for this after a duplicated API field went unnoticed for weeks:
   he wanted to see, from the site itself, what changed and which agent did
   it. The chip carries the newest entry so the answer to "is my change live?"
   is readable without opening anything. */
.version-chip {
  flex: 0 0 auto;
  margin-left: 0;
  padding: 4px 10px;
  border: 1px solid var(--line, #2a2f3a);
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #8b93a5);
  font: inherit;
  font-size: 11px;
  line-height: 1.6;
  cursor: pointer;
  white-space: nowrap;
}
.version-chip:hover { color: var(--text, #e6e9ef); border-color: var(--muted, #8b93a5); }

.version-log {
  width: min(760px, 92vw);
  max-height: 82vh;
  padding: 0;
  border: 1px solid var(--line, #2a2f3a);
  border-radius: 12px;
  background: var(--panel, #12151c);
  color: var(--text, #e6e9ef);
}
.version-log::backdrop { background: rgba(0, 0, 0, .55); }
.version-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line, #2a2f3a);
  position: sticky;
  top: 0;
  background: var(--panel, #12151c);
}
.version-log-head h2 { margin: 2px 0 0; font-size: 18px; }
.version-log-close {
  border: 0;
  background: transparent;
  color: var(--muted, #8b93a5);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.version-log-close:hover { color: var(--text, #e6e9ef); }
.version-log-body { padding: 8px 20px 12px; overflow-y: auto; max-height: calc(82vh - 74px); }
.version-log-extra { margin: 0; padding: 8px 20px 16px; border-top: 1px solid var(--line, #2a2f3a); }
.version-log-extra a { color: var(--faint, #838a96); font-size: 11px; text-decoration: none; }
.version-log-extra a:hover { color: var(--muted, #aab0bb); }

.version-day { margin: 18px 0 4px; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted, #8b93a5); }
.version-entry { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line, #2a2f3a); }
.version-entry-time { flex: 0 0 44px; font-variant-numeric: tabular-nums; color: var(--muted, #8b93a5); font-size: 12px; padding-top: 1px; }
.version-entry-main { flex: 1 1 auto; min-width: 0; }
.version-entry-summary { font-size: 13px; line-height: 1.5; }
.version-entry-detail { font-size: 12.5px; line-height: 1.55; color: var(--muted, #8b93a5); margin-top: 5px; }

/* "why" opens the reasoning. Quiet by default so a long history still scans
   as a list of changes rather than as paragraphs. */
.version-more {
  border: 0; background: transparent; padding: 0; margin-top: 3px;
  color: var(--muted, #8b93a5); font: inherit; font-size: 11px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.version-more:hover, .version-more.open { color: var(--text, #e6e9ef); }

.version-who {
  float: right; margin-left: 10px;
  font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted, #8b93a5); opacity: .75; padding-top: 2px;
}
.version-who.who-claude, .version-who.who-codex, .version-who.who-jack, .version-who.who-unknown { color: var(--muted, #8b93a5); }


/* The chart hover target used a style="cursor:crosshair" attribute, which the
   page's own Content-Security-Policy (style-src 'self') blocks, so the cursor
   never actually changed and every chart logged a CSP violation. Same rule as
   a class instead. Setting .style.foo from JS is CSSOM and stays allowed; it
   is only the style *attribute* that CSP refuses. */
.chart-crosshair { cursor: crosshair; }


/* ---- Loading skeleton --------------------------------------------------
   Placeholder rows shipped in the HTML so the table has shape before any
   data arrives. The first real render clears the tbody and these vanish, so
   they never need to be kept in step with the columns. */
.skel-row td { padding-top: 14px; padding-bottom: 14px; }
.skel {
  display: block; height: 10px; border-radius: 3px;
  background: linear-gradient(90deg, var(--line, #2a2f3a) 25%, var(--line-2, #363c49) 50%, var(--line, #2a2f3a) 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
  opacity: .55;
}
.skel-wide { width: 150px; } .skel-mid { width: 78px; }
.skel-num { width: 44px; margin-left: auto; } .skel-spark { width: 110px; }
@keyframes skel-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* allocator */
#allocator-view { width: min(960px, 100%); max-width: 960px; margin: 0 auto; }
.allocator-page-head { align-items: center; padding: 2px 0 6px; }
.allocator-page-head h1 { font-size: 22px; }
.allocator-controls { display: grid; grid-template-columns: minmax(150px, .65fr) minmax(230px, 1fr) auto; align-items: end; gap: 7px; margin: 0 0 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.allocator-controls > label, .allocator-controls > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.allocator-controls > label > span:first-child, .allocator-controls > div > span:first-child { color: var(--faint); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.allocator-input { display: flex; align-items: center; height: 27px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 4px; background: var(--panel-2); }
.allocator-input:focus-within { border-color: var(--api); }
.allocator-input i { padding: 0 9px; color: var(--faint); font-size: 10px; font-style: normal; }
.allocator-input input { width: 100%; min-width: 0; height: 100%; padding: 0 7px; border: 0; outline: 0; background: transparent; color: var(--text); font: 10px var(--mono); }
.allocator-input i + input { padding-left: 0; }
.allocator-input input + i { padding-left: 0; }
.allocator-reset { height: 27px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font: 8px var(--mono); }
.allocator-reset:hover { border-color: var(--muted); color: var(--text); }
.allocator-actions > div { display: flex; gap: 5px; }
.allocator-select { min-width: 128px; height: 27px; padding: 0 22px 0 8px; border: 1px solid var(--line-2); border-radius: 4px; outline: 0; background: var(--panel-2); color: var(--text); font: 8px var(--mono); cursor: pointer; }
.allocator-select:focus { border-color: var(--api); }
.allocator-optimize { border-color: rgba(53, 200, 138, .55); color: var(--green); }
.allocator-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin: 0 0 7px; }
.allocator-summary article { padding: 6px 8px; border-radius: 5px; }
.allocator-summary article span { margin-bottom: 2px; font-size: 7px; }
.allocator-summary article b { font: 600 18px/1.1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.allocator-summary article small { display: none; }
.allocator-chart-panel { overflow: hidden; margin-bottom: 7px; }
#allocator-view .panel-head { min-height: 34px; padding: 4px 9px; }
#allocator-view .panel-head h2 { font-size: 11px; }
#allocator-view .panel-head span { font-size: 7px; }
.allocator-chart-legend { display: flex; flex-wrap: wrap; gap: 3px 11px; min-height: 27px; padding: 4px 9px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.allocator-periods { display: flex; flex-wrap: wrap; gap: 3px; padding: 5px 9px; border-top: 1px solid var(--line); }
.allocator-periods button { min-width: 31px; height: 22px; padding: 0 7px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--faint); cursor: pointer; font: 7px var(--mono); }
.allocator-periods button:hover { color: var(--text); }
.allocator-periods button.active { border-color: rgba(53, 200, 138, .45); background: rgba(53, 200, 138, .09); color: var(--green); }
.allocator-legend-item { display: inline-flex; align-items: center; gap: 5px; padding: 1px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 7px var(--mono); }
.allocator-legend-item i { width: 6px; height: 6px; border-radius: 50%; }
.allocator-legend-item.is-hidden { color: var(--faint); text-decoration: line-through; opacity: .55; }
.allocator-chart-wrap { height: 165px; }
#allocator-chart { width: 100%; height: 100%; }
.allocator-panel { overflow: hidden; }
.allocator-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: 9px; }
.allocator-table th, .allocator-table td { overflow: hidden; padding: 5px 7px; border-bottom: 1px solid var(--line); text-align: left; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.allocator-table thead th { padding-top: 4px; padding-bottom: 4px; color: var(--faint); font-size: 7px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.allocator-table th:nth-child(1) { width: 19%; } .allocator-table th:nth-child(2) { width: 11%; }
.allocator-table th:nth-child(3) { width: 8%; } .allocator-table th:nth-child(4) { width: 8%; }
.allocator-table th:nth-child(5) { width: 8%; } .allocator-table th:nth-child(6) { width: 24%; }
.allocator-table th:nth-child(7) { width: 11%; } .allocator-table th:nth-child(8) { width: 11%; }
.allocator-table th.num, .allocator-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.allocator-table tbody tr:hover td { background: rgba(255, 255, 255, .015); }
.allocator-table tbody tr.is-disabled td { opacity: .43; }
.allocator-table tbody tr.is-disabled .allocator-manager, .allocator-table tbody tr.is-disabled .allocator-weight-scale { opacity: 1; }
.allocator-table tfoot th { padding-top: 4px; padding-bottom: 4px; border-bottom: 0; background: rgba(53, 200, 138, .035); color: var(--text); font-size: 8px; font-weight: 500; }
.allocator-manager { display: flex; align-items: center; gap: 5px; min-width: 0; }
.allocator-manager > input { width: 12px; height: 12px; margin: 0; accent-color: var(--green); }
.allocator-manager-color { flex: 0 0 auto; width: 4px; height: 18px; border-radius: 1px; }
.allocator-manager div { min-width: 0; }
.allocator-manager button { max-width: 100%; overflow: hidden; padding: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; font: 500 8px/1.2 var(--mono); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.allocator-manager button:hover { color: var(--green); }
.allocator-record { min-width: 0; }
.allocator-record .evidence-tier { display: inline-block; white-space: nowrap; }
.allocator-record .evidence-tier { padding: 2px 5px; font-size: 6px; letter-spacing: .03em; }
.allocator-vol b, .allocator-effective-vol b, .allocator-allocation b { color: var(--text); font-size: 9px; font-weight: 500; }
.allocator-range { display: grid; grid-template-columns: minmax(70px, 1fr) 34px; align-items: center; gap: 4px; min-width: 0; }
.allocator-range input { width: 100%; accent-color: var(--green); cursor: pointer; }
.allocator-range output { color: var(--text); font-size: 8px; text-align: right; font-variant-numeric: tabular-nums; }
.allocator-multiplier { display: inline-flex; align-items: center; width: 58px; height: 23px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 3px; background: var(--panel-2); }
.allocator-multiplier input { width: 42px; height: 100%; padding: 0 2px 0 5px; border: 0; outline: 0; background: transparent; color: var(--text); font: 8px var(--mono); }
.allocator-multiplier i { color: var(--api); font-size: 8px; font-style: normal; }
.allocator-contribution { color: var(--muted); }
.allocator-data-note { margin: 0; padding: 5px 8px; border-top: 1px solid var(--line); color: var(--faint); font-size: 7px; line-height: 1.35; }
@media (max-width: 980px) {
  .allocator-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .allocator-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .allocator-page-head { align-items: flex-start; flex-direction: column; }
  .allocator-controls { grid-template-columns: 1fr; }
  .allocator-controls .seg { width: 100%; }
  .allocator-controls .seg button { flex: 1; }
  .allocator-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- risk (landing view) ----------
   One row per funded SFOX account, sorted worst-first. The share-of-the-way-to-
   kill number is deliberately the largest thing on the row: every other figure
   here is context for it, and the old cards gave all of them the same weight so
   a manager at 35% and one at 0% looked identical until you read the fine print. */
.risk-rows { display: flex; flex-direction: column; gap: 8px; }
.risk-row {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 4px; background: var(--panel);
}
.risk-row:hover { background: var(--panel-2); border-color: var(--line-2); }
.risk-row.status-green { border-left-color: var(--green); }
.risk-row.status-collecting { border-left-color: var(--muted); }
.risk-row.status-hold { border-left-color: var(--gold); }
.risk-row.status-cut { border-left-color: var(--orange); }
.risk-row.status-exit { border-left-color: var(--red); }

.risk-row-id { flex: 0 1 250px; min-width: 0; }
.risk-row-name { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; font: 500 12px var(--mono); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.risk-row-name:hover { color: var(--green); }
.risk-row-note { display: block; overflow: hidden; margin-top: 4px; color: var(--faint); font-size: 8px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.risk-row-mandate { display: none; }
.risk-row-id .sync-pill { display: none; }

.risk-row-gauge { flex: 1 1 120px; max-width: 190px; min-width: 0; }
.risk-row-gauge-head { display: none; }
.risk-row-pct { flex: 0 0 42px; font-size: 16px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.risk-row-pct.green { color: var(--green); }
.risk-row-pct.collecting { color: var(--muted); }
.risk-row-pct.hold { color: var(--gold); }
.risk-row-pct.cut { color: var(--orange); }
.risk-row-pct.exit { color: var(--red); }
.risk-row-pct-label { display: none; }
.risk-row-status { flex: 0 0 auto; margin-left: 0; padding: 2px 6px; border-radius: 3px; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.risk-row-status.green { color: var(--green); background: var(--green-soft); }
.risk-row-status.collecting { color: var(--muted); background: var(--panel-2); }
.risk-row-status.hold { color: var(--gold); background: var(--gold-soft); }
.risk-row-status.cut { color: var(--orange); background: var(--orange-soft); }
.risk-row-status.exit { color: var(--red); background: var(--red-soft); }
.risk-row-gauge .risk-progress { height: 8px; }
.risk-row-gauge .gauge-legend { display: none; }
.risk-row-missing { margin: 0; color: var(--faint); font-size: 9.5px; }

.risk-row-stats { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.risk-row-stats div { min-width: 0; }
.risk-row-stats span, .risk-row-stats b { display: block; }
.risk-row-stats span { color: var(--faint); font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.risk-row-stats b { margin-top: 3px; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }

.risk-closest.green { color: var(--green); }
.risk-closest.hold { color: var(--gold); }
.risk-closest.cut { color: var(--orange); }
.risk-closest.exit { color: var(--red); }
.risk-foot-note { display: block; margin: 12px 2px 0; color: var(--faint); font-size: 9px; line-height: 1.55; }
#risk-view > details.risk-method { display: block; margin-top: 12px; }

@media (max-width: 720px) {
  .risk-row { flex-wrap: wrap; }
  .risk-row-stats { flex: 1 0 100%; margin-left: 0; justify-content: space-between; }
}

/* ---------- live positions ---------- */
#live-new-view:not([hidden]) { display: flex; flex-direction: column; }
#live-new-view > .risk-method, #risk-view > .risk-method { display: none; }

.book-readonly-pill {
  display: inline-block; padding: 2px 7px; border: 1px solid rgba(53, 200, 138, .32);
  border-radius: 3px; background: var(--green-soft); color: var(--green);
  font-size: 8px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.book-readonly-pill { border-color: rgba(85, 167, 255, .32); background: var(--api-soft); color: var(--api); }
.book-table-scroll { max-width: 100%; overflow-x: auto; }
.book-table-scroll .mt-table { width: 100%; min-width: 680px; }
.book-table-scroll .mt-positions { min-width: 0; table-layout: auto; }
.book-table-scroll .mt-positions th,
.book-table-scroll .mt-positions td { padding-right: 6px; padding-left: 6px; }
.mt-card { min-width: 0; overflow: hidden; }
.mt-card-head { box-sizing: border-box; min-height: 52px; align-items: center; }
.mt-card-name { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 0; }
.mt-card-badges { flex-direction: row; align-items: center; gap: 6px; flex-wrap: wrap; }

.venue-book-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(510px, 1fr)); gap: 12px; padding: 12px 14px; }
.venue-book-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-left: 3px solid var(--api); border-radius: 7px; background: var(--panel-2); }
.venue-book-card.is-stale { border-left-color: var(--red); }
.venue-book-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.venue-book-head h3 { color: var(--text); font: 500 13px/1.35 var(--mono); }
.venue-book-head > div:first-child > span { display: block; margin-top: 3px; color: var(--faint); font-size: 8px; }
.venue-book-badges { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.venue-book-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: rgba(9, 10, 12, .3); }
.venue-book-metrics > div { min-width: 0; padding: 10px 12px; border-right: 1px solid var(--line); }
.venue-book-metrics > div:last-child { border-right: 0; }
.venue-book-metrics span, .venue-book-metrics b { display: block; }
.venue-book-metrics span { color: var(--faint); font-size: 7px; letter-spacing: .07em; text-transform: uppercase; }
.venue-book-metrics b { overflow: hidden; margin-top: 4px; color: var(--text); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.venue-position-table { min-width: 580px; }
.venue-position-table th { background: var(--panel-2); }
.venue-position-table td { font-size: 9px; }
.venue-book-foot { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 8px; }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; justify-content: flex-start; gap: 8px 12px; padding-bottom: 8px; }
  .brand { flex: 1; min-width: 160px; }
  .brand b { font-size: 12px; }
  .system { display: block; width: 8px; margin-left: auto; }
  .system span, .system small { display: none; }
  .system i { display: block; }
  .version-chip { flex: none; max-width: 145px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .tabs { order: 5; flex: 1 0 100%; flex-wrap: wrap; gap: 0; overflow: visible; }
  .tab { flex: 1; height: 40px; padding: 0 5px; }
  .manager-picker { order: 6; flex: 0 0 100%; width: 100%; margin: 0; padding: 7px 0 0; }
  .manager-picker select { width: 100%; max-width: none; }
  .venue-book-cards, .mt-cards { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .venue-book-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .venue-book-metrics > div:nth-child(2) { border-right: 0; }
  .venue-book-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .venue-book-head { flex-direction: column; }
  .venue-book-badges { justify-content: flex-start; }
  .venue-book-foot { flex-direction: column; }
  .mt-expo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-expo-cell:nth-child(2) { border-right: 0; }
  .mt-expo-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Exact PTS financing on the trades tables. A blank cell is "not mapped here",
   while zero is a mapped position on which sFOX charged nothing. */
.mt-margin-none { color: var(--faint); }
.mt-margin { color: var(--warn-line, var(--text)); }

/* ================= Manager Monitor visual system =================
   System fonts and existing DOM only. This deliberately adds no remote assets,
   packages, scripts, or extra requests to the dashboard. */
:root {
  --bg: #0b111a; --panel: #111923; --panel-2: #172230;
  --line: #263446; --line-2: #35465c; --text: #eef3f8;
  --muted: #9aa8ba; --faint: #718197; --history: #d4dbe5;
  --api: #1aa8ff; --api-soft: rgba(26, 168, 255, .12);
  --green: #3bd49a; --green-soft: rgba(59, 212, 154, .11);
  --red: #f07570; --red-soft: rgba(240, 117, 112, .11);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
html { background: var(--bg); }
body { background: var(--bg); font: 13px/1.5 var(--sans); }
button, input, select { font-family: var(--sans); }
h1, h2, h3, .brand b { font-family: var(--sans); }
h1 { font-size: 26px; font-weight: 650; letter-spacing: -.025em; }
h2 { font-weight: 620; letter-spacing: -.01em; }

.shell { padding-bottom: 64px; }
.shell > section { width: min(1180px, 100%); max-width: 1180px; padding: 26px 24px 0; }
.topbar {
  min-height: 68px; margin: 18px 22px 0; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(17, 25, 35, .96); box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
}
.brand > span {
  padding: 6px 9px; border: 1px solid rgba(26, 168, 255, .42); border-radius: 8px;
  background: var(--api-soft); color: var(--api); font: 750 10px var(--sans); letter-spacing: .12em;
}
.brand b { font-size: 15px; font-weight: 620; }
.tabs { gap: 4px; align-items: center; }
.tab {
  height: 38px; padding: 0 11px; border: 1px solid transparent; border-radius: 9px;
  color: var(--muted); font: 550 11px var(--sans);
}
.tab:hover { background: rgba(255, 255, 255, .025); }
.tab.active, .tab.test.active {
  border-color: rgba(26, 168, 255, .32); background: var(--api-soft); color: var(--api);
}
.tab-menu-toggle { height: 38px; border: 0; border-radius: 7px; font-family: var(--sans); }
.tab-menu-toggle.active { border: 0; background: var(--api-soft); color: var(--api); }
.tab-menu-popover { top: 41px; border-radius: 10px; background: var(--panel); }
.tab-menu-popover button, .manager-picker select, .page-size-label select { font-family: var(--sans); }
.manager-picker select, .page-size-label select { border-radius: 8px; background: var(--panel-2); }
.version-chip, .system, .manager-picker { font-family: var(--sans); }

.overview-head, .manager-head { align-items: flex-end; padding: 3px 0 18px; }
.overview-head p, .manager-head p, .panel-head p { font-family: var(--sans); }
.evidence-page-head h1, .risk-page-head h1, .fidelity-head h1, .allocator-page-head h1 {
  font: 650 26px/1.15 var(--sans); letter-spacing: -.025em;
}
.evidence-page-note { max-width: 820px; font-size: 11px !important; line-height: 1.6; }

.panel, .correlation-panel, .evidence-key, .live-equity-summary {
  border-color: var(--line); border-radius: 12px; background: var(--panel);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .10);
}
.panel-head { min-height: 60px; padding: 12px 17px; }
.panel-head.compact { min-height: 56px; }
.panel-head h2 { font-size: 15px; }
.panel-head > span, .panel-head div > span { font-family: var(--sans); font-size: 9px; }
.seg button {
  padding: 7px 11px; border-color: var(--line-2); font: 550 10px var(--sans);
}
.seg button:first-child { border-radius: 8px 0 0 8px; }
.seg button:last-child { border-radius: 0 8px 8px 0; }
.seg button.active, #v9-view .seg button.active {
  border-color: rgba(26, 168, 255, .48); background: var(--api-soft); color: var(--api);
}
.live-pill, .source-badge, .evidence-tier, .risk-row-status { border-radius: 999px; font-family: var(--sans); }
table { font-family: var(--sans); font-size: 11px; }
th { font-family: var(--sans); }
th, td { padding-top: 10px; padding-bottom: 10px; }
.num, .evidence-num, .evidence-metric, .evidence-gap, .evidence-live,
.live-equity-summary b, .risk-row-pct, .risk-row-stats b, .v9-kv, .v9-mv {
  font-variant-numeric: tabular-nums;
}

/* Overview */
.evidence-key { margin-bottom: 16px; border-radius: 12px; }
.evidence-key > div { padding: 14px 16px; }
.evidence-key b { font-size: 11px; }
.evidence-key span { font-size: 9px; }
.evidence-table th, .evidence-table td { padding: 13px 12px; }
.evidence-manager button { font: 620 12px/1.35 var(--sans); }
.evidence-manager span { font-size: 10px; }
.evidence-metric b { font-size: 18px; }
.evidence-num b { font-size: 15px; }
.evidence-num b.strong-num { font-size: 18px; }
.chart-wrap.overview-curve-wrap { height: 48px; }
.evidence-curve { height: 44px; }
.correlation-panel { margin-top: 20px; }
.correlation-head { min-height: 64px; padding: 12px 16px; }
summary.correlation-head::after { border-radius: 7px; font-family: var(--sans); }

/* Shared KPI cards */
.live-equity-summary { gap: 10px; margin: 14px 0 18px; border: 0; background: transparent; box-shadow: none; }
.live-equity-summary article {
  min-height: 88px; padding: 14px 16px; border: 1px solid var(--line) !important;
  border-radius: 11px; background: var(--panel); box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
}
.live-equity-summary article span { margin-bottom: 6px; font: 650 9px var(--sans); }
.live-equity-summary article b { font: 650 22px/1.1 var(--sans); letter-spacing: -.02em; }
.live-equity-summary article small { margin-top: 6px; font: 9px/1.4 var(--sans); }

/* Drawdowns */
.risk-rows { gap: 10px; }
.risk-row { min-height: 72px; padding: 13px 16px; border-radius: 11px; background: var(--panel); }
.risk-row-name { font: 620 13px var(--sans); }
.risk-row-name:hover { color: var(--api); }
.risk-row-note { margin-top: 5px; font: 9px/1.35 var(--sans); }
.risk-row-pct { flex-basis: 50px; font-size: 19px; }
.risk-row-stats { gap: 22px; }
.risk-row-stats span { font: 650 8px var(--sans); }
.risk-row-stats b { font: 600 13px var(--sans); }
.risk-row-status { padding: 4px 8px; font-size: 8px; }
.risk-foot-note { margin: 15px 3px 0; font: 9px/1.6 var(--sans); }
.risk-method summary { padding: 14px 16px; font: 550 10px var(--sans); }

/* Live Positions */
.chart-wrap.live-equity-chart-wrap { height: 286px; padding: 8px 12px 0; }
.mt-cards, .venue-book-cards { gap: 14px; padding: 14px 16px; }
.mt-card, .venue-book-card { border-radius: 11px; }
.mt-card-head, .venue-book-head { min-height: 58px; padding: 13px 15px; }
.mt-card-name h3, .venue-book-head h3 { font: 620 13px/1.35 var(--sans); }
.venue-book-metrics > div { padding: 12px 14px; }

/* Fidelity */
.fidelity-managers { gap: 16px; }
.fidelity-panel { border-radius: 12px; }
.fidelity-panel-head { min-height: 64px; padding: 13px 17px; }
.fidelity-panel-head h2 { font-size: 16px; }
.fidelity-board { padding: 14px 17px 16px; row-gap: 10px; }
.fid-name { font-size: 12px; }
.fid-now, .fid-extra, .fid-corr { font-size: 17px; }
.chart-wrap.fidelity-chart { height: 300px; padding: 8px 12px 0; }

/* Analytics was compressed independently from every other page. */
#allocator-view { width: min(1180px, 100%); max-width: 1180px; }
.allocator-controls { grid-template-columns: minmax(170px, .7fr) minmax(260px, 1fr) auto; gap: 12px; margin-bottom: 14px; padding: 14px 16px; border-radius: 12px; }
.allocator-controls > label > span:first-child, .allocator-controls > div > span:first-child { font: 650 9px var(--sans); }
.allocator-input, .allocator-reset, .allocator-select { height: 34px; border-radius: 8px; }
.allocator-input input { font: 12px var(--sans); }
.allocator-reset, .allocator-select { font: 550 10px var(--sans); }
.allocator-summary { gap: 9px; margin-bottom: 14px; }
.allocator-summary article { min-height: 82px; padding: 13px 14px; border-radius: 10px; }
.allocator-summary article span { font-size: 8px; }
.allocator-summary article b { font: 650 21px/1.1 var(--sans); }
.allocator-chart-panel { margin-bottom: 14px; }
#allocator-view .panel-head { min-height: 56px; padding: 11px 15px; }
#allocator-view .panel-head h2 { font-size: 15px; }
#allocator-view .panel-head span { font-size: 9px; }
.allocator-periods { gap: 5px; padding: 8px 12px; }
.allocator-periods button { min-width: 38px; height: 28px; border-radius: 7px; font: 550 9px var(--sans); }
.allocator-periods button.active { border-color: rgba(26, 168, 255, .42); background: var(--api-soft); color: var(--api); }
.allocator-chart-legend { min-height: 34px; gap: 5px 14px; padding: 7px 12px; }
.allocator-legend-item { font: 9px var(--sans); }
.chart-wrap.allocator-chart-wrap { height: 270px; padding: 8px 12px 0; }
.allocator-table { font-size: 11px; }
.allocator-table th, .allocator-table td { padding: 9px 9px; }
.allocator-table thead th { font-size: 8px; }
.allocator-manager button { font: 600 10px/1.25 var(--sans); }
.allocator-record .evidence-tier { font-size: 7px; }
.allocator-vol b, .allocator-effective-vol b, .allocator-allocation b { font-size: 11px; }
.allocator-range output, .allocator-multiplier input { font: 10px var(--sans); }
.allocator-data-note { padding: 9px 11px; font: 8px/1.45 var(--sans); }

/* Manager detail */
#v9-view {
  --v9-sf: var(--panel); --v9-sf2: var(--panel-2); --v9-bd: var(--line);
  --v9-tx: var(--text); --v9-td: var(--muted); --v9-tm: var(--faint);
  --v9-tf: #617087; --v9-ac: var(--api); --v9-acd: var(--api-soft); --v9-r: 12px;
  padding-top: 26px;
}
#v9-view .v9-head { min-height: 62px; margin-bottom: 16px; padding-bottom: 14px; }
#v9-view .v9-head h1 { font: 650 25px/1.15 var(--sans); letter-spacing: -.025em; }
#v9-view .v9-head .v9-eyebrow, #v9-view .v9-head .v9-window { font-family: var(--sans); }
#v9-view .v9-pp { padding: 7px 11px; font: 550 10px var(--sans); }
#v9-view .v9-cc { padding: 18px 20px 14px; box-shadow: 0 10px 26px rgba(0, 0, 0, .10); }
#v9-view .v9-chart-wrap { height: 290px; }
#v9-view .v9-uw-wrap { height: 180px; }
#v9-view .v9-sec { margin-bottom: 22px; }
#v9-view .v9-st { min-height: 24px; margin-bottom: 11px; font: 650 10px var(--sans); }
#v9-view .v9-mc { min-height: 58px; padding: 11px 8px; }
#v9-view .v9-mc .v9-ml, #v9-view .v9-kl { font: 650 9px var(--sans); }
#v9-view .v9-mc .v9-mv { font: 600 14px var(--sans); }
#v9-view .v9-kg { gap: 10px; }
#v9-view .v9-kp { min-height: 76px; padding: 13px 14px; }
#v9-view .v9-kv { font: 620 18px var(--sans); }
#v9-view .v9-ks, #v9-view .v9-kb, #v9-view .v9-rmeta { font-family: var(--sans); }
#v9-view .v9-tw table { font-family: var(--sans); font-size: 11px; }
#v9-view .v9-tw thead th { padding: 8px 9px; font-family: var(--sans); }
#v9-view .v9-tw tbody td { padding: 6px 9px; }
#v9-view .v9-dt > summary.v9-st { min-height: 48px; padding: 12px 14px; border: 1px solid var(--v9-bd); border-radius: 10px; background: var(--v9-sf); }
#v9-view .v9-dt[open] > summary.v9-st { margin-bottom: 14px; }
#v9-view .v9-sub { font-family: var(--sans); }
#v9-view .v9-mounts .panel { border-radius: 10px; }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px; }
  .tabs { order: 5; flex: 1 0 100%; overflow-x: auto; }
  .tab { flex: 0 0 auto; }
  .allocator-controls { grid-template-columns: 1fr 1fr; }
  .allocator-actions { grid-column: 1 / -1; }
  .allocator-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .topbar { min-height: 0; margin: 10px 10px 0; padding: 11px 12px; border-radius: 12px; }
  .brand { min-width: 140px; }
  .brand b { font-size: 12px; }
  .tab { height: 36px; padding: 0 9px; }
  .manager-picker { padding-top: 2px; }
  .shell > section { padding: 20px 12px 0; }
  h1, .evidence-page-head h1, .risk-page-head h1, .fidelity-head h1, .allocator-page-head h1 { font-size: 23px; }
  .overview-head, .manager-head { align-items: flex-start; padding-bottom: 14px; }
  .evidence-key { grid-template-columns: 1fr; }
  .evidence-key > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-key > div:last-child { border-bottom: 0; }
  .live-equity-summary, .allocator-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-equity-summary article { min-height: 82px; padding: 12px; }
  .risk-row { align-items: flex-start; flex-wrap: wrap; }
  .risk-row-id { flex-basis: calc(100% - 84px); }
  .risk-row-gauge { order: 5; flex-basis: 100%; max-width: none; }
  .risk-row-stats { order: 6; width: 100%; justify-content: space-between; gap: 8px; }
  .chart-wrap.live-equity-chart-wrap, .chart-wrap.fidelity-chart, .chart-wrap.allocator-chart-wrap { height: 250px; }
  .fidelity-board { grid-template-columns: minmax(100px, 1fr) 66px 66px 66px; column-gap: 6px; padding: 12px; }
  .fid-now, .fid-extra, .fid-corr { font-size: 14px; }
  .allocator-controls { grid-template-columns: 1fr; padding: 12px; }
  .allocator-actions { grid-column: auto; }
  .allocator-actions > div { flex-wrap: wrap; }
  .allocator-select { flex: 1 1 150px; }
  .allocator-panel .table-scroll { overflow-x: auto; }
  .allocator-table { min-width: 880px; }
  #v9-view { padding-top: 20px; }
  #v9-view .v9-head { align-items: flex-start; }
  #v9-view .v9-head h1 { font-size: 22px; }
  #v9-view .v9-headright { align-items: flex-end; flex-direction: column; gap: 5px; }
  #v9-view .v9-chart-wrap { height: 250px; }
  #v9-view .v9-kg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #v9-view .v9-two { grid-template-columns: minmax(0, 1fr); }
}

/* ================= Readability pass · 2026-08-24 ================= */
.evidence-tier-cell .evidence-source { display: none; }
.status-chip {
  padding: 5px 9px; border: 1px solid currentColor; border-radius: 7px;
  font: 700 9px var(--sans); letter-spacing: .025em;
}
.evidence-status small { margin-top: 7px; color: var(--muted); font-size: 10px; }
.evidence-live b { font-size: 17px; font-weight: 650; }
.evidence-live span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.evidence-num b, .evidence-num b.strong-num { font-size: 17px; font-weight: 650; }
.overview-curve-wrap .mini-chart-tooltip {
  right: auto !important; left: auto; top: 2px !important;
  min-width: 0; width: max-content; padding: 4px 6px; border-radius: 6px;
  transform: none; font-size: 8px;
}
.overview-curve-wrap .mini-tip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; white-space: nowrap; }
.overview-curve-wrap .mini-tip time { margin: 0; color: var(--muted); font-size: 8px; }
.overview-curve-wrap .mini-tip b { margin: 0; color: var(--text); font-size: 9px; line-height: 1.1; }

.risk-list-head, .risk-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.15fr) minmax(250px, 1.25fr) 112px minmax(470px, 2fr);
  align-items: center; gap: 14px;
}
.risk-list-head { padding: 0 16px 8px; color: var(--faint); font: 650 9px var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.risk-row { min-height: 88px; padding: 14px 16px; }
.risk-row-id { min-width: 0; }
.risk-row-note { color: var(--muted); font-size: 10px; }
.risk-row-limit { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
.risk-row-distance { min-width: 0; }
.risk-row-pct { display: block; font-size: 20px; }
.risk-row-pct-label { display: block; margin-top: 4px; color: var(--faint); font: 8px var(--sans); white-space: nowrap; }
.risk-row-gauge { max-width: none; min-width: 0; }
.risk-row-gauge-head { display: block; overflow: hidden; margin-bottom: 7px; color: var(--faint); font: 8px var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.risk-row-status { justify-self: start; max-width: 108px; overflow: hidden; padding: 6px 9px; border: 1px solid currentColor; border-radius: 7px; font: 700 8px var(--sans); text-overflow: ellipsis; }
.risk-row-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; width: 100%; }
.risk-row-stats div { min-width: 0; padding: 0 9px; border-left: 1px solid var(--line); }
.risk-row-stats div:first-child { border-left: 0; padding-left: 0; }
.risk-row-stats div:last-child { padding-right: 0; }
.risk-row-stats span { overflow: hidden; font: 650 8px var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.risk-row-stats b { overflow: hidden; margin-top: 5px; font: 620 13px var(--sans); text-overflow: ellipsis; white-space: nowrap; }

.book-summary article:nth-child(2) span, .book-summary article:nth-child(3) span { color: var(--api); }

.fidelity-card-modes button { white-space: nowrap; }
.fidelity-board { grid-template-columns: minmax(150px, 1.4fr) 100px 110px 124px; column-gap: 14px; row-gap: 10px; padding: 16px 17px 18px; }
.fidelity-board-head { font-size: 9px; letter-spacing: .06em; }
.fid-name { font-size: 12px; font-weight: 600; }
.fid-now, .fid-extra { font-size: 19px; }
.fid-corr {
  display: grid; min-height: 64px; place-items: center; align-self: stretch;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2);
  color: var(--text); font-size: 21px; text-align: center;
}
.fid-corr-head { text-align: center !important; }

@media (max-width: 1100px) {
  .risk-list-head { display: none; }
  .risk-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; }
  .risk-row-status { grid-column: 2; grid-row: 1; }
  .risk-row-limit { grid-column: 1 / -1; }
  .risk-row-stats { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .risk-row { display: grid; }
  .risk-row-id { flex-basis: auto; }
  .risk-row-limit { display: grid; }
  .risk-row-stats { order: initial; width: 100%; }
  .risk-row-stats div { padding: 0 6px; }
  .risk-row-stats span { font-size: 7px; }
  .risk-row-stats b { font-size: 11px; }
  .fidelity-panel-head { align-items: flex-start; flex-direction: column; }
  .fidelity-card-modes { width: 100%; margin-left: 0; overflow-x: auto; }
  .fidelity-card-modes button { flex: 1 0 auto; }
  .fidelity-board { grid-template-columns: minmax(96px, 1fr) 68px 76px 82px; column-gap: 7px; }
  .fid-now, .fid-extra { font-size: 15px; }
  .fid-corr { min-height: 58px; font-size: 17px; }
}

.fidelity-board {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: stretch;
  gap: 12px; padding: 16px 17px 18px;
}
.fidelity-correlation {
  display: flex; flex-direction: column; justify-content: center; min-height: 82px;
  padding: 13px 15px; border: 1px solid rgba(26, 168, 255, .28);
  border-radius: 10px; background: var(--api-soft);
}
.fidelity-correlation .fid-corr-head { color: var(--api); text-align: left !important; }
.fidelity-correlation .fid-corr {
  display: block; min-height: 0; margin-top: 6px; border: 0; border-radius: 0;
  background: transparent; color: var(--text); font-size: 30px; line-height: 1;
  text-align: left;
}
.fid-correlation-note { margin-top: 7px; color: var(--muted); font-size: 9px; }
.fidelity-source-table { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.fidelity-source-columns, .fidelity-source-card {
  display: grid; grid-template-columns: minmax(130px, 1.4fr) repeat(3, minmax(80px, 1fr));
  align-items: center; min-height: 42px; padding: 0 15px; column-gap: 14px;
}
.fidelity-source-columns { min-height: 30px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.fidelity-source-columns span:not(:first-child) { text-align: right; }
.fidelity-source-card {
  min-width: 0; border-bottom: 1px solid var(--line);
}
.fidelity-source-card:last-child { border-bottom: 0; }
.fidelity-source-card .fid-name { color: var(--text); font-size: 13px; }
.fidelity-source-metrics {
  display: contents;
}
.fidelity-source-metric { display: block; min-width: 0; text-align: right; }
.fidelity-source-metric .fidelity-board-head { display: none; }
.fidelity-source-metric b { margin: 0; text-align: right; }
.fid-average { font-size: 19px; font-weight: 600; }
#v9-view #v9-expo-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .fidelity-board { grid-template-columns: 1fr; }
  .fidelity-correlation {
    display: grid; grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center; gap: 12px; min-height: 0;
  }
  .fidelity-correlation .fid-corr { margin: 0; }
  .fid-correlation-note { margin: 0; text-align: right; }
}

@media (max-width: 720px) {
  .fidelity-board { grid-template-columns: 1fr; gap: 10px; }
  .fidelity-correlation .fid-corr { margin: 0; font-size: 24px; }
  .fidelity-source-columns, .fidelity-source-card { grid-template-columns: minmax(100px, 1.3fr) repeat(3, minmax(62px, 1fr)); padding: 0 10px; column-gap: 7px; }
  #v9-view #v9-expo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- robuxio ---------- */
/* Jack's own money at Robuxio. Deliberately laid out like Robuxio's own client
   dashboard: curve on top, flow ledger underneath. */
#robuxio-view .view-sub { margin: 4px 0 0; color: var(--muted); font-size: 11px; max-width: 62ch; }
#robuxio-view .chart-wrap { height: 300px; padding: 8px 12px 0; }
#rx-chart { width: 100%; height: 100%; display: block; }
#robuxio-view .live-equity-summary { margin-bottom: 12px; }
.rx-pill { display: inline-block; padding: 2px 7px; border-radius: 4px; font: 9px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.rx-pill.in { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.rx-pill.out { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.rx-pill.fee { color: var(--muted); background: var(--line-2); }
.rx-flows-split { display: block; margin-top: 4px; color: var(--faint); font-size: 10.5px; max-width: 92ch; }
.rx-notes { padding: 12px 16px 16px; display: grid; gap: 9px; }
.rx-notes p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; max-width: 88ch; }
.rx-notes b { color: var(--text); font-weight: 600; }
.rx-notes code { font: 10.5px var(--mono); color: var(--text); background: var(--line-2); padding: 1px 5px; border-radius: 3px; }


/* Manager Monitor audit: quiet, visible evidence limitations. */
.position-dust, .fid-coverage, .fid-context { color: var(--muted, #8b909a); font-size: 12px; line-height: 1.5; }
.position-dust { padding: 10px 16px; }
.position-dust p { margin: 4px 0 0; }
.position-dust summary { cursor: pointer; }
.fid-coverage { margin: 6px 0 14px; }

.monitoring-health { margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--line, #303743); border-radius: 8px; font-size: 12px; line-height: 1.5; }
.monitoring-health summary { cursor: pointer; }
.monitoring-health ul { margin: 10px 0; padding-left: 20px; }
.monitoring-health p { color: var(--muted, #8b909a); margin: 8px 0 0; }
.monitoring-health.has-issues { border-color: #bd7d31; }

/* Drawdown rows: readable labels and separate policy/model measurements. */
.risk-row-limit { grid-template-columns: minmax(76px, .7fr) minmax(0, 1fr); gap: 14px; }
.risk-row-pct-label, .risk-row-gauge-head { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.risk-row-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.risk-row-status { white-space: normal; overflow: visible; line-height: 1.4; }
.risk-row-stats span { white-space: normal; overflow: visible; line-height: 1.4; min-height: 2.8em; }
.risk-row-timing { grid-column: 1 / -1; color: var(--muted); font: 10px var(--sans); line-height: 1.5; }
@media (max-width: 1250px) {
  .risk-list-head { display: none; }
  .risk-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; }
  .risk-row-status { grid-column: 2; grid-row: 1; }
  .risk-row-limit, .risk-row-stats { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .risk-row-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
  .risk-row-stats div:nth-child(4) { border-left: 0; padding-left: 0; }
}

/* Fidelity: keep the account comparison readable and method detail optional. */
.fidelity-board:not(.is-exposure) .fidelity-source-columns,
.fidelity-board:not(.is-exposure) .fidelity-source-card {
  grid-template-columns: minmax(110px, 1.4fr) repeat(2, minmax(65px, 1fr));
}
.fid-activity { margin: 0 17px 8px; font-size: 12px; color: var(--text); line-height: 1.5; }
.fid-details { margin: 0 17px 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.fid-details summary { cursor: pointer; width: fit-content; }
.fid-details .fid-coverage { margin: 8px 0; }
.fid-method { margin: 8px 0; max-width: 95ch; }
@media (max-width: 520px) {
  .fidelity-correlation { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .fid-correlation-note { grid-column: 1 / -1; text-align: left; }
  .fidelity-source-card .fid-name { overflow-wrap: anywhere; }
  .fidelity-board.is-exposure .fidelity-source-columns,
  .fidelity-board.is-exposure .fidelity-source-card {
    grid-template-columns: minmax(70px, 1.3fr) repeat(3, minmax(0, 1fr));
  }
}

/* Quiet monitoring control; operational failures remain prominent. */
.monitoring-health {
  width: fit-content; max-width: 100%; margin: 0 0 10px auto;
  padding: 5px 12px; border-color: transparent; color: var(--muted);
}
.monitoring-health > summary { list-style: none; display: flex; align-items: center; gap: 7px; font-size: 11px; }
.monitoring-health > summary::-webkit-details-marker { display: none; }
.monitoring-health > summary::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--muted); }
.monitoring-health > summary::after { content: "⌄"; margin-left: auto; }
.monitoring-health[open] > summary::after { content: "⌃"; }
.monitoring-health[open] { width: min(560px, 100%); border-color: var(--line); background: var(--panel); }
.monitoring-health-body { padding-top: 6px; }
.monitoring-health-heading { font-weight: 600; color: var(--text) !important; }
.monitoring-health.has-issues {
  width: 100%; padding: 12px 16px; border-color: #bd7d31;
  background: rgba(189,125,49,.07); color: var(--text);
}
.monitoring-health.has-issues > summary { font-size: 13px; font-weight: 600; }
.monitoring-health.has-issues > summary::before { background: #bd7d31; }

/* Small balances are secondary detail, not a paragraph of positions. */
.small-balances { border-top: 1px solid var(--line); }
.small-balances > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; list-style: none; font-size: 12px; }
.small-balances > summary::-webkit-details-marker { display: none; }
.small-balances > summary::before { content: "▸"; color: var(--faint); }
.small-balances[open] > summary::before { content: "▾"; }
.small-balances-total { color: var(--text); font-variant-numeric: tabular-nums; }
.small-balances-loans { color: var(--muted); font-size: 11px; }
.small-balances-table { width: 100%; max-width: 520px; margin-top: 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.small-balances-table th { font-size: 10px; color: var(--faint); font-weight: 500; }
.small-balances-table th, .small-balances-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; }
.small-balances-table th:first-child, .small-balances-table td:first-child { padding-left: 0; text-align: left; }
.small-balances-table td { color: var(--text); font-size: 12px; }
.small-balances-kind { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 10px; }
.small-balances .small-balances-note { max-width: 65ch; margin: 8px 0 0; font-size: 11px; color: var(--muted); }

/* Robuxio period controls share the existing two-handle timeline. */
#robuxio-view .rx-range-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
#robuxio-view .rx-dates { display: flex; flex-wrap: wrap; gap: 12px; }
#robuxio-view .rx-dates label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
#robuxio-view .rx-dates input { color-scheme: dark; background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 5px; padding: 6px; font: inherit; }
#robuxio-view .rx-period-note { margin: 0; padding: 4px 18px 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
#robuxio-view #rx-best-worst { font-size: clamp(16px, 1.5vw, 24px); }
#robuxio-view .timeline-range input::-moz-range-thumb { width: 12px; height: 12px; border: 2px solid var(--panel); border-radius: 50%; background: var(--api); pointer-events: auto; cursor: ew-resize; }
@media (max-width: 600px) {
  #robuxio-view .rx-range-toolbar { padding: 12px; }
  #robuxio-view #rx-period-controls { flex-wrap: wrap; }
  #robuxio-view #rx-period-controls button { padding: 7px 10px; }
}

#robuxio-view #rx-timeline-range { touch-action: none; cursor: ew-resize; }

/* BTC scenario risk: compact, aligned and horizontally scrollable on mobile. */
.risk-controls { display:flex; flex-wrap:wrap; gap:18px; padding:12px 16px; border-bottom:1px solid var(--line); }
.risk-controls label { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--muted); }
.risk-controls select { background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:6px; padding:6px 8px; }
.btc-risk-table { width:100%; min-width:840px; border-collapse:collapse; }
.btc-risk-table th, .btc-risk-table td { padding:10px 12px; text-align:right; border-bottom:1px solid var(--line); font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.btc-risk-table th:first-child { text-align:left; }
.btc-risk-table thead th { color:var(--muted); font-weight:500; }
.btc-risk-table small { display:block; font-size:9px; color:var(--muted); font-weight:400; margin-top:3px; }
.risk-caption { margin:0; padding:14px 16px 8px; font-size:11px; color:var(--muted); }
.risk-method { padding:12px 16px; border-top:1px solid var(--line); font-size:11px; color:var(--muted); }
.risk-method summary { cursor:pointer; }
.risk-method p { max-width:1000px; line-height:1.6; }
