:root {
  color-scheme: dark;
  --board-bg: #0b0b0d;
  --board-panel: #121215;
  --board-panel-soft: #17171b;
  --board-ink: #f4f1ef;
  --board-muted: #96949a;
  --board-line: #2b292e;
  --board-accent: #ef4147;
  --board-accent-soft: rgba(239, 65, 71, .13);
  --board-warm: #e8a18b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--board-ink); background: var(--board-bg); font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body::before { position: fixed; inset: 0; z-index: -1; content: ""; pointer-events: none; background: radial-gradient(ellipse 45rem 27rem at 85% -8%, rgba(139, 23, 32, .2), transparent 80%), linear-gradient(90deg, transparent 49.9%, rgba(255, 255, 255, .012) 50%, transparent 50.1%); }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }
.board-shell { width: min(1360px, calc(100% - 64px)); margin: 0 auto; }
.board-topbar { display: flex; justify-content: space-between; align-items: center; gap: 28px; min-height: 84px; border-bottom: 1px solid var(--board-line); }
.board-brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; color: var(--board-ink); text-decoration: none; }
.board-brand img { display: block; width: 38px; height: 38px; }
.board-brand-wordmark { display: flex; align-items: baseline; font-size: 16px; line-height: 1; letter-spacing: -.06em; }
.board-brand-wordmark strong { font-weight: 800; }
.board-brand-wordmark span { margin-left: 2px; color: #aaa5a6; font-weight: 600; }
.board-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; align-items: center; }
.board-nav a { padding: 10px 0; border-bottom: 2px solid transparent; color: var(--board-muted); font-size: 12px; font-weight: 600; text-decoration: none; transition: color .18s, border-color .18s; }
.board-nav a:hover, .board-nav a[aria-current="page"] { border-bottom-color: var(--board-accent); color: var(--board-ink); }
.board-topbar-meta, .board-heading-note { display: inline-flex; flex: 0 0 auto; gap: 9px; align-items: center; color: var(--board-muted); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .035em; }
.board-topbar-meta { max-width: 215px; text-align: right; }
.board-live-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--board-accent); box-shadow: 0 0 0 4px var(--board-accent-soft); }
.board-eyebrow, .board-metric-label { color: var(--board-accent); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.board-dashboard-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; padding: 40px 0 25px; }
.board-dashboard-heading h1 { margin-top: 8px; font-size: clamp(25px, 3.2vw, 39px); font-weight: 800; letter-spacing: -.065em; line-height: 1.2; }
.board-heading-slash { color: #625b60; font-family: "DM Mono", monospace; font-size: .42em; font-weight: 400; letter-spacing: -.02em; vertical-align: middle; }
.board-dashboard-heading p { padding-bottom: 4px; color: var(--board-muted); font-size: 11px; }
.board-metrics { display: grid; grid-template-columns: 1fr 1fr 1.45fr; margin-bottom: 18px; border: 1px solid var(--board-line); border-top: 2px solid var(--board-accent); background: #111114; }
.board-metric { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: center; min-width: 0; padding: 17px 22px; }
.board-metric + .board-metric { border-left: 1px solid var(--board-line); }
.board-metric-label { grid-column: 1; color: var(--board-muted); font-family: Manrope, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.board-metric strong { grid-column: 1; margin-top: 5px; color: var(--board-ink); font-family: "DM Mono", monospace; font-size: 29px; font-weight: 500; letter-spacing: -.06em; line-height: 1.15; white-space: nowrap; }
.board-metric:first-child strong { color: var(--board-accent); }
.board-metric span { grid-column: 2; grid-row: 1 / 3; color: #68666d; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .09em; white-space: nowrap; }
.board-metric-frame strong { font-size: clamp(15px, 1.8vw, 23px); letter-spacing: -.045em; }
.board-panel { padding: 28px 30px; border: 1px solid var(--board-line); background: var(--board-panel); }
.board-balance-panel { margin-bottom: 18px; }
.board-section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 23px; }
.board-section-heading h2 { margin-top: 7px; font-size: 23px; font-weight: 700; letter-spacing: -.055em; line-height: 1.3; }
.board-heading-link { color: var(--board-accent); font-family: "DM Mono", monospace; font-size: 10px; text-decoration: none; }
.board-heading-link:hover { text-decoration: underline; }
.board-balance-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 12px 0; border-top: 1px solid var(--board-line); border-bottom: 1px solid var(--board-line); }
.board-balance-toolbar-note { color: var(--board-muted); font-family: "DM Mono", monospace; font-size: 10px; }
.board-balance-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.board-balance-switch { display: inline-flex; border: 1px solid #38353a; background: #0c0c0e; }
.board-balance-switch button { min-width: 56px; padding: 7px 12px; border: 0; color: var(--board-muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 600; }
.board-balance-switch button.is-active { color: #fff; background: #b92b33; }
.board-balance-summary { display: flex; justify-content: space-between; gap: 25px; align-items: end; padding: 21px 0 20px; }
.board-balance-summary > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.board-balance-summary > div:last-child { text-align: right; }
.board-balance-summary span, .board-balance-summary small { color: var(--board-muted); font-size: 10px; }
.board-balance-summary strong { overflow: hidden; font-family: "DM Mono", monospace; font-size: clamp(24px, 3vw, 35px); font-weight: 500; letter-spacing: -.055em; text-overflow: ellipsis; white-space: nowrap; }
.board-balance-summary #balance-value { color: #fff3f1; }
.board-balance-summary .board-balance-time { font-size: clamp(15px, 2vw, 23px); }
.board-chart-frame { position: relative; min-height: 410px; overflow: hidden; border: 1px solid #252328; background: radial-gradient(ellipse at 85% 10%, rgba(111, 23, 30, .12), transparent 45%), #0d0d10; }
.board-chart-frame svg { display: block; width: 100%; height: 410px; touch-action: pan-y; }
.board-chart-frame svg[hidden], .board-chart-empty[hidden], .board-chart-tooltip[hidden] { display: none; }
.board-chart-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: var(--board-muted); font-size: 12px; text-align: center; }
.board-chart-tooltip { position: absolute; z-index: 2; padding: 10px 12px; border: 1px solid #573036; color: var(--board-ink); background: #1c171a; box-shadow: 0 14px 30px #0009; font-family: "DM Mono", monospace; font-size: 11px; line-height: 1.5; pointer-events: none; white-space: pre-line; }
.board-chart-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 1px; margin-top: 14px; border: 1px solid var(--board-line); background: var(--board-line); }
.board-legend-entry { min-width: 0; background: #17161a; }
.board-legend-card { min-width: 0; padding: 13px 14px; border: 0; color: var(--board-ink); background: #17161a; font: inherit; text-align: left; cursor: pointer; transition: background .18s, opacity .18s; }
.board-legend-entry .board-legend-card { width: 100%; }
.board-legend-link { display: block; padding: 0 14px 12px; color: var(--board-accent); font-family: "DM Mono", monospace; font-size: 10px; text-decoration: none; }
.board-legend-link:hover { text-decoration: underline; }
.board-legend-card:hover { background: #242024; }
.board-legend-card[aria-pressed="false"] { opacity: .44; }
.board-legend-card:disabled { cursor: default; opacity: .5; }
.board-legend-name { display: flex; gap: 8px; align-items: center; overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.board-legend-swatch { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--series-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--series-color) 18%, transparent); }
.board-legend-value { display: block; margin-top: 7px; color: var(--series-color); font-family: "DM Mono", monospace; font-size: 17px; font-weight: 500; }
.board-legend-meta { display: block; margin-top: 4px; overflow: hidden; color: var(--board-muted); font-family: "DM Mono", monospace; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.board-chart-footnote { margin-top: 13px; color: #858188; font-size: 10px; line-height: 1.6; }
.board-chart-grid { stroke: #302c30; stroke-width: 1; }
.board-chart-axis { fill: #908a91; font-family: "DM Mono", monospace; font-size: 10px; }
.board-chart-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.25; stroke-dasharray: var(--board-chart-length); stroke-dashoffset: var(--board-chart-length); animation: board-chart-draw .85s ease forwards; }
.board-chart-last { animation: board-chart-pulse 2.8s ease-in-out infinite; }
.board-chart-callout { fill: #1b181c; stroke-width: 1; }
.board-chart-callout-text { fill: var(--board-ink); font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500; }
@keyframes board-chart-draw { to { stroke-dashoffset: 0; } }
@keyframes board-chart-pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
  .board-chart-line, .board-chart-last { animation: none; }
  .board-chart-line { stroke-dashoffset: 0; }
}
.board-leaderboard { margin-bottom: 18px; }
.board-table-wrap { overflow-x: auto; }
.board-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.board-table th { padding: 0 12px 13px; color: #89848b; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .11em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.board-table td { padding: 17px 12px; border-top: 1px solid var(--board-line); color: #c5c0c4; white-space: nowrap; }
.board-table td:first-child { color: var(--board-accent); font-family: "DM Mono", monospace; font-size: 15px; }
.board-table td strong { display: block; color: var(--board-ink); font-weight: 700; }
.board-table td:nth-child(3) strong { font-family: "DM Mono", monospace; font-size: 14px; font-weight: 500; }
.agent-subtitle { display: block; margin-top: 5px; color: var(--board-muted); font-size: 10px; }
.agent-profile-link { color: var(--board-ink); text-decoration: none; }
.agent-profile-link:hover { color: var(--board-accent); text-decoration: underline; }
.board-action-inline { color: var(--board-ink); font-size: 11px; }
.positive-value { color: #f46e70 !important; font-family: "DM Mono", monospace; }
.negative-value { color: #a6a0aa !important; font-family: "DM Mono", monospace; }
.agent-status { display: inline-flex; padding: 5px 8px; border: 1px solid #3c383f; color: var(--board-muted); background: #211f23; font-size: 10px; }
.agent-status[data-status="live"] { border-color: #7a3238; color: #fc9a9b; background: #341d21; }
.agent-status[data-status="paused"], .agent-status[data-status="pending"] { color: var(--board-warm); }
.agent-status[data-status="unavailable"] { color: #b2a7ae; }
.board-empty { display: grid; min-height: 220px; place-items: center; align-content: center; padding: 35px 20px; border-top: 1px solid var(--board-line); text-align: center; }
.board-empty[hidden] { display: none; }
.board-empty-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #6d2a32; color: var(--board-accent); background: var(--board-accent-soft); font-size: 24px; }
.board-empty h3 { margin-top: 17px; font-size: 16px; }
.board-empty p { margin-top: 8px; color: var(--board-muted); font-size: 11px; line-height: 1.6; }
.board-activity-empty { padding: 25px 0 5px; border-top: 1px solid var(--board-line); color: var(--board-muted); font-size: 12px; }
.board-activity-empty[hidden] { display: none; }
.board-activity-list { margin: 0; padding: 0; list-style: none; }
.board-activity-item { display: flex; justify-content: space-between; gap: 12px 20px; align-items: center; flex-wrap: wrap; padding: 17px 0; border-top: 1px solid var(--board-line); }
.board-activity-main, .board-activity-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.board-activity-main { font-size: 12px; }
.board-activity-main strong { font-family: "DM Mono", monospace; font-size: 13px; }
.agent-symbol { display: inline-flex; flex-direction: column; gap: 3px; }
.agent-symbol strong { color: var(--board-ink); }
.agent-symbol small { color: var(--board-muted); font-family: "DM Mono", monospace; font-size: 9px; }
.board-activity-main > span:not(.board-side):not(.board-action-state) { color: var(--board-muted); }
.board-side, .board-action-state { padding: 4px 7px; font-size: 10px; font-weight: 700; }
.board-side[data-side="BUY"] { color: #ff8b8e; background: #3b2025; }
.board-side[data-side="SELL"] { color: #d7c8c1; background: #302c2d; }
.board-action-state { color: var(--board-muted); background: #2a272b; }
.board-action-state[data-status="FILLED"] { color: #f2a6a4; background: #3a2428; }
.board-action-state[data-status="REJECTED"], .board-action-state[data-status="EXPIRED"] { color: #cbaaa5; }
.board-activity-meta { color: var(--board-muted); font-family: "DM Mono", monospace; font-size: 10px; }
.board-activity-meta time { color: var(--board-ink); }
.board-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding: 23px 0 35px; border-top: 1px solid var(--board-line); color: #777178; font-size: 10px; }
.agent-heading { align-items: end; }
.agent-heading .board-eyebrow { margin-top: 23px; }
.agent-heading p { margin-top: 9px; color: var(--board-muted); }
.agent-back { color: var(--board-accent); font-family: "DM Mono", monospace; font-size: 10px; text-decoration: none; }
.agent-back:hover { text-decoration: underline; }
.agent-heading-meta { display: flex; align-items: center; gap: 14px; padding-bottom: 5px; color: var(--board-muted); font-size: 10px; white-space: nowrap; }
.agent-heading-meta time { color: var(--board-ink); font-family: "DM Mono", monospace; }
.agent-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: 0; border: 1px solid var(--board-line); border-top: 2px solid var(--board-accent); background: var(--board-line); }
.agent-kpi { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 21px 22px; background: var(--board-panel); }
.agent-kpi > span { color: var(--board-muted); font-size: 11px; }
.agent-kpi strong { color: var(--board-ink); font-family: "DM Mono", monospace; font-size: clamp(20px, 2vw, 29px); font-weight: 500; letter-spacing: -.055em; white-space: nowrap; }
.agent-kpi-primary strong { color: var(--board-accent); }
.agent-kpi small { color: #777178; font-size: 10px; }
.agent-metric-note { margin: 10px 0 18px; color: #777178; font-size: 10px; line-height: 1.6; }
.agent-page .board-chart-legend { display: none; }
.agent-content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.agent-holdings, .agent-orders { min-width: 0; }
.agent-account-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 25px; padding: 17px 0; border-top: 1px solid var(--board-line); border-bottom: 1px solid var(--board-line); }
.agent-account-split > div { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.agent-account-split span { color: var(--board-muted); font-size: 10px; }
.agent-account-split strong { overflow: hidden; color: var(--board-ink); font-family: "DM Mono", monospace; font-size: clamp(15px, 1.5vw, 20px); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.agent-position-table { min-width: 510px; }
.agent-position-table td:first-child { color: var(--board-ink); font-family: "DM Mono", monospace; font-size: 12px; }
.agent-position-table td:last-child { color: var(--board-ink); font-family: "DM Mono", monospace; }
.agent-section-note { margin-top: 18px; color: #777178; font-size: 10px; line-height: 1.6; }
.agent-orders .board-section-heading, .agent-holdings .board-section-heading { align-items: start; }
.agent-orders .board-heading-note, .agent-holdings .board-heading-note { padding-top: 5px; }
.agent-orders .board-activity-item:first-child { border-top: 1px solid var(--board-line); }
.board-mono { font-family: "DM Mono", monospace; }
.board-nav a:focus-visible, .board-brand:focus-visible, .board-heading-link:focus-visible, .board-balance-switch button:focus-visible, .board-legend-card:focus-visible, .board-legend-link:focus-visible, .agent-profile-link:focus-visible, .agent-back:focus-visible { outline: 2px solid var(--board-accent); outline-offset: 3px; }
@media (max-width: 1100px) {
  .board-topbar-meta { display: none; }
  .board-nav { justify-content: flex-end; }
}
@media (max-width: 760px) {
  .agent-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-content-grid { grid-template-columns: minmax(0, 1fr); }
  .agent-heading-meta { flex-wrap: wrap; white-space: normal; }
  .board-shell { width: min(100% - 28px, 1360px); }
  .board-topbar { align-items: flex-start; flex-direction: column; gap: 12px; padding: 18px 0 10px; }
  .board-nav { justify-content: flex-start; gap: 2px 17px; }
  .board-nav a { font-size: 11px; }
  .board-dashboard-heading { align-items: flex-start; flex-direction: column; gap: 7px; padding: 29px 0 20px; }
  .board-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-metric { padding: 14px 16px; }
  .board-metric-frame { grid-column: 1 / -1; border-top: 1px solid var(--board-line); border-left: 0 !important; }
  .board-metric span { font-size: 8px; }
  .board-panel { padding: 20px 16px; }
  .board-section-heading { align-items: flex-start; }
  .board-section-heading h2 { font-size: 20px; }
  .board-heading-note { font-size: 9px; text-align: right; }
  .board-balance-toolbar { align-items: flex-start; flex-direction: column; }
  .board-balance-controls { width: 100%; }
  .board-balance-switch { flex: 1 1 auto; }
  .board-balance-switch button { flex: 1; }
  .board-chart-frame { min-height: 310px; }
  .board-chart-frame svg { height: 310px; }
  .board-chart-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-table, .board-table tbody { display: block; }
  .board-table thead { display: none; }
  .board-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; margin-top: 10px; padding: 15px; border: 1px solid var(--board-line); background: #17161a; }
  .board-table td { min-width: 0; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .board-table td::before { display: block; margin-bottom: 5px; color: var(--board-muted); content: attr(data-label); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .08em; }
  .board-table td:nth-child(1) { display: none; }
  .board-table td:nth-child(2) { grid-column: 1 / -1; }
  .board-table td:nth-child(3) { grid-column: 1; }
  .board-table td:nth-child(4) { grid-column: 2; }
  .board-table td:nth-child(7) { grid-column: 1 / -1; }
  .board-footer { flex-direction: column; gap: 7px; }
}
@media (max-width: 480px) {
  .agent-heading-meta { flex-direction: column; align-items: flex-start; }
  .agent-kpi { padding: 17px 13px; }
  .agent-kpi strong { font-size: 18px; }
  .board-chart-legend { grid-template-columns: 1fr; }
  .board-balance-summary { align-items: stretch; flex-direction: column; gap: 13px; }
  .board-balance-summary > div:last-child { padding-top: 11px; border-top: 1px solid var(--board-line); text-align: left; }
  .board-balance-summary strong { font-size: 24px; }
  .board-balance-summary .board-balance-time { font-size: 17px; }
  .board-section-heading { flex-direction: column; gap: 8px; }
}
@media (max-width: 760px) {
  .agent-position-table { display: table; }
  .agent-position-table thead { display: table-header-group; }
  .agent-position-table tbody { display: table-row-group; }
  .agent-position-table tr { display: table-row; margin: 0; padding: 0; border: 0; background: transparent; }
  .agent-position-table td { display: table-cell !important; padding: 13px 10px; border-top: 1px solid var(--board-line); white-space: nowrap; }
  .agent-position-table td::before { display: none; }
}
