:root {
  color-scheme: dark;
  --bg: #0b111c;
  --panel: #121c2b;
  --border: #29364a;
  --text: #e9eff7;
  --muted: #a2b0c2;
  --green: #65dbad;
  --amber: #ffc971;
  --red: #ff969a;
  --blue: #a7caff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.65; }
button { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
.wrap { max-width: 1420px; margin: 0 auto; padding: 40px 32px 25px; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { color: var(--blue); font-size: 10px; letter-spacing: .16em; font-weight: 750; margin-bottom: 8px; }
h1 { font-size: clamp(26px, 3vw, 35px); line-height: 1.3; letter-spacing: -.045em; margin-bottom: 8px; }
.title-divider { color: #64758f; font-weight: 350; margin: 0 3px; }
.subtitle { margin: 0; color: var(--muted); font-size: 12px; }
.connection { text-align: right; flex-shrink: 0; }
.connection p { margin: 5px 0 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 30px; padding: 4px 10px; color: var(--muted); background: #a2b0c20c; font-size: 11px; font-weight: 650; white-space: nowrap; }
.pill::before { content: ""; width: 5px; height: 5px; flex: none; border-radius: 50%; background: currentColor; }
[data-tone="good"] { color: var(--green); }
.pill[data-tone="good"] { background: #65dbad10; border-color: #65dbad40; }
[data-tone="warn"] { color: var(--amber); }
.pill[data-tone="warn"] { background: #ffc97110; border-color: #ffc97140; }
[data-tone="bad"] { color: var(--red); }
.pill[data-tone="bad"] { background: #ff969a10; border-color: #ff969a40; }
[data-tone="neutral"] { color: var(--muted); }
.notice { display: flex; gap: 12px; padding: 15px 18px; margin-bottom: 29px; background: #132034; border: 1px solid #33475f; border-radius: 12px; }
.notice[data-tone="bad"] { background: #2b1c26; border-color: #ff969a55; }
.notice[data-tone="warn"] { background: #2c261b; border-color: #ffc97145; }
.notice-mark { display: grid; place-content: center; flex: none; width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 7px; font-size: 12px; font-weight: 700; margin-top: 2px; }
.notice strong { font-size: 13px; }
.notice p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
h2 { font-size: 17px; margin-bottom: 3px; letter-spacing: -.015em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.section-note { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.status-grid, .pnl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 15px; min-width: 0; }
.status-card { padding: 19px 20px 16px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h3 { font-size: 12px; color: var(--muted); font-weight: 550; margin: 0; }
.index-mark { color: #8296b0; font-size: 10px; letter-spacing: .08em; border: 1px solid #354257; border-radius: 5px; padding: 0 5px; }
.status-value { font-size: 20px; font-weight: 650; margin: 12px 0 6px; line-height: 1.45; }
.detail { color: var(--muted); font-size: 11px; min-height: 38px; margin-bottom: 15px; }
.fact { border-top: 1px solid var(--border); padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.counts-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 16px 0 0; background: #0f1826; border: 1px solid var(--border); border-radius: 12px; }
.counts-strip > div { padding: 14px 20px; }
.counts-strip > div + div { border-left: 1px solid var(--border); }
.counts-strip dt { font-size: 10px; color: var(--muted); }
.counts-strip dd { font-size: 22px; margin: 1px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.scope-note { color: var(--muted); margin: 8px 1px 26px; font-size: 10px; }
.pnl-heading { flex-wrap: wrap; }
.periods { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.periods button { background: transparent; border: 0; border-radius: 6px; padding: 7px 16px; color: var(--muted); font-size: 12px; cursor: pointer; min-height: 34px; }
.periods button[aria-pressed="true"] { background: #294360; color: var(--text); }
.periods button:hover { color: var(--text); }
button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.metric { padding: 19px 20px; }
.metric h3 { display: flex; justify-content: space-between; gap: 8px; }
.metric h3 span { color: #7f91aa; font-size: 10px; }
.primary-metric { border-color: #365272; background: #152238; }
.pnl-value { margin: 5px 0 7px; font-size: clamp(24px, 2.5vw, 33px); font-weight: 650; line-height: 1.4; font-variant-numeric: tabular-nums; letter-spacing: -.025em; overflow-wrap: anywhere; }
.metric small { color: var(--muted); font-size: 10px; line-height: 1.6; display: block; }
[data-sign="positive"] { color: var(--green); }
[data-sign="negative"] { color: var(--red); }
.pnl-message { margin: 10px 1px 24px; color: var(--muted); font-size: 11px; }
.history { margin-bottom: 18px; overflow: hidden; }
.table-heading { padding: 20px 22px 15px; margin: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
th, td { border-top: 1px solid var(--border); padding: 12px 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { color: #a1b1c7; background: #162235; font-size: 10px; font-weight: 550; }
td { color: #d7e0ec; }
tbody tr:hover { background: #a7caff04; }
td .subline { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
td.empty { text-align: center; padding: 30px 20px; white-space: normal; color: var(--muted); font-size: 12px; }
.notes { padding: 5px 1px 0; }
.notes h2 { font-size: 12px; margin-bottom: 7px; }
.notes ul { padding-left: 18px; margin: 0; color: var(--muted); font-size: 11px; }
.notes li + li { margin-top: 4px; }
footer { display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--border); padding-top: 17px; margin-top: 22px; color: #7f90a8; font-size: 9px; letter-spacing: .03em; }
.noscript { padding: 14px; color: var(--red); border: 1px solid var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html[data-fresh="false"] .status-card [data-tone],
html[data-fresh="false"] .pnl-value,
html[data-fresh="false"] td[data-sign],
html[data-fresh="false"] .counts-strip dd { color: var(--muted); }
html[data-fresh="false"] .status-card .pill { background: #a2b0c20c; border-color: var(--border); }
@media (max-width: 1040px) {
  .status-grid, .pnl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap { padding: 28px 22px; }
  .detail { min-height: 0; }
}
@media (max-width: 650px) {
  .wrap { padding: 24px 16px; }
  .header { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 18px; }
  .connection { text-align: left; }
  h1 { font-size: 27px; }
  .notice { padding: 13px; margin-bottom: 23px; }
  .section-heading { align-items: flex-start; }
  .section-heading > .section-note { font-size: 10px; max-width: 105px; text-align: right; }
  .status-grid, .pnl-grid { gap: 10px; }
  .status-card, .metric { padding: 14px 13px; }
  .status-value { font-size: 18px; margin-top: 10px; }
  .detail { min-height: 53px; font-size: 10px; }
  .fact { flex-wrap: wrap; gap: 5px; font-size: 10px; }
  .pill { font-size: 10px; padding: 3px 8px; }
  .counts-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .counts-strip > div { padding: 10px 13px; }
  .counts-strip > div:nth-child(4) { border-left: 0; }
  .counts-strip > div:nth-child(n+4) { border-top: 1px solid var(--border); }
  .counts-strip dd { font-size: 21px; }
  .pnl-heading { gap: 12px; }
  .periods { width: 100%; }
  .periods button { flex: 1; min-height: 38px; }
  .pnl-value { font-size: 26px; }
  .metric small { min-height: 32px; }
  .table-heading { padding: 17px 15px; }
  .responsive-table, .responsive-table tbody { display: block; }
  .responsive-table thead { display: none; }
  .responsive-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px 15px; gap: 9px 15px; border-top: 1px solid var(--border); }
  .responsive-table td { display: block; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .responsive-table td::before { content: attr(data-label); display: block; color: #8fa1b9; font-size: 9px; margin-bottom: 2px; }
  .daily-table td:first-child { grid-column: 1 / -1; font-size: 14px; font-weight: 600; }
  .trade-table td:first-child { font-size: 13px; font-weight: 600; }
  .responsive-table td.empty { grid-column: 1 / -1; padding: 15px 0; }
  .responsive-table td.empty::before { display: none; }
  footer { flex-direction: column; gap: 3px; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .12s, color .12s; }
}
