:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --panel: #111317;
  --panel-2: #171a20;
  --grid: #2e333b;
  --text: #f2f4f7;
  --muted: #a0a7b0;
  --amber: #d7dde7;
  --pink: #d7c7ff;
  --green: #b7e4c7;
  --red: #ffb4b4;
  --blue: #c7d2fe;
  --cream: #d8c7a3;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Consolas", "Lucida Console", monospace;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
  padding: 7px 10px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--blue);
  border-radius: 4px;
}

.skip-link:focus { transform: translateY(0); opacity: 1; pointer-events: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 76px;
  border-bottom: 1px solid var(--grid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: #0f1115;
}

.section-nav {
  position: sticky;
  top: var(--topbar-height, 76px);
  z-index: 90;
  display: flex;
  gap: 4px;
  padding: 6px 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: rgba(15, 17, 21, 0.97);
  border-bottom: 1px solid var(--grid);
}

.section-nav::-webkit-scrollbar { display: none; }

.section-nav a {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  font-size: 11px;
  white-space: nowrap;
}

.section-nav a:hover { color: var(--text); border-color: #3a404a; }
.section-nav a[aria-current="location"] { color: var(--blue); border-color: var(--blue); background: #15181d; }
.section-nav a:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.section-anchor { scroll-margin-top: calc(var(--topbar-height, 76px) + 52px); }

.eyebrow {
  color: var(--amber);
  font-size: 11px;
}

h1 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.clock {
  color: var(--green);
  font-size: 14px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  grid-area: clock;
}

.clock-wrap {
  min-width: 156px;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "label controls"
    "clock controls";
  align-content: center;
  align-items: center;
  justify-items: end;
  column-gap: 12px;
  row-gap: 2px;
  padding: 6px 10px;
  border: 1px solid var(--grid);
  border-radius: 10px;
  background: var(--panel-2);
  line-height: 1;
}

.clock-wrap > span:first-child {
  grid-area: label;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.1;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logout-form {
  grid-area: controls;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 24px;
  border: 1px solid #3a404a;
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--amber);
  background: transparent;
  border-color: #3a404a;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at top right, rgba(199, 210, 254, 0.09), transparent 34%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.login-shell {
  width: min(420px, calc(100vw - 32px));
}

.login-panel {
  border: 1px solid var(--grid);
  background: linear-gradient(180deg, rgba(23, 26, 32, 0.96), rgba(12, 13, 16, 0.98));
  box-shadow: 0 18px 50px rgba(199, 210, 254, 0.08);
  border-radius: 6px;
  padding: 28px;
}

.login-panel h1 {
  margin-bottom: 24px;
  font-size: 22px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--text);
  background: #0a0b0d;
  border: 1px solid #3a404a;
  border-radius: 4px;
  font-family: inherit;
}

.login-form input:focus {
  outline: 1px solid var(--blue);
  border-color: var(--blue);
}

.login-error {
  padding: 8px 10px;
  color: var(--red);
  background: rgba(255, 180, 180, 0.08);
  border: 1px solid rgba(255, 180, 180, 0.22);
  border-radius: 4px;
  font-size: 12px;
}

.login-home {
  min-height: 38px;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid #3a404a;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
}

.login-home:hover {
  border-color: var(--blue);
  color: var(--text);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--grid);
  background: #0f1115;
}

.tab-button {
  width: auto;
  min-width: 148px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.tab-button.active {
  color: var(--amber);
  border-color: var(--grid);
  border-bottom-color: var(--panel);
  background: var(--panel);
}

.tab-page {
  display: none;
}

.tab-page.active {
  display: grid;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--grid);
  border-radius: 4px;
  min-height: 0;
  overflow: hidden;
}

.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

.panel-title {
  height: 34px;
  padding: 9px 12px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--grid);
  color: var(--amber);
  font-size: 12px;
}

.panel-title-action {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
}

.panel-title-action button {
  width: auto;
  min-width: 148px;
  height: 30px;
}

.backtest-title {
  height: auto;
  min-height: 42px;
  align-items: flex-start;
}

.backtest-toolbar {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.range-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.range-buttons button {
  width: auto;
  min-width: 40px;
  height: 30px;
  padding: 3px 8px;
  font-size: 11px;
}

.range-buttons button.active {
  border-color: var(--amber);
  color: #0a0b0d;
  background: var(--amber);
}

.benchmark-toggles {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-size: 11px;
}

.benchmark-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
}

.benchmark-toggles input {
  accent-color: var(--blue);
}

.benchmark-status {
  color: var(--muted);
}

.backtest-date-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-size: 11px;
}

.backtest-date-controls label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.backtest-date-controls input {
  width: 126px;
  height: 30px;
  padding: 2px 6px;
  color: var(--text);
  background: #0d0f12;
  border: 1px solid #3a404a;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
}

.backtest-date-controls input:focus {
  outline: 1px solid var(--blue);
  border-color: var(--blue);
}

.chart {
  width: 100%;
  height: 360px;
  padding: 12px 14px 14px;
}

.chart-message {
  display: grid;
  place-items: center;
  height: 100%;
}

.chart-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.live-chart-panel {
  min-height: 560px;
}

.backtest-chart-panel {
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.chart-panel .chart,
.backtest-chart-panel .chart {
  flex: 1;
  height: auto;
  min-height: 0;
}

.backtest-status-panel .cards,
.backtest-status-panel .metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 0;
}

.card {
  border: 1px solid var(--grid);
  border-radius: 4px;
  padding: 12px;
  background: #15181d;
  min-height: 70px;
}

.card div {
  color: var(--muted);
  font-size: 11px;
}

.card strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 18px;
}

.panel-subtitle {
  margin: 0 12px 10px;
  padding-top: 10px;
  border-top: 1px solid #232830;
  color: var(--amber);
  font-size: 11px;
  text-transform: uppercase;
}

table {
  width: 100%;
  min-width: max(100%, calc(var(--table-columns, 6) * 116px));
  max-width: none;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
  scrollbar-width: thin;
}

.table-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

.table-scroll.has-vertical-scroll,
.table-scroll:has(tbody tr:nth-child(16)) {
  max-height: 560px;
  overflow: auto;
}

.table-scroll.has-vertical-scroll::-webkit-scrollbar,
.table-scroll:has(tbody tr:nth-child(16))::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll table {
  border: 1px solid #232830;
  background: #0d0f12;
}

.table-scroll.has-vertical-scroll thead,
.table-scroll:has(tbody tr:nth-child(16)) thead,
table.long-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #15181d;
}

#ordersTable,
#fillsTable,
#fillComparisonTable,
#sleevePositionTable {
  font-size: 11px;
}

.overnight-dashboard #ordersTable {
  min-width: 1040px;
}

.overnight-dashboard #ordersTable th:nth-child(1),
.overnight-dashboard #ordersTable td:nth-child(1) { width: 184px; min-width: 184px; white-space: nowrap; }
.overnight-dashboard #ordersTable th:nth-child(2),
.overnight-dashboard #ordersTable td:nth-child(2) { width: 72px; min-width: 72px; white-space: nowrap; }
.overnight-dashboard #ordersTable th:nth-child(3),
.overnight-dashboard #ordersTable td:nth-child(3) { width: 88px; min-width: 88px; white-space: nowrap; }
.overnight-dashboard #ordersTable th:nth-child(4),
.overnight-dashboard #ordersTable td:nth-child(4),
.overnight-dashboard #ordersTable th:nth-child(5),
.overnight-dashboard #ordersTable td:nth-child(5) { width: 72px; min-width: 72px; white-space: nowrap; }
.overnight-dashboard #ordersTable th:nth-child(6),
.overnight-dashboard #ordersTable td:nth-child(6) { width: 110px; min-width: 110px; white-space: nowrap; }
.overnight-dashboard #ordersTable th:nth-child(7),
.overnight-dashboard #ordersTable td:nth-child(7) { width: 112px; min-width: 112px; white-space: nowrap; }
.overnight-dashboard #ordersTable th:nth-child(8),
.overnight-dashboard #ordersTable td:nth-child(8) { width: 260px; min-width: 260px; overflow-wrap: anywhere; }

#ordersTable td:first-child,
#fillsTable td:first-child,
#fillComparisonTable td:nth-child(4),
#fillComparisonTable td:nth-child(5) {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

#sleevePositionTable td:nth-child(5),
#sleevePositionTable td:nth-child(6),
#sleevePositionTable td:nth-child(7),
#sleevePositionTable td:nth-child(8),
#sleevePositionTable td:nth-child(9),
#sleevePositionTable td:nth-child(10),
#sleevePositionTable td:nth-child(11),
#sleevePositionTable td:nth-child(12),
#sleevePositionTable td:nth-child(13) {
  font-variant-numeric: tabular-nums;
}

th, td {
  min-width: 104px;
  border-bottom: 1px solid #232830;
  padding: 7px 8px;
  text-align: left;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
}

th[data-column-key*="created"], td[data-column-key*="created"],
th[data-column-key*="submitted"], td[data-column-key*="submitted"],
th[data-column-key*="filled"], td[data-column-key*="filled"],
th[data-column-key*="session"], td[data-column-key*="session"] { min-width: 184px; white-space: nowrap; }

th[data-column-key*="order_id"], td[data-column-key*="order_id"],
th[data-column-key*="client_id"], td[data-column-key*="client_id"],
th[data-column-key*="method"], td[data-column-key*="method"] { min-width: 210px; white-space: nowrap; }

th[data-column-key="symbol"], td[data-column-key="symbol"],
th[data-column-key="side"], td[data-column-key="side"],
th[data-column-key="status"], td[data-column-key="status"],
th[data-column-key*="qty"], td[data-column-key*="qty"] { min-width: 82px; white-space: nowrap; }

th[data-column-key*="notional"], td[data-column-key*="notional"],
th[data-column-key*="weight"], td[data-column-key*="weight"],
th[data-column-key*="price"], td[data-column-key*="price"] { min-width: 116px; white-space: nowrap; }

th {
  color: var(--amber);
  background: #15181d;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

td {
  color: #e3e7ec;
}

.muted { color: var(--muted); }

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

button {
  height: 34px;
  border: 1px solid var(--grid);
  border-radius: 4px;
  background: #1a1e24;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: var(--amber);
  color: var(--amber);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

button.danger {
  border-color: #6a3b3b;
  color: var(--red);
}

.mini-log {
  padding: 0 12px 12px;
  font-size: 12px;
}

.mini-log div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #232830;
  padding: 8px 0;
}

.mini-log span {
  color: var(--muted);
}

.mini-log b {
  color: var(--green);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker {
  padding: 12px;
}

.tracker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #232830;
  padding-bottom: 12px;
}

.tracker-head strong {
  display: block;
  margin-top: 6px;
  color: var(--green);
  font-size: 20px;
}

.tracker-kicker,
.tracker-session span {
  color: var(--muted);
  font-size: 11px;
}

.tracker-session {
  text-align: right;
}

.tracker-session b {
  display: block;
  margin-top: 6px;
  color: var(--amber);
  font-weight: 500;
}

.tracker-state {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 0;
}

.tracker-state div {
  border: 1px solid var(--grid);
  border-radius: 4px;
  background: #15181d;
  padding: 10px;
  min-height: 82px;
}

.tracker-state span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
}

.tracker-state b {
  color: #e3e7ec;
  font-weight: 500;
  white-space: normal;
}

.timeline {
  display: grid;
  gap: 6px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #232830;
  border-radius: 4px;
  padding: 9px;
  background: #111317;
}

.timeline-item.done {
  border-color: #426250;
}

.timeline-item.active {
  border-color: var(--amber);
  background: #1b1a14;
}

.timeline-item.pending {
  opacity: 0.72;
}

.timeline-time {
  color: var(--amber);
  font-size: 12px;
}

.timeline-body strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-body span {
  color: var(--muted);
  white-space: normal;
}

.allocation-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #232830;
}

.allocation-meta div {
  border: 1px solid var(--grid);
  border-radius: 4px;
  padding: 9px;
  background: #15181d;
  min-height: 58px;
}

.allocation-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 7px;
}

.allocation-meta b {
  color: var(--green);
  font-weight: 500;
}

.comparison-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
}

.comparison-row-label {
  color: var(--amber);
  font-size: 11px;
  text-transform: uppercase;
}

.comparison-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.paper-row .metric-card {
  background: #131916;
}

.armed-reset-banner {
  border: 1px solid #426250;
  border-radius: 4px;
  background: #101713;
  color: #e3e7ec;
  padding: 10px 12px;
  font-size: 12px;
}

.metric-card {
  border: 1px solid var(--grid);
  border-radius: 4px;
  background: #15181d;
  padding: 11px;
  min-height: 88px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 18px;
  font-weight: 600;
}

.metric-card b {
  display: block;
  margin-top: 7px;
  color: #b8c0ca;
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-card.negative {
  border-color: #6a3b3b;
}

.metric-card.negative strong {
  color: var(--red);
}

.metric-card.warning {
  border-color: #68604b;
}

.metric-card.warning strong {
  color: var(--amber);
}

.target-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.target-card {
  border: 1px solid var(--grid);
  border-radius: 4px;
  background: #111317;
  padding: 10px;
  min-height: 126px;
}

.target-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #232830;
  padding-bottom: 8px;
}

.target-head b,
.target-actuals b {
  color: #e3e7ec;
  font-weight: 500;
}

.target-should {
  padding: 10px 0;
}

.target-should span,
.target-actuals span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}

.target-should strong {
  color: var(--amber);
  font-size: 17px;
}

.target-actuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.target-actuals div {
  border: 1px solid #232830;
  border-radius: 4px;
  padding: 7px;
  min-height: 52px;
}

.symbol-chip {
  display: inline-block;
  min-width: 38px;
  padding: 2px 6px;
  border-radius: 3px;
  color: #0a0b0d;
  background: var(--amber);
  text-align: center;
  font-weight: 600;
}

.symbol-qqq {
  background: var(--blue);
}

.symbol-eem {
  background: var(--green);
}

.symbol-xli {
  background: var(--cream);
}

.symbol-fix,
.symbol-vst,
.symbol-trgp,
.symbol-pwr,
.symbol-eme {
  background: var(--blue);
}

.symbol-spmo,
.symbol-silj,
.symbol-ura,
.symbol-copx {
  background: var(--green);
}

.symbol-sw,
.symbol-fang {
  background: var(--pink);
}

.overnight-controls {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.positive { color: var(--green); }
.negative { color: var(--red); }
.warning { color: var(--amber); }

.warning-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
  font-size: 12px;
}

.warning-list div {
  border: 1px solid #68604b;
  border-radius: 4px;
  background: #1b1a14;
  color: var(--amber);
  padding: 9px;
  white-space: normal;
}

.warning-list .positive {
  border-color: #426250;
  background: #101713;
  color: var(--green);
}

.status-detail {
  padding: 0 12px 12px;
}

.status-detail-title {
  color: var(--amber);
  font-size: 11px;
  padding: 4px 0 8px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.status-grid div {
  border: 1px solid var(--grid);
  border-radius: 4px;
  background: #15181d;
  padding: 9px;
  min-height: 54px;
}

.status-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 7px;
}

.status-grid b {
  color: var(--green);
  font-weight: 500;
}

.warmup-ok {
  margin-top: 8px;
  border: 1px solid #426250;
  border-radius: 4px;
  background: #101713;
  color: var(--green);
  padding: 9px;
  font-size: 12px;
}

.warning-list.compact {
  padding: 8px 0 0;
}

@media (max-width: 1000px) {
  .grid { grid-template-columns: 1fr; }
  .span-1 { grid-column: span 1; }
  .span-2 { grid-column: span 1; }
  .span-3 { grid-column: span 1; }
  .span-4 { grid-column: span 1; }
  .topbar { position: static; min-height: 0; gap: 10px; padding: 14px; align-items: flex-start; flex-direction: column; }
  .section-nav { top: 0; padding-inline: 8px; }
  .section-anchor { scroll-margin-top: 48px; }
  .clock-wrap { justify-items: start; }
  .tracker-state,
  .status-grid,
  .allocation-meta,
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .cards,
  .tracker-state,
  .status-grid,
  .comparison-row,
  .target-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overnight-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .grid { gap: 8px; padding: 8px; }
  .panel-title-action { height: auto; min-height: 42px; align-items: flex-start; flex-direction: column; }
  .backtest-toolbar,
  .range-buttons,
  .benchmark-toggles,
  .backtest-date-controls { justify-items: start; justify-content: flex-start; }
  .target-card { padding: 8px; }
  .target-head { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
