:root {
  --canvas: #f2f4f1;
  --surface: #ffffff;
  --surface-muted: #e8ece8;
  --ink: #171a18;
  --muted: #69716c;
  --line: #d7ddd8;
  --green: #187855;
  --green-soft: #dcefe7;
  --coral: #bd513d;
  --coral-soft: #f7e3de;
  --amber: #9a681b;
  --amber-soft: #f4ead5;
  --teal: #2a6370;
  --shadow: 0 12px 32px rgba(21, 30, 24, 0.08);
}

body[data-theme="night"] {
  --canvas: #0b1018;
  --surface: #111823;
  --surface-muted: #171f2b;
  --ink: #e8edf4;
  --muted: #8290a1;
  --line: #263243;
  --green: #36c58e;
  --green-soft: #123c31;
  --coral: #f06470;
  --coral-soft: #40232c;
  --amber: #e2aa43;
  --amber-soft: #3a301c;
  --teal: #77bfd3;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  color-scheme: dark;
}

body[data-theme="night"] .app-header,
body[data-theme="night"] .data-section,
body[data-theme="night"] .status-strip,
body[data-theme="night"] dialog,
body[data-theme="night"] .login-form { box-shadow: var(--shadow); }
body[data-theme="night"] th,
body[data-theme="night"] .smart-money-chart-grid,
body[data-theme="night"] #trader-form,
body[data-theme="night"] .filter-bar { background: #1d2521; }
body[data-theme="night"] tbody tr:hover td { background: #202a24; }
body[data-theme="night"] .chart-bar { opacity: .92; }
body[data-theme="night"] .icon-button:hover,
body[data-theme="night"] .nav-item:hover { background: #222c26; }
body[data-theme="night"] .command-button { color: #10201a; background: var(--teal); border-color: var(--teal); }
body[data-theme="night"] .command-button:hover { background: #91d9df; border-color: #91d9df; }

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}
button, input, select { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(42, 99, 112, 0.24);
  outline-offset: 2px;
}

.app-header {
  min-height: 54px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-block { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-block h1 { margin: 0; font-size: 16px; line-height: 1.25; font-weight: 730; }
.brand-block p { margin: 4px 0 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark { width: 30px; height: 30px; display: block; padding: 0; background: linear-gradient(135deg, #69d3b0 0 50%, #ef6a77 50%); border-radius: 5px; flex: 0 0 auto; }
.brand-mark span { display: none; }

.main-nav { display: flex; height: 54px; align-items: stretch; }
.nav-item { min-width: 72px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.nav-item:hover { color: var(--ink); background: #f8faf8; }
.nav-item.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 650; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; font-size: 20px; line-height: 1; }
.icon-button:hover { background: var(--surface-muted); }
.command-button { min-height: 38px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 5px; background: var(--ink); color: #fff; font-weight: 650; cursor: pointer; }
.command-button:hover { background: #303632; }
.command-button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.text-button { padding: 6px 0; border: 0; background: transparent; color: var(--teal); font-weight: 650; cursor: pointer; }

.workspace { width: min(1600px, 100%); margin: 0 auto; padding: 24px 28px 48px; }
.view { display: none; }
.view.active { display: block; }
#overview-view.view.active { display: flex; flex-direction: column; }
#overview-view > .status-strip { order: 0; }
#overview-view > .decision-board-section { order: 1; }
#overview-view > .smart-money-section { order: 2; }
#overview-view > .position-consensus-section { order: 3; }
#overview-view > .position-divergence-section { order: 4; }
#overview-view > .consensus-section { order: 5; }
#overview-view > .split-band { order: 6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.status-strip { display: grid; grid-template-columns: 1.25fr repeat(3, 0.72fr) 1fr; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow: hidden; }
.metric { min-height: 84px; padding: 17px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.metric:first-child { border-left: 0; }
.metric-label { color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.metric strong { font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; }
.primary-metric strong, .time-metric strong { font-size: 14px; line-height: 1.35; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--muted); }
.status-dot.good { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-dot.bad { background: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }

.data-section { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.smart-money-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; border-top: 1px solid var(--line); background: #f7f9f7; }
.smart-money-chart-card { min-width: 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.chart-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.chart-card-head strong { display: block; font-size: 14px; }
.chart-card-head small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 82px; margin-top: 14px; padding: 8px 0 0; border-bottom: 1px solid var(--line); }
.chart-bar { display: block; flex: 1 1 0; align-self: flex-end; min-width: 2px; min-height: 2px; background: var(--teal); border-radius: 2px 2px 0 0; opacity: .82; }
.chart-bar.negative { background: var(--coral); }
.chart-level-1 { height: 8px; }
.chart-level-2 { height: 14px; }
.chart-level-3 { height: 20px; }
.chart-level-4 { height: 26px; }
.chart-level-5 { height: 32px; }
.chart-level-6 { height: 38px; }
.chart-level-7 { height: 44px; }
.chart-level-8 { height: 50px; }
.chart-level-9 { height: 56px; }
.chart-level-10 { height: 62px; }
.chart-level-11 { height: 68px; }
.chart-level-12 { height: 74px; }
.chart-card-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.chart-card-meta strong { display: block; margin-top: 3px; color: var(--ink); font-size: 12px; }
.chart-card-meta .positive { color: var(--green); }
.chart-card-meta .negative { color: var(--coral); }
.chart-empty { padding: 18px 14px; color: var(--muted); font-size: 12px; }
.smart-money-brief { border-top: 1px solid var(--line); }
.smart-money-brief-row { min-width: 0; display: grid; grid-template-columns: minmax(150px, 1.1fr) 76px 86px minmax(260px, 2fr) auto; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.smart-money-brief-row:last-child { border-bottom: 0; }
.smart-money-brief-identity, .smart-money-brief-count { min-width: 0; }
.smart-money-brief-identity strong, .smart-money-brief-count strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-money-brief-identity small, .smart-money-brief-count small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-money-brief-count strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.smart-money-brief-direction { display: flex; flex-wrap: wrap; gap: 8px; }
.smart-money-brief-direction .direction { margin-top: 0; }
.smart-money-brief-positions { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.smart-position-chip { min-width: 92px; display: inline-flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-left: 3px solid var(--teal); background: var(--surface-muted); border-radius: 3px; }
.smart-position-chip.long { border-left-color: var(--green); }
.smart-position-chip.short { border-left-color: var(--coral); }
.smart-position-chip strong { font-size: 11px; }
.smart-position-chip small, .smart-position-empty { color: var(--muted); font-size: 10px; }
.smart-position-empty { padding: 7px 0; }
.smart-money-details { border-top: 1px solid var(--line); }
.smart-money-details summary { min-height: 54px; padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; }
.smart-money-details summary::-webkit-details-marker { display: none; }
.smart-money-details summary > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.smart-money-details summary h3 { margin: 0; font-size: 13px; line-height: 1.2; }
.smart-money-details summary small { color: var(--muted); font-size: 10px; }
.details-toggle { flex: 0 0 auto; color: var(--teal); font-size: 11px; font-weight: 700; }
.details-toggle::after { content: " ↓"; }
.smart-money-details[open] .details-toggle::after { content: " ↑"; }
.smart-money-details[open] .details-toggle { color: var(--ink); }
.smart-position-state { min-height: 44px; padding: 9px 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--green); background: var(--green-soft); border-top: 1px solid var(--line); }
.smart-position-state.warning { color: var(--amber); background: var(--amber-soft); }
.smart-position-state > span { display: inline-flex; align-items: center; gap: 7px; padding-right: 10px; border-right: 1px solid rgba(23, 26, 24, .14); }
.smart-position-state > span:last-child { border-right: 0; }
.smart-position-state strong { color: var(--ink); font-size: 11px; }
.smart-position-state small { color: var(--muted); font-size: 10px; }
.smart-position-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.smart-position-band { min-width: 0; }
.smart-position-band + .smart-position-band { border-left: 1px solid var(--line); }
.band-heading { min-height: 58px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.band-heading h3 { margin: 2px 0 0; font-size: 14px; }
.smart-position-band table { min-width: 620px; }
.decision-board-heading { align-items: flex-start; }
.section-note { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.decision-board-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.decision-stat { min-width: 0; min-height: 72px; padding: 13px 16px; border-left: 1px solid var(--line); }
.decision-stat:first-child { border-left: 0; }
.decision-stat span { display: block; color: var(--muted); font-size: 10px; }
.decision-stat strong { display: block; min-width: 0; margin-top: 7px; font-size: 21px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.decision-stat small { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 500; }
.decision-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.decision-panel { min-width: 0; }
.decision-panel + .decision-panel { border-top: 1px solid var(--line); }
.decision-panel table { min-width: 0; table-layout: fixed; }
.decision-panel:first-child th:nth-child(1), .decision-panel:first-child td:nth-child(1) { width: 16%; }
.decision-panel:first-child th:nth-child(2), .decision-panel:first-child td:nth-child(2) { width: 54%; }
.decision-panel:first-child th:nth-child(3), .decision-panel:first-child td:nth-child(3) { width: 18%; }
.decision-panel:first-child th:nth-child(4), .decision-panel:first-child td:nth-child(4) { width: 12%; }
.decision-panel:last-child th:nth-child(1), .decision-panel:last-child td:nth-child(1) { width: 15%; }
.decision-panel:last-child th:nth-child(2), .decision-panel:last-child td:nth-child(2), .decision-panel:last-child th:nth-child(3), .decision-panel:last-child td:nth-child(3) { width: 31%; }
.decision-panel:last-child th:nth-child(4), .decision-panel:last-child td:nth-child(4) { width: 23%; }
.decision-member-list { display: grid; gap: 6px; }
.decision-member { display: grid; grid-template-columns: minmax(120px, .65fr) minmax(0, 1.35fr); gap: 2px 12px; padding: 7px 9px; border-left: 3px solid var(--teal); background: var(--surface-muted); border-radius: 3px; }
.decision-member strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.decision-member small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.decision-member em { grid-column: 1 / -1; color: var(--muted); font-size: 10px; font-style: normal; font-variant-numeric: tabular-nums; }
.decision-member:has(.return.positive) { border-left-color: var(--green); }
.decision-member:has(.return.negative) { border-left-color: var(--coral); }
.decision-cost { min-width: 0; }
.decision-cost-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.decision-cost-head strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.decision-cost-head small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.decision-price-track { position: relative; height: 24px; margin-top: 6px; padding-top: 2px; overflow: hidden; }
.decision-price-track .track-base { position: absolute; left: 0; right: 0; top: 15px; height: 2px; background: var(--line); border-radius: 2px; }
.decision-price-track .track-tick { position: absolute; top: 9px; width: 2px; height: 13px; transform: translateX(-1px); border-radius: 1px; }
.decision-price-track .track-tick.long { background: var(--green); }
.decision-price-track .track-tick.short { background: var(--coral); }
.decision-price-track .track-avg { position: absolute; top: 7px; width: 1px; height: 17px; transform: translateX(-.5px); opacity: .55; background: var(--teal); }
.decision-price-track .track-now { position: absolute; top: 5px; width: 2px; height: 21px; transform: translateX(-1px); background: var(--ink); }
.decision-price-track .track-now::after { content: ""; position: absolute; left: -3px; top: -4px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid var(--ink); }
.decision-price-track .track-label { position: absolute; top: 18px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.decision-price-track .track-label.start, .decision-price-track .track-label.end { display: none; }
.decision-price-track .track-label.now { top: -2px; transform: translateX(-50%); color: var(--ink); }
.decision-price-unknown { color: var(--muted); font-size: 10px; }
.decision-side { display: grid; gap: 5px; min-width: 145px; }
.decision-side-row { display: grid; gap: 2px; padding: 6px 8px; border-left: 3px solid var(--line); background: var(--surface-muted); border-radius: 3px; }
.decision-side.long .decision-side-row { border-left-color: var(--green); }
.decision-side.short .decision-side-row { border-left-color: var(--coral); }
.decision-side-row strong { font-size: 11px; }
.decision-side-row small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.decision-empty { color: var(--muted); }
.section-heading, .page-heading { min-height: 72px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-heading.compact { min-height: 65px; }
.section-heading h2, .page-heading h2 { margin: 2px 0 0; font-size: 17px; line-height: 1.25; }
.section-kicker { margin: 0; color: var(--teal); font-size: 9px; font-weight: 750; }
.quiet-label { color: var(--muted); font-size: 12px; }

.segmented { display: flex; padding: 3px; border: 1px solid var(--line); background: var(--surface-muted); border-radius: 6px; overflow-x: auto; max-width: 100%; }
.segmented button { min-width: 68px; height: 32px; padding: 0 10px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap; }
.segmented button.active { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: 0 1px 4px rgba(20, 30, 24, 0.1); }

.table-shell { width: 100%; overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
#consensus-table:has(.empty-cell) { min-width: 100%; }
#position-consensus-table:has(.empty-cell) { min-width: 100%; }
th { height: 38px; padding: 0 14px; color: var(--muted); background: #f7f9f7; font-size: 10px; text-align: left; font-weight: 650; white-space: nowrap; }
td { min-height: 48px; padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover td { background: #fafcfb; }
.empty-cell, .empty-state { padding: 32px 18px; color: var(--muted); text-align: center; }
.asset { font-weight: 750; }
.direction { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; }
.direction.long, .return.positive { color: var(--green); }
.direction.short, .return.negative { color: var(--coral); }
.return { font-weight: 700; }
.trader-stack { display: flex; flex-wrap: wrap; gap: 5px; }
.trader-chip { padding: 3px 7px; background: var(--surface-muted); border-radius: 3px; font-size: 11px; }
.trader-chip small { margin-left: 4px; font-size: 9px; font-weight: 700; }
.open-tag { color: var(--green); }
.reverse-tag { color: var(--amber); }
.signal-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.baseline-tag, .evidence-tag, .health-pill { display: inline-block; padding: 3px 7px; border-radius: 3px; font-size: 10px; font-weight: 700; }
.baseline-tag { color: var(--amber); background: var(--amber-soft); }
.evidence-tag { color: var(--teal); background: #deedf0; }
.official-tag { display: inline-block; padding: 3px 7px; border-radius: 3px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 700; }
.health-pill.good { color: var(--green); background: var(--green-soft); }
.health-pill.bad { color: var(--coral); background: var(--coral-soft); }
.health-pill.warn { color: var(--amber); background: var(--amber-soft); }

.split-band { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr); gap: 22px; }
.matrix-shell { overflow-x: auto; border-top: 1px solid var(--line); }
.matrix-table { min-width: 620px; }
.matrix-position { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.matrix-position .bar { width: 4px; height: 24px; border-radius: 1px; background: var(--green); }
.matrix-position.short .bar { background: var(--coral); }
.evidence-legend { display: flex; gap: 6px; align-items: center; }
.coverage-strip { min-height: 38px; padding: 10px 18px; color: var(--green); background: var(--green-soft); border-top: 1px solid var(--line); font-size: 12px; }
.coverage-strip.warning { color: var(--amber); background: var(--amber-soft); }
.position-votes { display: flex; flex-wrap: wrap; gap: 8px; }
.position-vote { min-width: 150px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding: 7px 9px; background: var(--surface-muted); border-radius: 4px; }
.position-vote strong, .position-vote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.position-vote strong { font-size: 12px; }
.position-vote span { grid-column: 1; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.position-vote small { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.position-side-list { display: flex; flex-wrap: wrap; gap: 5px; }
.position-side-item { min-width: 112px; display: inline-flex; flex-direction: column; gap: 2px; padding: 5px 7px; border-radius: 3px; background: var(--surface-muted); }
.position-side-item strong { font-size: 11px; }
.position-side-item small { color: var(--muted); font-size: 10px; }
.long-list .position-side-item { border-left: 3px solid var(--green); }
.short-list .position-side-item { border-left: 3px solid var(--coral); }
.event-list { border-top: 1px solid var(--line); }
.event-item { min-height: 62px; padding: 11px 16px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.event-item:first-child { border-top: 0; }
.event-time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.event-main { min-width: 0; }
.event-main strong, .event-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-main span { margin-top: 4px; color: var(--muted); font-size: 11px; }

.page-heading { padding: 8px 0 20px; min-height: 64px; }
.page-heading h2 { font-size: 24px; }
.filter-bar { display: flex; align-items: end; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 6px 6px 0 0; background: var(--surface); }
label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
input, select { height: 38px; min-width: 160px; padding: 0 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.filter-bar + .table-shell { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: var(--surface); }
.research-note { min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 16px; color: var(--muted); background: var(--amber-soft); border: 1px solid #e8d8b7; border-radius: 6px 6px 0 0; }
.research-note strong { color: var(--amber); }
.research-note + .table-shell, #health-view .table-shell { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: var(--surface); }

dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(20, 24, 21, 0.48); }
.dialog-head { min-height: 70px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 2px 0 0; font-size: 18px; }
.trader-list { max-height: 320px; overflow-y: auto; }
.trader-row { min-height: 62px; padding: 10px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.trader-identity { min-width: 0; }
.trader-identity strong, .trader-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trader-identity span { margin-top: 4px; color: var(--muted); font-size: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.row-actions { display: flex; gap: 4px; }
.small-action { min-height: 30px; padding: 0 8px; border: 0; background: transparent; color: var(--teal); cursor: pointer; }
.small-action.danger { color: var(--coral); }
.switch { position: relative; display: inline-flex; align-items: center; }
.row-switches { display: flex; align-items: center; gap: 12px; }
.switch-caption { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; cursor: pointer; }
.notify-panel { padding: 12px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.notify-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notify-head h3 { margin: 0; font-size: 13px; }
.notify-row .switch-caption { font-size: 12px; color: inherit; }
.notify-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.notify-error { color: var(--coral); font-size: 11px; word-break: break-all; }
.switch input { position: absolute; opacity: 0; width: 1px; min-width: 1px; height: 1px; }
.switch span { width: 36px; height: 21px; padding: 3px; border-radius: 12px; background: #b9c0bb; transition: background 140ms ease; }
.switch span::after { content: ""; display: block; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 140ms ease; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(15px); }
#trader-form { padding: 18px; display: grid; grid-template-columns: 1fr 1.25fr auto; align-items: end; gap: 10px; background: #f7f9f7; }
#trader-form h3 { grid-column: 1 / -1; margin: 0 0 2px; font-size: 13px; }
#trader-form input { min-width: 0; width: 100%; }
#smart-cookie-form { padding: 14px 18px 18px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
#smart-cookie-form h3 { margin: 0; font-size: 13px; }
#smart-cookie-form p { margin: 0; }
#smart-cookie-form textarea { width: 100%; min-height: 84px; padding: 8px 10px; resize: vertical; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.cookie-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cookie-ok { color: var(--green); }
.cookie-bad { color: var(--coral); }
.hp-alert-action { margin-left: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: min(380px, calc(100% - 40px)); padding: 11px 14px; color: #fff; background: var(--ink); border-radius: 5px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: 160ms ease; z-index: 50; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--coral); }

.login-page { display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(380px, 100%); }
.login-brand { margin-bottom: 22px; }
.login-brand h1 { font-size: 20px; }
.login-brand p { font-size: 12px; }
.login-form { padding: 20px; display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.login-form input { width: 100%; min-width: 0; }
.login-form .command-button { width: 100%; }
.form-error { min-height: 18px; margin: -2px 0 0; color: var(--coral); font-size: 12px; }
button:disabled { cursor: wait; opacity: 0.62; }

@media (max-width: 980px) {
  .app-header { grid-template-columns: minmax(200px, 1fr) auto; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; height: 48px; order: 3; border-top: 1px solid var(--line); }
  .nav-item { flex: 1; min-width: 0; }
  .status-strip { grid-template-columns: repeat(3, 1fr); }
  .metric { border-top: 1px solid var(--line); }
  .metric:nth-child(-n+3) { border-top: 0; }
  .metric:nth-child(4) { border-left: 0; }
  .time-metric { grid-column: span 2; }
  .split-band { grid-template-columns: 1fr; }
  .decision-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .app-header { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px 0; gap: 10px; min-height: 118px; align-items: center; overflow: hidden; }
  .brand-block h1 { font-size: 14px; }
  .brand-block p { max-width: 175px; }
  .header-actions { gap: 6px; }
  .header-actions .command-button { width: 38px; padding: 0; overflow: hidden; font-size: 0; }
  .header-actions .command-button span { font-size: 20px; }
  .main-nav { margin: 0 -14px; }
  .nav-item { padding: 0 8px; font-size: 12px; }
  .workspace { padding: 14px 12px 36px; }
  .status-strip { grid-template-columns: repeat(2, 1fr); }
  .metric, .metric:nth-child(-n+3) { min-height: 72px; padding: 13px; border-top: 1px solid var(--line); }
  .metric:nth-child(odd) { border-left: 0; }
  .metric:nth-child(-n+2) { border-top: 0; }
  .time-metric { grid-column: span 2; }
  .metric strong { font-size: 19px; }
  .primary-metric strong, .time-metric strong { font-size: 12px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading.compact { flex-direction: row; align-items: center; }
  .segmented { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .segmented button { min-width: 0; padding: 0 6px; font-size: 11px; }
  #consensus-table { min-width: 100%; table-layout: fixed; }
  #consensus-table th:nth-child(3), #consensus-table td:nth-child(3),
  #consensus-table th:nth-child(4), #consensus-table td:nth-child(4),
  #consensus-table th:nth-child(5), #consensus-table td:nth-child(5),
  #consensus-table th:nth-child(6), #consensus-table td:nth-child(6) { display: none; }
  #consensus-table th:first-child, #consensus-table td:first-child { width: 28%; }
  #consensus-table th:nth-child(2), #consensus-table td:nth-child(2) { width: 50%; }
  #consensus-table th:last-child, #consensus-table td:last-child { width: 22%; }
  #consensus-table td { padding: 10px 8px; }
  #consensus-table .trader-chip { padding: 3px 5px; font-size: 10px; }
  #consensus-table .signal-meta { font-size: 9px; }
  .matrix-table.single-trader { min-width: 100%; table-layout: fixed; }
  .matrix-table.single-trader th:first-child { width: 42%; }
  .matrix-table.single-trader .matrix-position {
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr);
  }
  .matrix-table.single-trader .matrix-position .bar { grid-row: 1 / span 2; }
  .matrix-table.single-trader .matrix-position .evidence-tag,
  .matrix-table.single-trader .matrix-position .official-tag {
    grid-column: 2;
    justify-self: start;
  }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar label, .filter-bar input, .filter-bar select, .filter-bar button { width: 100%; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h2 { font-size: 21px; }
  #trader-form { grid-template-columns: 1fr; }
  .trader-row { grid-template-columns: minmax(0, 1fr) auto; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .research-note { align-items: flex-start; flex-direction: column; padding: 11px 14px; gap: 4px; }
  .smart-money-chart-grid { grid-template-columns: 1fr; padding: 10px; }
  .decision-board-summary { grid-template-columns: repeat(2, 1fr); }
  .decision-stat:nth-child(odd) { border-left: 0; }
  .decision-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .decision-member { grid-template-columns: 1fr; gap: 2px; }
  .decision-member small { white-space: normal; }
  .smart-position-grid { grid-template-columns: 1fr; }
  .smart-position-band + .smart-position-band { border-left: 0; border-top: 1px solid var(--line); }
  .smart-position-state { align-items: stretch; flex-direction: column; }
  .smart-position-state > span { justify-content: space-between; padding: 2px 0 8px; border-right: 0; border-bottom: 1px solid rgba(23, 26, 24, .12); }
  .smart-position-state > span:last-child { border-bottom: 0; }
  .smart-money-brief-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 10px; padding: 12px 13px; }
  .smart-money-brief-positions { grid-column: 1 / -1; }
  .smart-money-brief-row > .health-pill { justify-self: end; }
  .smart-position-chip { min-width: 84px; }
  .smart-money-details summary { padding: 11px 13px; }
  .smart-money-chart-card { padding: 12px; }
  .chart-card-head { gap: 6px; }
  .chart-card-head strong { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Claude homepage prototype: dense decision-first ledger. Legacy overview tables remain
   mounted for the existing renderers but are hidden from the primary surface. */
#overview-view > .status-strip,
#overview-view > .data-section,
#overview-view > .split-band { display: none; }
/* ==========================================================================
   首页决策层 —— 移植自 gongshi/homepage-prototype.html
   令牌一律 --h-* 前缀并限定在 #home-prototype 作用域内，
   不影响事件 / 研究 / 采集健康 / 登录页的既有样式。
   ========================================================================== */
body[data-theme="night"] {
  --h-bg:#0b1018; --h-sunken:#070b11; --h-surface:#111823; --h-surface2:#161f2b;
  --h-hover:#1b2532; --h-line:#263243; --h-line-soft:#1b2431;
  --h-fg:#e3e9f0; --h-fg-strong:#f4f7fa; --h-fg-muted:#8494a6; --h-fg-faint:#5d6b7d;
  --h-long:#33c48d; --h-long-dim:#1d6b51; --h-long-wash:rgba(51,196,141,.12);
  --h-short:#f0616d; --h-short-dim:#7a2c36; --h-short-wash:rgba(240,97,109,.12);
  --h-warn:#e5a93f; --h-warn-wash:rgba(229,169,63,.13);
  --h-unknown:#6e7c8d; --h-unknown-wash:rgba(110,124,141,.14);
  --h-accent:#66a8c4; --h-accent-wash:rgba(102,168,196,.14);
  --h-shadow:0 18px 48px rgba(0,0,0,.45);
}
body[data-theme="day"] {
  --h-bg:#f2f4f7; --h-sunken:#e6eaef; --h-surface:#ffffff; --h-surface2:#f7f9fb;
  --h-hover:#eef2f6; --h-line:#d7dde5; --h-line-soft:#e6eaf0;
  --h-fg:#1e2630; --h-fg-strong:#0c1219; --h-fg-muted:#5c6a7a; --h-fg-faint:#8a97a6;
  --h-long:#0b8f62; --h-long-dim:#a6ddc8; --h-long-wash:rgba(11,143,98,.10);
  --h-short:#cf3441; --h-short-dim:#f2bfc4; --h-short-wash:rgba(207,52,65,.09);
  --h-warn:#a9720c; --h-warn-wash:rgba(169,114,12,.12);
  --h-unknown:#6b7987; --h-unknown-wash:rgba(107,121,135,.12);
  --h-accent:#2b6f8d; --h-accent-wash:rgba(43,111,141,.11);
  --h-shadow:0 18px 48px rgba(20,30,45,.18);
}

#home-prototype{
  display:block; color:var(--h-fg); font-size:13px; line-height:1.45;
  font-family:"IBM Plex Sans","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
}
#home-prototype *{box-sizing:border-box}
#home-prototype .mono,#home-prototype .num{
  font-family:"IBM Plex Mono",ui-monospace,SFMono-Regular,"PingFang SC",monospace;
  font-variant-numeric:tabular-nums; letter-spacing:-.01em;
}
#home-prototype button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}
#home-prototype :focus-visible{outline:2px solid var(--h-accent);outline-offset:2px;border-radius:2px}

/* ---- 状态条 ---- */
#home-prototype .hp-statusbar{
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;
  padding:8px 12px;margin-bottom:12px;
  background:var(--h-surface);border:1px solid var(--h-line);border-radius:6px;
}
#home-prototype .hp-facts{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--h-fg-muted)}
#home-prototype .hp-facts b{color:var(--h-fg);font-weight:500}
#home-prototype .hp-pulse{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--h-long);margin-right:5px;vertical-align:1px}
#home-prototype .hp-pulse.is-warn{background:var(--h-warn)}
#home-prototype .ev-dir{font-weight:600}
#home-prototype .ev-dir[data-dir="LONG"]{color:var(--h-long)}
#home-prototype .ev-dir[data-dir="SHORT"]{color:var(--h-short)}
#home-prototype .ev-table tr.is-stale td,#home-prototype .ev-table tr.is-stale .ev-dir{opacity:.62}
#home-prototype .hp-spacer{flex:1 1 auto}
#home-prototype .hp-ghost{border:1px solid var(--h-line);border-radius:3px;padding:3px 9px;font-size:12px;color:var(--h-fg-muted);white-space:nowrap}
#home-prototype .hp-ghost:hover{background:var(--h-hover);color:var(--h-fg)}

/* ---- 异常条 ---- */
#home-prototype .hp-alerts{
  display:flex;gap:18px;flex-wrap:wrap;font-size:12px;color:var(--h-fg);
  padding:7px 12px;margin-bottom:12px;border-radius:4px;
  background:var(--h-warn-wash);border-left:2px solid var(--h-warn);
}
#home-prototype .hp-alerts .dot{color:var(--h-warn);font-weight:600;margin-right:5px}

/* ---- 筛选条 ---- */
#home-prototype .hp-filters{
  display:flex;gap:10px;align-items:center;flex-wrap:wrap;
  padding:9px 12px;background:var(--h-surface);border:1px solid var(--h-line);
  border-radius:6px;margin-bottom:12px;
}
#home-prototype .hp-filters input[type="search"]{
  background:var(--h-sunken);border:1px solid var(--h-line);color:var(--h-fg);
  border-radius:3px;padding:4px 9px;font:inherit;font-size:12px;width:170px;
  font-family:"IBM Plex Mono",ui-monospace,monospace;
}
#home-prototype .hp-chipset{display:inline-flex;gap:5px;flex-wrap:wrap}
#home-prototype .hp-chip{border:1px solid var(--h-line);border-radius:999px;padding:2px 10px;font-size:11.5px;color:var(--h-fg-muted)}
#home-prototype .hp-chip[aria-pressed="true"]{border-color:var(--h-accent);background:var(--h-accent-wash);color:var(--h-fg-strong)}
#home-prototype .hp-count{font-size:11.5px;color:var(--h-fg-faint);font-family:"IBM Plex Mono",ui-monospace,monospace}

/* ---- 面板 ---- */
#home-prototype .hp-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start}
#home-prototype .hp-panel{background:var(--h-surface);border:1px solid var(--h-line);border-radius:6px;overflow:hidden}
#home-prototype .hp-panel + .hp-panel{margin-top:14px}
#home-prototype .hp-panel-head{
  display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
  padding:10px 13px;border-bottom:1px solid var(--h-line-soft);background:var(--h-surface2);
}
#home-prototype .hp-panel-head h2{margin:0;font-size:13px;font-weight:600;color:var(--h-fg-strong)}
#home-prototype .hp-hint{font-size:11.5px;color:var(--h-fg-faint);line-height:1.4}
#home-prototype .hp-seg{display:inline-flex;border:1px solid var(--h-line);border-radius:3px;overflow:hidden}
#home-prototype .hp-seg button{padding:2px 8px;font-size:11.5px;color:var(--h-fg-muted);border-right:1px solid var(--h-line);font-family:"IBM Plex Mono",ui-monospace,monospace}
#home-prototype .hp-seg button:last-child{border-right:none}
#home-prototype .hp-seg button[aria-pressed="true"]{background:var(--h-accent-wash);color:var(--h-fg-strong)}

/* ---- 币种账本 ---- */
#home-prototype .hp-ledger-head,#home-prototype .hp-row{
  display:grid;
  grid-template-columns:106px 80px 80px minmax(200px,1fr) 176px 94px 62px 18px;
  grid-template-areas:"sym status votes people cost pnl time caret";
  gap:10px;align-items:center;
}
#home-prototype .hp-ledger-head{
  padding:7px 13px;border-bottom:1px solid var(--h-line-soft);
  font-size:10.5px;letter-spacing:.09em;color:var(--h-fg-faint);text-transform:uppercase;
}
#home-prototype .hp-group{border-bottom:1px solid var(--h-line-soft)}
#home-prototype .hp-group:last-child{border-bottom:none}
#home-prototype .hp-row{width:100%;text-align:left;padding:10px 13px;border-left:3px solid transparent;cursor:pointer}
#home-prototype .hp-row:hover{background:var(--h-hover)}
#home-prototype .hp-group[data-status="DIVERGENT"] .hp-row{border-left-color:var(--h-warn)}
#home-prototype .hp-group[data-status="DIVERGENT"][data-strong="1"] .hp-row{
  border-left-color:transparent;
  background-image:linear-gradient(var(--h-long) 0 50%,var(--h-short) 50% 100%);
  background-size:3px 100%;background-repeat:no-repeat;background-position:left top;
}
#home-prototype .hp-group[data-status="CONSENSUS_LONG"] .hp-row{border-left-color:var(--h-long-dim)}
#home-prototype .hp-group[data-status="CONSENSUS_SHORT"] .hp-row{border-left-color:var(--h-short-dim)}
#home-prototype .hp-group[data-status="SINGLE"] .hp-row{border-left-color:var(--h-line)}
#home-prototype .hp-group[data-status="ANOMALY"] .hp-row{border-left-color:var(--h-warn)}
#home-prototype .hp-group.is-open .hp-row{background:var(--h-hover)}

#home-prototype .c-sym{grid-area:sym;min-width:0}
#home-prototype .c-sym .ticker{display:block;font-family:"IBM Plex Mono",ui-monospace,monospace;font-weight:600;font-size:13.5px;color:var(--h-fg-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#home-prototype .c-sym .mark-px{display:block;font-size:11px;color:var(--h-fg-faint);font-family:"IBM Plex Mono",ui-monospace,monospace;margin-top:1px}

#home-prototype .c-status{grid-area:status}
#home-prototype .hp-chip-status{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:3px;font-size:11.5px;font-weight:500;white-space:nowrap;border:1px solid transparent}
#home-prototype .hp-chip-status[data-s="CONSENSUS_LONG"]{background:var(--h-long-wash);color:var(--h-long);border-color:var(--h-long-dim)}
#home-prototype .hp-chip-status[data-s="CONSENSUS_SHORT"]{background:var(--h-short-wash);color:var(--h-short);border-color:var(--h-short-dim)}
#home-prototype .hp-chip-status[data-s="DIVERGENT"]{background:var(--h-warn-wash);color:var(--h-warn);border-color:var(--h-warn)}
#home-prototype .hp-chip-status[data-s="SINGLE"]{background:var(--h-surface2);color:var(--h-fg-muted);border-color:var(--h-line)}
#home-prototype .hp-chip-status[data-s="ANOMALY"]{background:var(--h-warn-wash);color:var(--h-warn);border-color:var(--h-warn)}
#home-prototype .split-mark{width:8px;height:8px;border-radius:2px;flex:none;background:linear-gradient(var(--h-long) 0 50%,var(--h-short) 50% 100%)}

#home-prototype .c-votes{grid-area:votes}
#home-prototype .votebar{display:flex;height:6px;border-radius:999px;overflow:hidden;background:var(--h-line-soft)}
#home-prototype .votebar i{display:block;height:100%}
#home-prototype .votebar .l{background:var(--h-long)}
#home-prototype .votebar .s{background:var(--h-short)}
#home-prototype .vote-legend{display:flex;justify-content:space-between;margin-top:4px;font-size:11px;font-family:"IBM Plex Mono",ui-monospace,monospace}
#home-prototype .vote-legend .l{color:var(--h-long)}
#home-prototype .vote-legend .s{color:var(--h-short)}
#home-prototype .vote-legend .none{color:var(--h-fg-faint)}

#home-prototype .c-people{grid-area:people;min-width:0;display:grid;gap:4px;align-content:start;grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
#home-prototype .who{
  display:inline-flex;align-items:center;gap:4px;max-width:100%;min-width:0;
  padding:2px 7px 2px 3px;border-radius:999px;border:1px solid var(--h-line);
  background:var(--h-surface2);font-size:11.5px;color:var(--h-fg);line-height:1.5;
}
#home-prototype .who:hover{border-color:var(--h-accent);background:var(--h-accent-wash)}
#home-prototype .who[data-dir="LONG"]{border-left:2px solid var(--h-long)}
#home-prototype .who[data-dir="SHORT"]{border-left:2px solid var(--h-short)}
#home-prototype .who .src{width:15px;height:15px;border-radius:50%;flex:none;display:grid;place-items:center;font-size:9px;font-weight:600}
#home-prototype .who .src[data-k="TRADER"]{background:var(--h-accent-wash);color:var(--h-accent)}
#home-prototype .who .src[data-k="SMART_MONEY"]{background:var(--h-unknown-wash);color:var(--h-fg-muted)}
#home-prototype .who .nm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1 1 auto}
#home-prototype .ev{font-size:9px;line-height:1;padding:2px 3px;border-radius:2px;flex:none}
#home-prototype .ev[data-e="OFFICIAL"]{background:var(--h-accent-wash);color:var(--h-accent)}
#home-prototype .ev[data-e="INFERRED"]{background:transparent;color:var(--h-fg-faint);border:1px solid var(--h-line)}
#home-prototype .ev[data-e="LAST_KNOWN"],#home-prototype .ev[data-e="DELTA_GAP"]{background:var(--h-warn-wash);color:var(--h-warn)}
#home-prototype .ev[data-e="DELTA"]{background:var(--h-accent-wash);color:var(--h-accent)}
#home-prototype .ev[data-e="SESSION_REQUIRED"],#home-prototype .ev[data-e="HIDDEN"],#home-prototype .ev[data-e="UNKNOWN"]{background:var(--h-unknown-wash);color:var(--h-unknown)}

#home-prototype .c-cost{grid-area:cost;min-width:0}
#home-prototype .cost-avgs{display:flex;gap:10px;font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:12px;line-height:1.3}
#home-prototype .cost-avgs > span{color:var(--h-fg)}
#home-prototype .cost-avgs .lbl{font-size:10.5px;margin-right:2px;color:var(--h-fg-faint)}
#home-prototype .cost-avgs .l .lbl{color:var(--h-long)}
#home-prototype .cost-avgs .s .lbl{color:var(--h-short)}
#home-prototype .track{position:relative;height:16px;margin:3px 0 2px}
#home-prototype .track .base{position:absolute;left:0;right:0;top:7px;height:2px;background:var(--h-line);border-radius:2px}
#home-prototype .track .tick{position:absolute;top:2px;width:2px;height:12px;border-radius:1px;transform:translateX(-1px)}
#home-prototype .track .tick.l{background:var(--h-long)}
#home-prototype .track .tick.s{background:var(--h-short)}
#home-prototype .track .avg{position:absolute;top:0;width:1px;height:16px;transform:translateX(-.5px);opacity:.55}
#home-prototype .track .avg.l{background:var(--h-long)}
#home-prototype .track .avg.s{background:var(--h-short)}
#home-prototype .track .now{position:absolute;top:-1px;width:2px;height:18px;background:var(--h-fg-strong);transform:translateX(-1px)}
#home-prototype .track .now::after{content:"";position:absolute;left:-2px;top:-3px;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid var(--h-fg-strong)}
#home-prototype .cost-range{display:flex;justify-content:space-between;font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:10.5px;color:var(--h-fg-faint)}
#home-prototype .cost-none{font-size:11.5px;color:var(--h-fg-faint)}

#home-prototype .c-pnl{grid-area:pnl;text-align:right}
#home-prototype .c-pnl .v{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
#home-prototype .c-pnl .k{display:block;font-size:10.5px;color:var(--h-fg-faint);margin-top:1px}
#home-prototype .pos{color:var(--h-long)}
#home-prototype .neg{color:var(--h-short)}
#home-prototype .zero{color:var(--h-fg-muted)}
#home-prototype .unk{color:var(--h-unknown)}

#home-prototype .c-time{grid-area:time;text-align:right;font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:11.5px;color:var(--h-fg-muted);white-space:nowrap}
#home-prototype .c-time .act{display:block;font-size:10.5px;color:var(--h-fg-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:inherit}
#home-prototype .c-caret{grid-area:caret;color:var(--h-fg-faint);transition:transform .15s ease;text-align:center}
#home-prototype .hp-group.is-open .c-caret{transform:rotate(90deg);color:var(--h-fg)}

/* ---- 展开证据 ---- */
#home-prototype .evidence{padding:0 13px 13px;background:var(--h-sunken)}
#home-prototype .evidence-scroll{overflow-x:auto}
#home-prototype table.ev-table{border-collapse:collapse;width:100%;min-width:620px;font-size:11.5px}
#home-prototype table.ev-table th{text-align:left;font-weight:500;color:var(--h-fg-faint);font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;padding:8px 8px 6px;border-bottom:1px solid var(--h-line);white-space:nowrap;background:transparent}
#home-prototype table.ev-table td{padding:7px 8px;border-bottom:1px solid var(--h-line-soft);white-space:nowrap}
#home-prototype table.ev-table tr:last-child td{border-bottom:none}
#home-prototype table.ev-table .r{text-align:right;font-family:"IBM Plex Mono",ui-monospace,monospace;font-variant-numeric:tabular-nums}
#home-prototype .ev-note{margin-top:10px;padding:7px 9px;border-radius:3px;background:var(--h-warn-wash);color:var(--h-fg);font-size:11.5px;border-left:2px solid var(--h-warn)}
#home-prototype .ev-sub{margin:12px 0 6px;font-size:11px;color:var(--h-fg-faint);letter-spacing:.06em;text-transform:uppercase}

/* ---- 开仓信号共识 ---- */
#home-prototype .signal{padding:11px 13px;border-bottom:1px solid var(--h-line-soft)}
#home-prototype .signal:last-child{border-bottom:none}
#home-prototype .signal-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#home-prototype .signal-top .tk{font-family:"IBM Plex Mono",ui-monospace,monospace;font-weight:600;font-size:13px;color:var(--h-fg-strong)}
#home-prototype .dir-tag{padding:1px 7px;border-radius:3px;font-size:11.5px;font-weight:500}
#home-prototype .dir-tag[data-d="LONG"]{background:var(--h-long-wash);color:var(--h-long)}
#home-prototype .dir-tag[data-d="SHORT"]{background:var(--h-short-wash);color:var(--h-short)}
#home-prototype .signal-meta{margin-top:5px;font-size:11.5px;color:var(--h-fg-muted);display:flex;gap:14px;flex-wrap:wrap}
#home-prototype .horizons{display:flex;gap:6px;margin-top:9px;flex-wrap:wrap}
#home-prototype .hz{flex:1 1 74px;min-width:70px;padding:5px 7px;border:1px solid var(--h-line);border-radius:3px;background:var(--h-surface2)}
#home-prototype .hz .h{font-size:10px;color:var(--h-fg-faint);letter-spacing:.05em}
#home-prototype .hz .v{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:12.5px;display:block;margin-top:1px}

/* ---- 时间线 ---- */
#home-prototype .tl-item{display:grid;grid-template-columns:52px minmax(0,1fr);gap:10px;padding:9px 13px;border-bottom:1px solid var(--h-line-soft)}
#home-prototype .tl-item:last-child{border-bottom:none}
#home-prototype .tl-when{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:11px;color:var(--h-fg-faint);text-align:right;padding-top:1px;white-space:nowrap}
#home-prototype .tl-body{min-width:0}
#home-prototype .tl-line1{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#home-prototype .tl-line1 .tk{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:12.5px;font-weight:600;color:var(--h-fg-strong)}
#home-prototype .act-tag{padding:1px 6px;border-radius:3px;font-size:11px;font-weight:500;white-space:nowrap}
#home-prototype .act-tag[data-a="OPEN_LONG"]{background:var(--h-long-wash);color:var(--h-long)}
#home-prototype .act-tag[data-a="OPEN_SHORT"]{background:var(--h-short-wash);color:var(--h-short)}
#home-prototype .act-tag[data-a="CLOSE"],#home-prototype .act-tag[data-a="ADD"],#home-prototype .act-tag[data-a="REDUCE"]{background:var(--h-surface2);color:var(--h-fg-muted);border:1px solid var(--h-line)}
#home-prototype .act-tag[data-a="REVERSE"],#home-prototype .act-tag[data-a="GAP"]{background:var(--h-warn-wash);color:var(--h-warn)}
#home-prototype .tl-line2{font-size:11.5px;color:var(--h-fg-muted);margin-top:2px;font-family:"IBM Plex Mono",ui-monospace,monospace;overflow-wrap:anywhere}
#home-prototype .tl-line3{font-size:10.5px;color:var(--h-fg-faint);margin-top:2px}
#home-prototype .tl-item.is-flash{animation:hpFlash 1.5s ease-out}
@keyframes hpFlash{0%{background:var(--h-accent-wash)}100%{background:transparent}}

/* ---- 参与者 ---- */
#home-prototype .person{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:10px 13px;border-bottom:1px solid var(--h-line-soft);text-align:left;width:100%}
#home-prototype .person:last-child{border-bottom:none}
#home-prototype .person:hover{background:var(--h-hover)}
#home-prototype .person-name{display:flex;align-items:center;gap:6px;min-width:0}
#home-prototype .person-name .nm{font-weight:500;color:var(--h-fg-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#home-prototype .person-bias{justify-self:end;font-size:11.5px;font-family:"IBM Plex Mono",ui-monospace,monospace;white-space:nowrap}
#home-prototype .person-stats{grid-column:1/-1;display:flex;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--h-fg-faint);margin-top:1px}
#home-prototype .person-stats b{font-family:"IBM Plex Mono",ui-monospace,monospace;font-weight:500;font-variant-numeric:tabular-nums}
#home-prototype .hp-avatar{width:16px;height:16px;border-radius:50%;display:grid;place-items:center;font-size:9px;flex:none}
#home-prototype .hp-avatar[data-k="TRADER"]{background:var(--h-accent-wash);color:var(--h-accent)}
#home-prototype .hp-avatar[data-k="SMART_MONEY"]{background:var(--h-unknown-wash);color:var(--h-fg-muted)}

#home-prototype .hp-empty{padding:26px 13px;text-align:center;color:var(--h-fg-faint);font-size:12px}
#home-prototype .hp-footnote{margin-top:16px;font-size:11.5px;color:var(--h-fg-faint);line-height:1.7;max-width:74ch}

/* ---- 折叠区 ---- */
#home-prototype details.hp-fold{background:var(--h-surface);border:1px solid var(--h-line);border-radius:6px;margin-top:14px}
#home-prototype details.hp-fold > summary{list-style:none;cursor:pointer;padding:10px 13px;display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--h-fg-muted)}
#home-prototype details.hp-fold > summary::-webkit-details-marker{display:none}
#home-prototype details.hp-fold > summary::before{content:"▸";color:var(--h-fg-faint);font-size:11px}
#home-prototype details.hp-fold[open] > summary{border-bottom:1px solid var(--h-line-soft);color:var(--h-fg)}
#home-prototype details.hp-fold[open] > summary::before{content:"▾"}
#home-prototype .hp-fold-body{padding:12px 13px}

/* ---- 响应式 ---- */
@media (max-width:1150px){ #home-prototype .hp-layout{grid-template-columns:minmax(0,1fr)} }
@media (max-width:860px){
  #home-prototype .hp-ledger-head{display:none}
  #home-prototype .hp-row{
    grid-template-columns:minmax(0,1fr) auto auto;
    grid-template-areas:
      "sym    status caret"
      "votes  votes  time"
      "people people people"
      "cost   cost   cost"
      "pnl    pnl    pnl";
    gap:7px 10px;padding:12px;
  }
  #home-prototype .c-pnl{text-align:left;display:flex;align-items:baseline;gap:8px}
  #home-prototype .c-pnl .k{margin-top:0}
  #home-prototype .hp-filters input[type="search"]{width:100%}
}
@media (prefers-reduced-motion:reduce){ #home-prototype *{animation:none!important;transition:none!important} }

/* ==========================================================================
   新动作条幅 · 跟进图层 · 语音设置
   ========================================================================== */
.hp-banner{
  position:fixed;left:50%;transform:translateX(-50%);bottom:18px;z-index:60;
  display:flex;align-items:center;gap:9px;max-width:calc(100vw - 32px);
  padding:8px 12px;border-radius:999px;font-size:12.5px;
  background:var(--h-surface);color:var(--h-fg);
  border:1px solid var(--h-accent);box-shadow:var(--h-shadow);
}
.hp-banner-dot{width:6px;height:6px;border-radius:50%;background:var(--h-accent);flex:none}
.hp-banner-link{color:var(--h-accent);text-decoration:underline;font-size:12.5px;background:none;border:none;cursor:pointer}
.hp-banner-x{color:var(--h-fg-faint);font-size:16px;line-height:1;padding:0 2px;background:none;border:none;cursor:pointer}

.hp-scrim{position:fixed;inset:0;background:rgba(3,6,10,.55);z-index:70}
body[data-theme="day"] .hp-scrim{background:rgba(20,30,45,.35)}
.hp-card{
  position:fixed;z-index:71;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(500px,calc(100vw - 32px));max-height:calc(100vh - 48px);
  background:var(--h-surface);border:1px solid var(--h-line);border-radius:6px;
  display:flex;flex-direction:column;overflow:hidden;box-shadow:var(--h-shadow);
  font-family:"IBM Plex Sans","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size:13px;color:var(--h-fg);
}
.hp-card-head{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--h-line-soft);background:var(--h-surface2)}
.hp-card-head .tk{font-family:"IBM Plex Mono",ui-monospace,monospace;font-weight:600;font-size:15px;color:var(--h-fg-strong)}
.hp-pager{margin-left:auto;font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:11px;color:var(--h-fg-faint)}
.hp-card-body{overflow-y:auto}
.hp-card-sec{padding:12px 14px;border-bottom:1px solid var(--h-line-soft)}
.hp-card-sec h4{margin:0 0 9px;font-size:10px;letter-spacing:.09em;text-transform:uppercase;color:var(--h-fg-faint);font-weight:600}
.hp-kv{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
.hp-kv .k{font-size:10.5px;color:var(--h-fg-faint)}
.hp-kv .v{font-family:"IBM Plex Mono",ui-monospace,monospace;font-variant-numeric:tabular-nums;font-size:13px;margin-top:1px;overflow-wrap:anywhere}
.hp-kv .wide{grid-column:1/-1}
.hp-chase{background:var(--h-sunken);border-bottom:none}
.hp-chase-top{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.hp-chase-delta{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:26px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.1}
.hp-chase-delta.pos{color:var(--h-long)} .hp-chase-delta.neg{color:var(--h-short)}
.hp-chase-delta.zero{color:var(--h-fg-muted)} .hp-chase-delta.unk{color:var(--h-unknown)}
.hp-chase-label{font-size:11.5px;color:var(--h-fg-muted)}
.hp-chase-now{margin-top:8px;display:flex;gap:14px;flex-wrap:wrap;font-size:11.5px;color:var(--h-fg-muted)}
.hp-chase-now b{font-family:"IBM Plex Mono",ui-monospace,monospace;font-weight:500;color:var(--h-fg)}
.hp-chase-verdict{margin-top:9px;padding:7px 9px;border-radius:3px;font-size:12px;background:var(--h-surface);border-left:2px solid var(--h-line)}
.hp-chase-age{font-size:10.5px;color:var(--h-fg-faint);margin-top:6px;line-height:1.6}
.hp-card-foot{display:flex;align-items:center;gap:8px;padding:11px 14px;border-top:1px solid var(--h-line-soft);background:var(--h-surface2);flex-wrap:wrap}
.hp-card-foot .hp-spacer{flex:1 1 auto}
.hp-card-nav{display:flex;gap:5px}
.hp-primary{background:var(--h-accent-wash);border:1px solid var(--h-accent);color:var(--h-fg-strong);border-radius:3px;padding:5px 14px;font-size:12.5px;cursor:pointer}
.hp-card .hp-ghost{border:1px solid var(--h-line);border-radius:3px;padding:4px 10px;font-size:12px;color:var(--h-fg-muted);background:none;cursor:pointer}
.hp-card .hp-ghost:disabled{opacity:.4;cursor:not-allowed}
.hp-vrow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--h-line-soft);font-size:12px}
.hp-vrow:last-child{border-bottom:none}
.hp-vrow .sub{display:block;font-size:10.5px;color:var(--h-fg-faint);margin-top:1px}
.hp-vrow select{background:var(--h-sunken);border:1px solid var(--h-line);color:var(--h-fg);border-radius:3px;padding:3px 6px;font-size:11.5px;max-width:170px}
.hp-vrow input[type="range"]{accent-color:var(--h-accent);width:130px}
.hp-vlog{max-height:200px;overflow-y:auto}
.hp-vlog-item{padding:6px 0;border-bottom:1px solid var(--h-line-soft);font-size:11.5px;color:var(--h-fg-muted);line-height:1.6}
.hp-vlog-item:last-child{border-bottom:none}
.hp-vlog-item .t{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:10.5px;color:var(--h-fg-faint);margin-right:6px}
.hp-lvl{font-size:9.5px;padding:1px 4px;border-radius:2px;margin-right:5px}
.hp-lvl[data-l="L1"]{background:var(--h-short-wash);color:var(--h-short)}
.hp-lvl[data-l="L2"]{background:var(--h-accent-wash);color:var(--h-accent)}
.hp-lvl[data-l="L3"]{background:var(--h-unknown-wash);color:var(--h-unknown)}
.hp-lvl[data-l="STATUS"]{background:var(--h-warn-wash);color:var(--h-warn)}
.hp-card .ev-note{margin-top:10px;padding:7px 9px;border-radius:3px;background:var(--h-warn-wash);font-size:11.5px;border-left:2px solid var(--h-warn);line-height:1.6}
@media (max-width:520px){
  .hp-card{left:0;top:auto;bottom:0;transform:none;width:100%;max-height:92%;border-radius:6px 6px 0 0;padding-bottom:env(safe-area-inset-bottom,0px)}
  .hp-kv{grid-template-columns:1fr}
  .hp-banner{bottom:10px}
}

/* CSP 为 style-src 'self'：内联 style 属性被拦截，以下类替代原内联样式 */
#home-prototype .hp-alerts[hidden]{display:none!important}
#home-prototype .muted{color:var(--h-fg-muted)}
#home-prototype .warn{color:var(--h-warn)}
#home-prototype .sig-count{font-size:11.5px;color:var(--h-fg-muted)}
#home-prototype .ev-note-gap{margin-top:10px}
#home-prototype .hp-people-note{padding:9px 13px;border-top:1px solid var(--h-line-soft)}
#home-prototype .hp-footnote-flush{margin:0}
.hp-card .ev-note-gap{margin-top:10px}
#home-prototype .hp-chip-status[data-s="HEDGED"]{background:var(--h-unknown-wash);color:var(--h-fg-muted);border-color:var(--h-line)}
#home-prototype .hp-group[data-status="HEDGED"] .hp-row{border-left-color:var(--h-line)}

/* ==========================================================================
   历史记录与收益统计页
   ========================================================================== */
.hist{display:block;color:var(--h-fg);font-size:13px;
  font-family:"IBM Plex Sans","PingFang SC","Microsoft YaHei",system-ui,sans-serif}
.hist .hp-spacer{flex:1 1 auto}
.hist-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:9px 12px;background:var(--h-surface);border:1px solid var(--h-line);border-radius:6px}
.hist-people{display:flex;gap:5px;flex-wrap:wrap}
.hist-person{display:inline-flex;align-items:center;gap:5px;padding:3px 10px 3px 4px;
  border:1px solid var(--h-line);border-radius:999px;background:var(--h-surface2);
  font-size:12px;color:var(--h-fg-muted);cursor:pointer}
.hist-person[aria-pressed="true"]{border-color:var(--h-accent);background:var(--h-accent-wash);color:var(--h-fg-strong)}
.hist-person .src{width:16px;height:16px;border-radius:50%;display:grid;place-items:center;font-size:9px;flex:none}
.hist-person .src[data-k="TRADER"]{background:var(--h-accent-wash);color:var(--h-accent)}
.hist-person .src[data-k="SMART_MONEY"]{background:var(--h-unknown-wash);color:var(--h-fg-muted)}
.hist .hp-seg button.active{background:var(--h-accent-wash);color:var(--h-fg-strong)}
.hist-scope{margin:10px 0 0;font-size:11.5px;color:var(--h-fg-faint);line-height:1.7}
.hist-coverage{margin-top:10px;padding:8px 10px;border-radius:4px;font-size:12px;
  background:var(--h-warn-wash);border-left:2px solid var(--h-warn);color:var(--h-fg);line-height:1.6}
.hist-metrics{display:grid;gap:10px;margin-top:12px;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.hist-metric{background:var(--h-surface);border:1px solid var(--h-line);border-radius:6px;padding:10px 12px}
.hist-metric .k{font-size:10.5px;color:var(--h-fg-faint);letter-spacing:.04em}
.hist-metric .v{font-family:"IBM Plex Mono",ui-monospace,monospace;font-variant-numeric:tabular-nums;
  font-size:18px;margin-top:3px;line-height:1.2;overflow-wrap:anywhere}
.hist-metric .n{font-size:10.5px;color:var(--h-fg-faint);margin-top:3px;line-height:1.5}
.hist-metric .v.pos{color:var(--h-long)} .hist-metric .v.neg{color:var(--h-short)}
.hist-metric .v.unk{color:var(--h-unknown);font-size:15px}
.hist-panel{margin-top:14px}
.hist-curve{padding:12px 13px}
.hist-curve svg{display:block;width:100%;height:auto;max-width:100%}
.hist-curve .grid{stroke:var(--h-line-soft);stroke-width:1}
.hist-curve .zero{stroke:var(--h-line);stroke-width:1;stroke-dasharray:3 3}
.hist-curve .step{fill:none;stroke:var(--h-accent);stroke-width:2;stroke-linejoin:round}
.hist-curve .dot{fill:var(--h-accent)}
.hist-curve .end{fill:var(--h-fg-strong)}
.hist-curve .lbl{fill:var(--h-fg-faint);font-size:10px;
  font-family:"IBM Plex Mono",ui-monospace,monospace}
.hist-curve .init{stroke:var(--h-warn);stroke-width:1;stroke-dasharray:4 3}
.hist-curve .init-lbl{fill:var(--h-warn);font-size:10px}
#history-table .r,#history-crossing-table .r{text-align:right}
.hist .ev-table td,.hist .ev-table th{white-space:nowrap}
/* 空态是整句话，nowrap 会把表格撑出屏幕 */
.hist .ev-table td.hist-empty{white-space:normal;min-width:0}
.hist-empty{padding:26px 13px;text-align:center;color:var(--h-fg-faint);font-size:12px;line-height:1.8}
.hist-tag{font-size:9.5px;padding:1px 4px;border-radius:2px;margin-left:5px}
.hist-tag[data-t="LOW"]{background:var(--h-warn-wash);color:var(--h-warn)}
@media (max-width:620px){
  .hist-metrics{grid-template-columns:1fr 1fr}
  .hist-bar{gap:8px}
}

/* .evidence-scroll 原先只在 #home-prototype 作用域内生效，历史页的宽表格因此
   撑破视口。它本就是个工具类，这里提到全局，宽表格只在自己的容器里横向滚动。 */
.evidence-scroll{overflow-x:auto;max-width:100%}

/* 单人持仓：完整可查，但不占首屏决策区的视觉权重 */
#home-prototype .hp-singles{border-top:1px solid var(--h-line-soft)}
#home-prototype .hp-singles > summary{
  list-style:none;cursor:pointer;padding:9px 13px;display:flex;align-items:center;gap:8px;
  font-size:12.5px;color:var(--h-fg-muted);background:var(--h-surface2);
}
#home-prototype .hp-singles > summary::-webkit-details-marker{display:none}
#home-prototype .hp-singles > summary::before{content:"▸";color:var(--h-fg-faint);font-size:11px}
#home-prototype .hp-singles[open] > summary::before{content:"▾"}
#home-prototype .hp-singles > summary:hover{background:var(--h-hover);color:var(--h-fg)}
#home-prototype .hp-singles-total{margin-left:auto;font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-variant-numeric:tabular-nums;font-size:12px}

/* 参与者可点击 */
#home-prototype .who.is-clickable{cursor:pointer}
#home-prototype .person.is-clickable{cursor:pointer}
.hp-card-wide{width:min(620px,calc(100vw - 32px))}
.hp-card-head .hp-avatar{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:10px;flex:none}
.hp-card-head .hp-avatar[data-k="TRADER"]{background:var(--h-accent-wash);color:var(--h-accent)}
.hp-card-head .hp-avatar[data-k="SMART_MONEY"]{background:var(--h-unknown-wash);color:var(--h-fg-muted)}
.hp-act-line{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;padding:5px 0;
  border-bottom:1px solid var(--h-line-soft);font-size:11.5px}
.hp-act-line:last-child{border-bottom:none}
.hp-act-line .t{color:var(--h-fg-faint);min-width:64px}
.hp-act-line .tk{color:var(--h-fg-strong);font-weight:600}
.hp-act-line .d{color:var(--h-fg-muted);overflow-wrap:anywhere}
.hp-card .hist-tag{font-size:9.5px;padding:1px 4px;border-radius:2px;margin-left:5px;
  background:var(--h-warn-wash);color:var(--h-warn)}

/* 历史页：排序、展开成交明细、曲线悬停 */
.hist-sort{background:none;border:none;color:inherit;font:inherit;cursor:pointer;padding:0;
  letter-spacing:inherit;text-transform:inherit}
.hist-sort:hover{color:var(--h-fg)}
.hist-sort.is-active{color:var(--h-accent)}
.hist-row.is-expandable{cursor:pointer}
.hist-row.is-expandable:hover td{background:var(--h-hover)}
.hist-caret{display:inline-block;width:12px;color:var(--h-fg-faint)}
.hist-fills td{padding:0!important;background:var(--h-sunken)}
.hist-fills-body{padding:10px 12px}
.hist-fills-head{font-size:11px;color:var(--h-fg-faint);margin-bottom:7px}
.hist-fills-table{min-width:560px}
.hist-fills-table th{font-size:10px}
.hist-curve .dot{fill:var(--h-accent);fill-opacity:.55;cursor:help}
.hist-curve .dot:hover{fill-opacity:1}

/* flex 子元素默认 min-width:auto，会拒绝收缩到内容宽度以下，
   导致抽屉里的宽表格被裁掉而不是横向滚动 */
.hp-card-body,.hp-card-sec{min-width:0}
.hp-card .evidence-scroll{max-width:100%;overflow-x:auto}
.hp-card .ev-table{min-width:520px}
.hp-card-wide{width:min(720px,calc(100vw - 32px))}

/* 合并后的多合约标记 */
#home-prototype .hp-multi{
  display:inline-block;margin-left:5px;padding:0 4px;border-radius:2px;
  font-size:9.5px;font-family:var(--h-sans,inherit);vertical-align:2px;
  background:var(--h-unknown-wash);color:var(--h-fg-muted);
}
#home-prototype .hp-contract{
  margin-left:6px;font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:10px;color:var(--h-fg-faint);
}

/* 现价是判断所有成本的参照点，本该是行里的锚。
   但绿/红/黄/灰在这套设计里是语义色（多/空/警告/未知），现价不能去抢，
   否则会被误读成方向。所以只用亮度与字重做层级，不引入新颜色。 */
#home-prototype .c-sym .mark-px{
  display:flex;align-items:baseline;gap:5px;margin-top:2px;
  font-size:11.5px;color:var(--h-fg-faint);
}
#home-prototype .c-sym .mark-px i{font-style:normal;font-size:10.5px;letter-spacing:.02em}
#home-prototype .c-sym .mark-px b{
  font-family:"IBM Plex Mono",ui-monospace,monospace;font-variant-numeric:tabular-nums;
  font-weight:600;font-size:12.5px;color:var(--h-fg-strong);letter-spacing:-.01em;
}
#home-prototype .c-sym .mark-px u{text-decoration:none;color:var(--h-unknown);font-size:12px}

/* 轨上的现价标记：在绿红刻度之间容易被淹没，加一圈与底色同色的描边把它衬出来 */
#home-prototype .track .now{
  width:3px;box-shadow:0 0 0 1.5px var(--h-surface);border-radius:1px;
}
#home-prototype .hp-group.is-open .track .now,
#home-prototype .hp-row:hover .track .now{box-shadow:0 0 0 1.5px var(--h-hover)}
#home-prototype .track .now::after{
  left:-2.5px;top:-4px;
  border-left:4px solid transparent;border-right:4px solid transparent;
  border-top:5px solid var(--h-fg-strong);
}



/* 新版本提示：状态栏里的一行字，不浮在内容上，因此不需要关闭 */
#home-prototype .hp-newver{
  border:1px solid var(--h-warn);border-radius:3px;padding:1px 8px;
  font-size:11.5px;color:var(--h-warn);background:var(--h-warn-wash);cursor:pointer;
}
#home-prototype .hp-newver:hover{background:color-mix(in srgb,var(--h-warn) 22%,transparent)}

/* hidden 属性靠 UA 样式的 [hidden]{display:none} 生效，任何类选择器里的
   display 都会盖过它 —— 元素被正确标记为隐藏，却照样画在屏幕上。
   凡是自带 display 又会被 JS 用 hidden 开关的元素，都必须显式兜住。 */
.hp-banner[hidden],
.hp-update[hidden],
#home-prototype .hp-alerts[hidden],
#home-prototype .hp-singles[hidden],
.hist-coverage[hidden],
[hidden]{display:none!important}

/* 最后已知（来源未确认为当前）的仓位与参与者：置灰，不计入共识 */
#home-prototype .who.is-stale,
#home-prototype .person.is-stale .person-stats,
#home-prototype .ev-table tr.is-stale,
.hp-card .ev-table tr.is-stale{opacity:.55}
#home-prototype .hp-chip-status[data-s="DUST"],
#home-prototype .hp-chip-status[data-s="UNKNOWN"]{background:var(--h-unknown-wash);color:var(--h-fg-muted);border-color:var(--h-line)}
#home-prototype .hp-group[data-status="DUST"] .hp-row,
#home-prototype .hp-group[data-status="UNKNOWN"] .hp-row{border-left-color:var(--h-line)}
