:root {
  --bg: #f5f6f8; --card: #fff; --ink: #202a3b; --muted: #768092; --line: #e7eaf0;
  --long: #e5484d; --short: #18a058; --none: #9ca3af; --accent: #2563eb; --warn: #d97706;
  --long-bg: rgba(229, 72, 77, .08); --short-bg: rgba(24, 160, 88, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }
header { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; gap: 28px; align-items: center; padding: 14px 28px; flex-wrap: wrap; }
header h1 { font-size: 15px; margin: 0; font-weight: 650; line-height: 1.5; }
.sp { flex: 1; }
header a { color: var(--accent); text-decoration: none; }
select, button { font: inherit; color: var(--ink); padding: 7px 10px; border: 1px solid #dce1e9; border-radius: 6px; background: #fff; }
button { cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, select:focus-visible, a:focus-visible, tr:focus-visible, summary:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
main { max-width: 1480px; margin: 0 auto; padding: 28px 28px 40px; }
.params { color: var(--muted); margin: 0 0 12px; }
.warn { color: var(--warn); }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 15px 16px; }
.kpi .l { color: var(--muted); font-size: 12px; }
.kpi .v { font-size: 25px; font-weight: 600; letter-spacing: -.6px; margin: 6px 0 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .s { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 17px 18px; margin-bottom: 18px; min-width: 0; }
.card h2 { font-size: 14px; margin: 0 0 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card h2 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.comparison { border-left: 3px solid #b89754; }
.comparison p { line-height: 1.8; }
.comparison td { color: var(--ink); }
.comparison.research { border-left-color: #7c6fb0; }
#researchRule, .research-notice { font-weight: 600; }
#researchConclusion { font-weight: 600; margin-bottom: 8px; }
#researchCaveat { font-size: 12px; margin-bottom: 0; }
.comparison tbody th { position: static; }
#comparisonConclusion { font-weight: 600; margin-bottom: 8px; }
#comparisonCaveat { font-size: 12px; margin-bottom: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 > .card { margin-bottom: 0; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } }
.chart { width: 100%; position: relative; }
.legend { position: absolute; left: 8px; top: 4px; max-width: calc(100% - 98px); z-index: 3; pointer-events: none; font-size: 11px;
  background: rgba(255, 255, 255, .9); padding: 3px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.keys { color: var(--muted); font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; position: sticky; top: 0; background: var(--card); }
td.l, th.l { text-align: left; }
tbody tr:hover { background: #f3f6fb; }
tr.click { cursor: pointer; }
tr.sel { background: #e8effd !important; }
.scroll { max-height: 520px; overflow: auto; }
.pos { color: var(--long); } .neg { color: var(--short); }
.tag { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 12px; line-height: 18px; }
.tag.long { background: var(--long-bg); color: var(--long); }
.tag.short { background: var(--short-bg); color: var(--short); }
.tag.none, .tag.skip { background: #f1f2f4; color: var(--muted); }
.tag.stop { background: #fff3e0; color: var(--warn); }
.muted { color: var(--muted); }
.why { color: var(--muted); font-size: 12px; }
.heat td { text-align: center; min-width: 54px; }
.heat td small { font-size: 10px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
details summary { cursor: pointer; color: var(--muted); }
.ok { color: var(--short); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; background: #f3ead5; color: #947333; border: 1px solid #e7d7b5; border-radius: 9px; font-weight: 650; font-size: 17px; }
header h1 span { display: block; font-size: 10px; font-weight: 500; letter-spacing: .6px; color: var(--muted); }
nav { display: flex; align-items: center; gap: 4px; }
nav a { padding: 8px 14px; border-radius: 6px; color: var(--muted); }
nav a.active { color: #22324a; background: #eef1f5; font-weight: 600; }
.run-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.run-label select { max-width: 410px; font-size: 12px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.page-heading h2 { font-size: 25px; letter-spacing: -.6px; margin: 2px 0 6px; font-weight: 650; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: #9a7b3e !important; font-size: 10px; font-weight: 600; letter-spacing: 2px; }
.paper-badge { color: #68778c; border: 1px solid #dce2ea; padding: 5px 10px; border-radius: 5px; font-size: 11px; }
.date-range { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.date-range label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.date-range .muted { font-size: 11px; }
.quick-range { display: flex; gap: 4px; }
.quick-range button { font-size: 12px; padding: 6px 9px; }
.quick-range button.active { color: #947333; border-color: #d5bf8e; background: #faf5e9; }
.notice button { margin-left: 8px; padding: 4px 12px; }
.evidence { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 4px 0 18px; font-size: 11px; color: var(--muted); align-items: center; }
.notice { background: #edf3fa; border: 1px solid #dce6f3; color: #536a88; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.notice.error { background: #fff5f3; border-color: #f1d2cd; color: #a44639; }
.check { font-size: 12px; font-weight: 400; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.review-nav { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.review-nav b { font-size: 13px; font-weight: 600; }
.decision { border-left: 3px solid #b89754; }
.decision td, #regimes td { white-space: normal; vertical-align: top; }
.decision td:first-child { width: 100px; white-space: nowrap; color: #69768a; }
.decision td { line-height: 1.9; }
details.card > summary { font-size: 13px; font-weight: 500; color: #59667a; }
details.card[open] > summary { margin-bottom: 18px; }
.assumptions p { margin: 12px 0 0; line-height: 1.9; font-size: 12px; }
footer { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; font-size: 11px; color: #8d96a5; flex-wrap: wrap; }
footer a { color: inherit; text-decoration: none; }
#m5 { scroll-margin-top: 94px; }
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } header { gap: 16px; } .run-label { margin-left: auto; } }
@media (max-width: 700px) {
  header { position: static; padding: 12px 16px; gap: 12px; }
  header .sp { display: none; } nav { margin-left: auto; } nav a { padding: 7px 10px; }
  .run-label { width: 100%; } .run-label select { min-width: 0; max-width: none; flex: 1; }
  main { padding: 20px 14px; } .page-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; } .kpi .v { font-size: 23px; }
  .card { padding: 13px 10px; } .keys { gap: 7px; } .legend { max-height: 60px; overflow: hidden; }
  .decision td:first-child { width: 62px !important; } .decision td { padding: 8px 5px; }
  .card h2 small { font-size: 11px; } #regimes { overflow: auto; }
}

.connection { font-size:12px; color:#768092; display:flex; align-items:center; gap:7px; }
.connection::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.connection.healthy { color:#188357; }.connection.unhealthy { color:#b16c1c; }
.connection.waiting { color:#52677e; }
.account-switcher { display:none; }
.entry-status { border-left:3px solid #b18135; }
.entry-status > p:first-of-type { font-size:17px; font-weight:550; color:#26354b; }
.entry-status .muted { line-height:1.9; overflow-wrap:anywhere; }
.empty { color:#8993a2; text-align:center; border:1px dashed #e3e7ed; padding:52px 12px; border-radius:5px; }
.slices { display:grid; grid-template-columns:repeat(auto-fit,minmax(115px,1fr)); gap:10px; margin-bottom:18px; }
.strategy-picker { font-size:13px; font-weight:400; display:flex; align-items:center; gap:10px; }
.strategy-picker select { max-width:280px; }
.strategy-overview td:first-child { font-weight:550; }
.strategy-overview .muted { max-width:80ch; }
select:focus-visible,button:focus-visible,input:focus-visible { outline:2px solid #2563eb; outline-offset:3px; }
@media(max-width:700px) { .strategy-overview h2 { flex-wrap:wrap; gap:10px; }.strategy-picker { width:100%; }.strategy-picker select { flex:1; max-width:100%; } }
.slice { background:#f7f8fa; border:1px dashed #dce2ea; padding:12px; border-radius:6px; color:#7e8897; min-height:74px; }
.slice.occupied { background:#fcf8ef; border:1px solid #e2d2ad; color:#796337; }
.slice strong { display:block; margin-top:5px; font-size:16px; font-weight:550; }
.gates { display:grid; gap:0; }
.gate { display:flex; justify-content:space-between; gap:20px; padding:11px 0; border-bottom:1px solid #eef0f4; }
.gate:last-child { border:0; }.gate span { color:#768092; }.gate b { font-weight:550; text-align:right; }
.grid2 { margin-bottom:18px; }.market { margin-top:18px; }
.login label { display:block; margin-bottom:14px; }.login input { border:1px solid #dce1e9; border-radius:5px; padding:9px; margin-left:12px; width:min(420px,70%); }
.stale-data { opacity:.65; }.reason { max-width:360px; white-space:normal; text-align:left; }
html { scroll-behavior:smooth; }section { scroll-margin-top:90px; }
/* Compact trading blotter: paired dates/prices, one position per row. */
.trade-toolbar { display:flex; flex-wrap:wrap; gap:10px 20px; margin-bottom:14px; }
.trade-toolbar label { display:flex; align-items:center; gap:8px; color:#536176; }
.trade-summary { display:flex; flex-wrap:wrap; align-items:baseline; gap:10px 24px; padding:12px 0; border-block:1px solid #e7eaf0; margin-bottom:12px; }
.trade-summary b { color:#202a3b; font-size:16px; font-weight:600; margin-left:6px; font-variant-numeric:tabular-nums; }
.trade-summary small { flex-basis:100%; color:#536176; }
.trade-note { max-width:100ch; color:#536176; font-size:12px; line-height:1.8; }
.trade-table { min-width:990px; }
.trade-table th { color:#536176; font-size:12px; text-align:left; padding:12px 10px; }
.trade-table td { text-align:left; padding:14px 10px; vertical-align:top; }
.trade-cell { display:grid; gap:5px; font-variant-numeric:tabular-nums; }
.trade-cell small { font-size:12px; color:#536176; }
.trade-cell strong { font-size:15px; font-weight:600; color:#202a3b; }
.trade-detail { max-width:280px; min-width:56px; }
.trade-detail summary { color:#2563eb; padding:3px 0; }
.trade-quality { display:block; max-width:15ch; white-space:normal; color:#536176; margin-bottom:5px; }
.trade-detail dl { white-space:normal; min-width:230px; margin-bottom:8px; }
.trade-detail dl div { padding:6px 0; border-bottom:1px solid #e7eaf0; }
.trade-detail dt { color:#536176; font-size:11px; }.trade-detail dd { margin:3px 0; overflow-wrap:anywhere; }
.trade-detail p { white-space:normal; max-width:30ch; color:#536176; font-size:11px; }
.trade-empty { text-align:center !important; white-space:normal; padding:32px !important; color:#536176; }
.trade-scroll:focus-visible { outline:2px solid #2563eb; outline-offset:3px; }
@media(max-width:700px) { .trade-toolbar label { flex:1; }.trade-toolbar select { flex:1; min-width:0; }.trade-summary { gap:8px 14px; }.trade-summary b { font-size:14px; }.trade-table th,.trade-table td { padding-inline:8px; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
@media(max-width:700px) { .slices { grid-template-columns:repeat(3,1fr); gap:7px; }.slice { padding:9px; } nav { display:none; }.connection { margin-left:auto; } .login input { margin-left:0; display:block; width:100%; margin-top:8px; } }
@media(max-width:700px) {
  .account-switcher { display:flex; align-items:center; gap:12px; flex-basis:100%; order:1; min-width:0; color:#536176; white-space:nowrap; }
  .account-switcher select,.virtual-page .account-switcher select { flex:1; min-width:0; min-height:44px; font-size:16px; }
}

/* Virtual observer: the USD curve is the focus, not a wall of metric cards. */
.virtual-page { --gold-line:#956313; --quiet:#536176; --rule:#dce2ea; --gain:#146346; --loss:#a23b35; }
.virtual-page main { max-width:1120px; }
.virtual-page .muted { color:var(--quiet); }
.virtual-page .virtual-overview { border-top:3px solid var(--gold-line); }
.virtual-title { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:6px 16px; }
.virtual-page .virtual-title h2 { margin:0; font-size:19px; }
.virtual-title p { margin:0; }
.virtual-title #status { color:var(--quiet); overflow-wrap:anywhere; }
.virtual-page #entrySummary { margin:10px 0 0; }
.virtual-page .virtual-entry { margin-top:12px; padding:2px 0 2px 12px; }
.virtual-page .virtual-entry h3 { margin:0; font-size:13px; color:var(--quiet); font-weight:500; }
.virtual-page .virtual-entry #entrySummary { margin:5px 0; font-size:16px; }
.virtual-page .virtual-entry #entryEvidence { margin:0; font-size:12px; line-height:1.8; }
.virtual-page #fundingAlert { margin:6px 0 0; font-weight:600; }
.virtual-metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); margin:15px 0 0; border-block:1px solid var(--rule); }
.virtual-metrics > div { padding:12px 9px; min-width:0; }
.virtual-metrics > div + div { border-left:1px solid var(--rule); }
.virtual-metrics dt { color:var(--quiet); }
.virtual-metrics dd { margin:3px 0 0; font-variant-numeric:tabular-nums; font-weight:650; font-size:clamp(15px,2vw,22px); overflow-wrap:anywhere; }
.virtual-metrics [data-sign="gain"] { color:var(--gain); }
.virtual-metrics [data-sign="loss"] { color:var(--loss); }
.virtual-page .metric-note { margin:7px 0 15px; font-size:12px; }
.virtual-page .curve-heading { margin:0 0 5px; }
.virtual-page #curve { min-height:236px; }
.virtual-page #curve > p { margin:0; min-height:inherit; display:grid; place-items:center; color:var(--quiet); }
.virtual-page #curve svg { display:block; max-width:100%; overflow:visible; touch-action:pan-y; cursor:crosshair; }
.virtual-page #curve svg:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.virtual-chart-label { fill:var(--quiet); font:12px system-ui,sans-serif; font-variant-numeric:tabular-nums; }
.virtual-chart-grid { stroke:var(--rule); }
.virtual-chart-line { fill:none; stroke:var(--gold-line); stroke-width:2; stroke-linejoin:round; }
.virtual-chart-cursor { stroke:var(--quiet); }
.virtual-chart-dot { fill:var(--gold-line); stroke:var(--card); stroke-width:2; }
.virtual-page #curveLabel { min-height:1.5em; margin:3px 0; font-variant-numeric:tabular-nums; }
.virtual-page #historyStatus { margin:5px 0; }
.virtual-page .curve-data summary { font-size:12px; color:var(--quiet); }
.virtual-page .curve-data .scroll { max-height:260px; }
.virtual-page .virtual-details > summary { font-size:14px; font-weight:600; color:var(--ink); }
.virtual-page .virtual-details section + section { margin-top:18px; }
.virtual-page .trade-pages { display:flex; gap:12px; align-items:center; margin-top:12px; }
.virtual-page .trade-pages[hidden],.virtual-page .column-toggle { display:none; }
.virtual-page #capital { margin:0; }
.virtual-page #capital dd { margin:0; font-variant-numeric:tabular-nums; }
.virtual-page .virtual-details summary small { margin-left:6px; color:var(--quiet); font-weight:400; }
@media(max-width:850px) {
  .virtual-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .virtual-metrics > div:nth-child(4) { border-left:0; }
  .virtual-metrics > div:nth-child(n+4) { border-top:1px solid var(--rule); }
}
@media(max-width:700px) {
  .virtual-page header { gap:4px; }
  .virtual-page main { padding:12px 10px 24px; }
  .virtual-page .card { padding:12px; margin-bottom:10px; }
  .virtual-page .virtual-title h2 { font-size:16px; }
  .virtual-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .virtual-metrics > div:nth-child(n) { border-left:0; }
  .virtual-metrics > div:nth-child(even) { border-left:1px solid var(--rule); }
  .virtual-metrics > div:nth-child(n+3) { border-top:1px solid var(--rule); }
  .virtual-metrics > div { padding:9px; }
  .virtual-metrics dd { font-size:18px; }
  .virtual-page #curve { min-height:192px; }
  .virtual-page .column-toggle:not([hidden]) { display:inline-block; }
  .virtual-page :is(#positionSection,#tradeDetails):not(.full-columns) .trade-table { min-width:0; width:100%; }
  .virtual-page :is(#positionSection,#tradeDetails):not(.full-columns) .trade-table :is(th,td):is(:nth-child(2),:nth-child(3),:nth-child(6),:nth-child(7)) { display:none; }
  .virtual-page :is(#positionSection,#tradeDetails):not(.full-columns) .trade-table :is(th,td) { white-space:normal; overflow-wrap:anywhere; }
  .virtual-page .trade-table td small { line-height:1.35; }
  .virtual-page .trade-table td,.virtual-page .trade-table th { padding:8px 5px; }
  .virtual-page .trade-table tbody td:last-child[colspan] { display:table-cell; }
  .virtual-page .trade-note { display:none; }
  .virtual-page :is(select,button) { min-height:40px; }
  .virtual-page details > summary { padding-block:5px; }
  .virtual-page .curve-data summary { min-height:36px; }
}
@media (forced-colors:active) {
  .virtual-chart-line,.virtual-chart-grid,.virtual-chart-cursor { stroke:CanvasText; }
  .virtual-chart-dot { fill:Highlight; stroke:Canvas; }
  .virtual-chart-label { fill:CanvasText; }
}
