/* Source: v2-production-layout.css */
:root {
  --v2-canvas: #f2f5f6;
  --v2-surface: #ffffff;
  --v2-ink: #081a22;
  --v2-muted: #60727b;
  --v2-line: #d8e1e4;
  --v2-line-strong: #bdcbd0;
  --v2-blue: #006ca8;
  --v2-teal: #007c68;
  --v2-gold: #a86f00;
  --v2-red: #bd3040;
  --v2-green: #007b57;
  --v2-sidebar: #0b2028;
}

/* Qualification states remain identifiable when color is unavailable. */
html.v2-layout-ready .qualification-state {
  --qualification-ink: #24424d;
  --qualification-fill: #eef4f6;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

html.v2-layout-ready .qualification-state::before {
  content: attr(data-qualification-marker) " " attr(data-qualification-label);
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 1px 5px;
  border: 1px solid var(--qualification-ink);
  background: var(--qualification-fill);
  color: var(--qualification-ink);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
}

html.v2-layout-ready [data-qualification-state="passed"] {
  --qualification-ink: #146b4a;
  --qualification-fill: #e5f4ee;
}

html.v2-layout-ready [data-qualification-state="passed"]::before {
  border-style: solid;
  border-radius: 999px;
}

html.v2-layout-ready [data-qualification-state="pending"] {
  --qualification-ink: #825400;
  --qualification-fill: #fff2d5;
}

html.v2-layout-ready [data-qualification-state="pending"]::before {
  border-style: dashed;
  border-radius: 3px;
}

html.v2-layout-ready [data-qualification-state="below-standard"] {
  --qualification-ink: #9b2130;
  --qualification-fill: #fbe9eb;
}

html.v2-layout-ready [data-qualification-state="below-standard"]::before {
  border-style: double;
  border-width: 3px;
  border-radius: 0;
}

html.v2-layout-ready [data-qualification-state="incomplete"] {
  --qualification-ink: #713f12;
  --qualification-fill: #f9eee1;
}

html.v2-layout-ready [data-qualification-state="incomplete"]::before {
  border-width: 1px 4px;
  border-style: solid double;
  border-radius: 2px;
}

html.v2-layout-ready [data-qualification-state="missing"] {
  --qualification-ink: #354b56;
  --qualification-fill: #edf1f3;
}

html.v2-layout-ready [data-qualification-state="missing"]::before {
  border-width: 2px;
  border-style: dotted;
  border-radius: 2px;
}

html.v2-layout-ready [data-qualification-state="not-applicable"] {
  --qualification-ink: #59666d;
  --qualification-fill: #f1f3f4;
}

html.v2-layout-ready [data-qualification-state="not-applicable"]::before {
  border-style: dashed;
  border-radius: 0;
  background: #eceff0;
}

html.v2-layout-ready .status-badge.qualification-state {
  min-height: 28px;
  padding: 3px 6px;
  border-color: var(--qualification-ink);
  background: var(--qualification-fill);
  color: var(--qualification-ink);
  white-space: normal;
}

html.v2-layout-ready .status-badge[data-qualification-state="pending"] { border-style: dashed; }
html.v2-layout-ready .status-badge[data-qualification-state="below-standard"] { border-style: double; border-width: 3px; }
html.v2-layout-ready .status-badge[data-qualification-state="incomplete"] { border-left-width: 5px; }
html.v2-layout-ready .status-badge[data-qualification-state="missing"] { border-style: dotted; border-width: 2px; }
html.v2-layout-ready .status-badge[data-qualification-state="not-applicable"] { border-style: dashed; }

html.v2-layout-ready .metric-card > strong.qualification-state,
html.v2-layout-ready .validation-metrics strong.qualification-state,
html.v2-layout-ready .replay-summary strong.qualification-state {
  display: inline-flex;
  flex-wrap: wrap;
  row-gap: 3px;
}

html.v2-layout-ready .metric-card > strong.qualification-state::before {
  font-size: 11px;
}

html.v2-layout-ready .gate-list > .qualification-state {
  border-left: 0;
  padding-left: 8px;
}

html.v2-layout-ready .gate-list > [data-qualification-state="not-applicable"] { opacity: .82; }

html.v2-layout-ready .stage-item.qualification-state {
  padding: 5px 0;
  border-bottom: 2px solid var(--qualification-ink);
}

html.v2-layout-ready .stage-item[data-qualification-state="pending"] { border-bottom-style: dashed; }
html.v2-layout-ready .stage-item[data-qualification-state="below-standard"] { border-bottom-style: double; border-bottom-width: 4px; }
html.v2-layout-ready .stage-item[data-qualification-state="incomplete"] { border-bottom-width: 5px; }
html.v2-layout-ready .stage-item[data-qualification-state="missing"] { border-bottom-style: dotted; }

html.v2-layout-ready .qualification-legend {
  display: grid;
  grid-template-columns: repeat(6, minmax(115px, 1fr));
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--v2-line);
  background: #f7fafb;
}

html.v2-layout-ready .qualification-legend > span {
  display: inline-flex;
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid var(--qualification-ink);
  background: var(--qualification-fill);
  color: #39515b;
  font-size: 11px;
  line-height: 1.25;
}

html.v2-layout-ready .qualification-legend > [data-qualification-state="pending"] { border-style: dashed; }
html.v2-layout-ready .qualification-legend > [data-qualification-state="below-standard"] { border-style: double; border-width: 3px; }
html.v2-layout-ready .qualification-legend > [data-qualification-state="incomplete"] { border-left-width: 6px; }
html.v2-layout-ready .qualification-legend > [data-qualification-state="missing"] { border-style: dotted; border-width: 2px; }
html.v2-layout-ready .qualification-legend > [data-qualification-state="not-applicable"] { border-style: dashed; }

/* Use one simple pass/fail symbol system across every qualification surface. */
html.v2-layout-ready .qualification-state::before {
  content: "\2715  " attr(data-qualification-label);
  border: 1px solid var(--qualification-ink);
  border-radius: 999px;
}

html.v2-layout-ready [data-qualification-state="passed"]::before {
  content: "\2713  " attr(data-qualification-label);
}

html.v2-layout-ready .status-badge.qualification-state,
html.v2-layout-ready .qualification-legend > .qualification-state {
  border-width: 1px;
  border-style: solid;
  border-left-width: 1px;
}

html.v2-layout-ready .qualification-legend > .qualification-state {
  padding-inline: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html.v2-layout-ready .stage-item.qualification-state {
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

html.v2-layout-ready .qualification-state > svg {
  display: none;
}

@media (max-width: 1180px) {
  html.v2-layout-ready .qualification-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  html.v2-layout-ready .qualification-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.v2-layout-ready .qualification-state::before { font-size: 11px; }
}

@media (max-width: 400px) {
  html.v2-layout-ready .qualification-legend { grid-template-columns: 1fr; }
}

html.v2-layout-ready body {
  color: var(--v2-ink);
  background: var(--v2-canvas);
}

html.v2-layout-ready .app-shell {
  grid-template-columns: 224px minmax(0, 1fr);
}

html.v2-layout-ready .sidebar {
  background: var(--v2-sidebar);
  border-right: 1px solid #29424b;
  box-shadow: 10px 0 28px rgba(8, 26, 34, 0.06);
}

html.v2-layout-ready .brand {
  min-height: 78px;
  padding: 14px 17px;
  border-bottom: 1px solid #29424b;
}

html.v2-layout-ready .brand-mark {
  width: 38px;
  height: 38px;
}

html.v2-layout-ready .brand-copy strong {
  color: #f4f8f7;
  font-size: 17px;
}

html.v2-layout-ready .brand-copy span {
  color: #9eb1b8;
  font-size: 12px;
}

html.v2-layout-ready .primary-nav {
  gap: 2px;
  padding: 8px 9px 16px;
}

html.v2-layout-ready .nav-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 13px 8px 5px;
  color: #7f969e;
  font-size: 11px;
  font-weight: 700;
}

html.v2-layout-ready .nav-group-label::before {
  content: attr(data-group-index);
  color: #52707a;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready .nav-button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #b8c7cb;
  font-size: 13px;
}

html.v2-layout-ready .nav-button::after {
  content: attr(data-nav-order);
  margin-left: auto;
  color: #57717a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready .nav-button:hover {
  background: #132d36;
  border-color: #264550;
  color: #f0f6f5;
}

html.v2-layout-ready .nav-button.is-active {
  background: #e9f5f3;
  border-color: #b9dcd5;
  color: #063c35;
  box-shadow: inset 3px 0 0 var(--v2-teal);
}

html.v2-layout-ready .nav-button.is-active::after { color: #3e776e; }

html.v2-layout-ready .sidebar-footer {
  margin: auto 9px 9px;
  padding: 11px;
  border: 1px solid #2b4852;
  border-radius: 4px;
  background: #102a33;
}

html.v2-layout-ready .main-shell {
  min-width: 0;
  background: var(--v2-canvas);
}

html.v2-layout-ready .topbar {
  min-height: 82px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: minmax(620px, 1fr) auto;
  grid-template-rows: auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--v2-line);
  box-shadow: 0 5px 18px rgba(19, 45, 55, 0.04);
}

html.v2-layout-ready .global-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  gap: 10px;
  align-items: end;
}

html.v2-layout-ready .contract-switcher {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 8px;
}

html.v2-layout-ready .global-controls label,
html.v2-layout-ready .environment-control {
  min-width: 0;
}

html.v2-layout-ready .control-label,
html.v2-layout-ready .environment-control > label {
  margin-bottom: 5px;
  color: var(--v2-muted);
  font-size: 11px;
  font-weight: 700;
}

html.v2-layout-ready .v2-command-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

html.v2-layout-ready .global-latest-quote {
  order: 2;
  min-width: 184px;
  padding: 0 14px 0 0;
  border-right: 1px solid var(--v2-line);
}

html.v2-layout-ready .global-latest-quote > span {
  display: block;
  color: var(--v2-muted);
  font-size: 11px;
  font-weight: 700;
}

html.v2-layout-ready .global-latest-quote > strong {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 3px;
  white-space: nowrap;
}

html.v2-layout-ready #globalLastPrice {
  color: #071a22;
  font-size: 25px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready #globalChangeSummary {
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

html.v2-layout-ready .top-actions {
  order: 1;
  display: flex;
  align-items: center;
  gap: 7px;
}

html.v2-layout-ready .system-ribbon {
  min-height: 39px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(300px, 1.5fr) repeat(4, minmax(132px, .65fr));
  align-items: stretch;
  background: #e8eff1;
  border: 0;
  border-bottom: 1px solid #cad6da;
}

html.v2-layout-ready .system-ribbon #environmentBanner {
  min-width: 0;
  margin: 0;
  padding: 0 14px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-right: 1px solid #c6d3d7;
  background: transparent;
}

html.v2-layout-ready .system-ribbon #environmentDescription {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.v2-layout-ready .system-ribbon .top-status-item {
  min-width: 0;
  padding: 5px 12px;
  border-right: 1px solid #c6d3d7;
}

html.v2-layout-ready .system-ribbon .top-status-item > span {
  color: #6a7a82;
  font-size: 11px;
}

html.v2-layout-ready .system-ribbon .top-status-item > strong {
  margin-top: 1px;
  color: #17313b;
  font-size: 12px;
}

html.v2-layout-ready main {
  min-width: 0;
  padding: 0;
}

html.v2-layout-ready .view {
  padding: 14px 16px 24px;
  background: var(--v2-canvas);
}

html.v2-layout-ready .v2-region {
  min-width: 0;
}

html.v2-layout-ready .v2-region + .v2-region {
  margin-top: 10px;
}

html.v2-layout-ready .view > .page-heading {
  margin: -14px -16px 0;
  padding: 12px 16px 11px;
  background: #fff;
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready .view > .page-heading + * {
  margin-top: 10px;
}

html.v2-layout-ready .page-heading {
  min-height: 48px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  background: transparent;
}

html.v2-layout-ready .page-heading > :first-child {
  min-width: 0;
}

html.v2-layout-ready .page-heading::before {
  content: attr(data-category) "  /  " attr(data-order);
  flex: 0 0 auto;
  align-self: stretch;
  min-width: 88px;
  padding-right: 15px;
  display: flex;
  align-items: center;
  border-right: 2px solid var(--v2-teal);
  color: var(--v2-teal);
  font-size: 11px;
  font-weight: 800;
}

html.v2-layout-ready .page-heading h1 {
  color: #061921;
  font-size: 22px;
  line-height: 1.15;
}

html.v2-layout-ready .page-heading p {
  margin-top: 4px;
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.45;
}

html.v2-layout-ready .page-heading > button,
html.v2-layout-ready .page-heading > .view-actions,
html.v2-layout-ready .page-heading > .gateway-state,
html.v2-layout-ready .page-heading > .segmented-control {
  margin-left: auto;
}

html.v2-layout-ready .v2-region-heading {
  min-height: 23px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

html.v2-layout-ready .v2-region-heading span {
  color: #213b45;
  font-size: 12px;
  font-weight: 800;
}

html.v2-layout-ready .v2-region-heading i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--v2-line-strong), transparent);
}

html.v2-layout-ready .v2-summary-band .metric-strip,
html.v2-layout-ready .v2-summary-band .ranking-summary-strip,
html.v2-layout-ready .v2-summary-band .health-strip {
  margin: 0;
}

html.v2-layout-ready .overview-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(470px, .9fr);
  gap: 12px;
  align-items: stretch;
}

html.v2-layout-ready .overview-summary-row .metric-strip,
html.v2-layout-ready .overview-summary-row .gate-bar {
  margin: 0;
}

html.v2-layout-ready .metric-strip,
html.v2-layout-ready .ranking-summary-strip,
html.v2-layout-ready .health-strip {
  gap: 8px;
}

html.v2-layout-ready .metric-card,
html.v2-layout-ready .trade-account-strip > div {
  min-height: 68px;
  padding: 9px 11px;
  border: 1px solid var(--v2-line);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

html.v2-layout-ready .ranking-summary-strip > div,
html.v2-layout-ready .health-strip > div {
  min-height: 0;
  padding: 9px 11px;
  border-color: var(--v2-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

html.v2-layout-ready .metric-card::before {
  width: 3px;
  background: var(--v2-blue);
}

html.v2-layout-ready .metric-card > span,
html.v2-layout-ready .ranking-summary-strip span,
html.v2-layout-ready .trade-account-strip span {
  color: var(--v2-muted);
  font-size: 11px;
  font-weight: 700;
}

html.v2-layout-ready .metric-card > strong,
html.v2-layout-ready .ranking-summary-strip strong,
html.v2-layout-ready .trade-account-strip strong {
  margin-top: 3px;
  color: #091c24;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready .tool-panel,
html.v2-layout-ready .table-section,
html.v2-layout-ready .detail-panel,
html.v2-layout-ready .log-panel,
html.v2-layout-ready .trade-environment-workbench,
html.v2-layout-ready .arbitrage-auto-workbench,
html.v2-layout-ready .arbitrage-capability-section,
html.v2-layout-ready .operator-control-strip {
  border: 1px solid var(--v2-line);
  border-radius: 4px;
  background: var(--v2-surface);
  box-shadow: 0 3px 12px rgba(19, 45, 55, .035);
}

html.v2-layout-ready .panel-heading,
html.v2-layout-ready .section-heading {
  min-height: 44px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e3eaec;
}

html.v2-layout-ready .panel-heading h2,
html.v2-layout-ready .section-heading h2 {
  color: #102932;
  font-size: 16px;
}

html.v2-layout-ready .panel-heading p,
html.v2-layout-ready .section-heading p {
  font-size: 11px;
}

html.v2-layout-ready .tool-panel,
html.v2-layout-ready .detail-panel,
html.v2-layout-ready .log-panel,
html.v2-layout-ready .forward-progress-panel {
  padding: 12px;
}

html.v2-layout-ready .table-section .section-heading {
  padding: 8px 11px;
}

html.v2-layout-ready th,
html.v2-layout-ready td {
  padding: 8px 10px;
}

html.v2-layout-ready .source-list > div,
html.v2-layout-ready .switch-row,
html.v2-layout-ready .gate-list > div {
  min-height: 48px;
}

html.v2-layout-ready .fingerprint-list > div,
html.v2-layout-ready .recovery-checklist > div {
  min-height: 36px;
}

html.v2-layout-ready .metric-card.v2-has-progress {
  position: relative;
  overflow: hidden;
}

html.v2-layout-ready .metric-card.v2-has-progress::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--v2-progress, 0%);
  height: 3px;
  background: var(--v2-teal);
}

html.v2-layout-ready .dashboard-grid {
  grid-template-columns: minmax(700px, 1.62fr) minmax(340px, .72fr);
  gap: 12px;
  align-items: start;
}

html.v2-layout-ready .dashboard-side-column {
  gap: 12px;
}

html.v2-layout-ready .market-panel {
  border-top: 3px solid var(--v2-blue);
}

html.v2-layout-ready .market-quote-strip {
  border-radius: 3px;
  background: #f0f5f6;
}

html.v2-layout-ready .market-quote-strip > span:first-child {
  background: #fff;
  box-shadow: inset 0 -2px 0 var(--v2-blue);
}

html.v2-layout-ready .market-quote-strip > span:first-child strong {
  font-size: 24px;
}

html.v2-layout-ready .fundamental-report-panel {
  border-top: 3px solid var(--v2-teal);
}

html.v2-layout-ready .trade-plan-panel,
html.v2-layout-ready .execution-plan {
  border-top: 3px solid var(--v2-gold);
}

@media (min-width: 721px) {
  html.v2-layout-ready #overview .dashboard-grid {
    align-items: stretch;
  }

  html.v2-layout-ready #overview .dashboard-side-column {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }

  html.v2-layout-ready #overview .trade-plan-panel {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #overview .trade-plan-panel > .panel-actions,
  html.v2-layout-ready #overview .trade-plan-panel > .button-block:last-child {
    margin-top: auto;
  }
}

/* Unified production design system: restrained contrast, consistent hierarchy and state semantics. */
:root {
  --v2-canvas: #edf1f2;
  --v2-surface: #ffffff;
  --v2-surface-soft: #f4f7f7;
  --v2-ink: #15262d;
  --v2-muted: #586b73;
  --v2-line: #cbd6da;
  --v2-line-strong: #aebfc5;
  --v2-blue: #176b8f;
  --v2-teal: #177560;
  --v2-gold: #91620f;
  --v2-red: #b43b46;
  --v2-green: #197050;
  --v2-sidebar: #14262d;
  --state-pass-ink: #176b4d;
  --state-pass-fill: #e4f2ec;
  --state-pass-line: #82bca7;
  --state-wait-ink: #7b570f;
  --state-wait-fill: #fff2d8;
  --state-wait-line: #d7b366;
  --state-block-ink: #9e303b;
  --state-block-fill: #f9e8ea;
  --state-block-line: #d58d95;
  --state-info-ink: #315f74;
  --state-info-fill: #e7f0f4;
  --state-info-line: #9ab9c7;
  --bg: var(--v2-canvas);
  --surface: var(--v2-surface);
  --surface-soft: var(--v2-surface-soft);
  --surface-strong: #e4eaec;
  --ink: var(--v2-ink);
  --muted: var(--v2-muted);
  --line: var(--v2-line);
  --line-strong: var(--v2-line-strong);
  --nav: var(--v2-sidebar);
  --nav-hover: #1b363f;
  --green: var(--v2-green);
  --green-soft: var(--state-pass-fill);
  --red: var(--v2-red);
  --red-soft: var(--state-block-fill);
  --amber: var(--v2-gold);
  --amber-soft: var(--state-wait-fill);
  --blue: var(--v2-blue);
  --blue-soft: var(--state-info-fill);
}

html.v2-layout-ready body,
html.v2-layout-ready .main-shell,
html.v2-layout-ready .view {
  background: var(--v2-canvas);
  color: var(--v2-ink);
}

html.v2-layout-ready .sidebar {
  background: var(--v2-sidebar);
  border-right-color: #30464f;
  box-shadow: 8px 0 24px rgba(20, 38, 45, .08);
}

html.v2-layout-ready .brand {
  border-bottom-color: #30464f;
}

html.v2-layout-ready .brand-copy strong { color: #f5faf9; }
html.v2-layout-ready .brand-copy span { color: #a7bbc1; }

html.v2-layout-ready .nav-group-label {
  color: #8ca5ac;
}

html.v2-layout-ready .nav-group-label::before {
  color: #66858e;
}

html.v2-layout-ready .nav-button {
  border-color: transparent;
  color: #c0cfd3;
}

html.v2-layout-ready .nav-button svg { color: #83a8b0; }

html.v2-layout-ready .nav-button::after {
  display: none;
}

html.v2-layout-ready .nav-button:hover {
  background: #1b363f;
  border-color: #36535d;
  color: #f6fbfa;
}

html.v2-layout-ready .nav-button:hover svg { color: #9bc3c5; }

html.v2-layout-ready .nav-button.is-active {
  background: #1f4747;
  border-color: #32615d;
  color: #f5fbf9;
  box-shadow: inset 3px 0 0 #45b99b;
}

html.v2-layout-ready .nav-button.is-active svg { color: #67d0b5; }

html.v2-layout-ready .sidebar-footer {
  border-color: #36515a;
  background: #1a3038;
}

html.v2-layout-ready .sidebar-footer strong { color: #f0f7f5; }
html.v2-layout-ready .sidebar-footer span { color: #a9bbc0; }

html.v2-layout-ready .topbar {
  background: #fbfcfc;
  border-bottom-color: var(--v2-line);
  box-shadow: 0 2px 8px rgba(21, 38, 45, .055);
}

html.v2-layout-ready .system-ribbon,
html.v2-layout-ready .environment-banner {
  border-color: var(--v2-line);
  background: #e9f0f2;
  color: #38545f;
}

html.v2-layout-ready .tool-panel,
html.v2-layout-ready .table-section,
html.v2-layout-ready .detail-panel,
html.v2-layout-ready .log-panel,
html.v2-layout-ready .forward-progress-panel,
html.v2-layout-ready .trade-environment-workbench,
html.v2-layout-ready .arbitrage-auto-workbench,
html.v2-layout-ready .arbitrage-capability-section,
html.v2-layout-ready .operator-control-strip {
  border-color: var(--v2-line);
  background: var(--v2-surface);
  box-shadow: 0 2px 9px rgba(21, 38, 45, .045);
}

html.v2-layout-ready .section-heading {
  border-bottom-color: var(--v2-line);
  background: var(--v2-surface-soft);
}

html.v2-layout-ready .panel-heading h2,
html.v2-layout-ready .section-heading h2,
html.v2-layout-ready .dialog-heading h2 {
  color: var(--v2-ink);
}

html.v2-layout-ready .page-heading p,
html.v2-layout-ready .panel-heading p,
html.v2-layout-ready .section-heading p,
html.v2-layout-ready .dialog-heading p {
  color: var(--v2-muted);
  line-height: 1.4;
}

html.v2-layout-ready th {
  background: #edf2f3;
  color: #4f646d;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

html.v2-layout-ready td {
  color: var(--v2-ink);
  font-size: 13px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready th,
html.v2-layout-ready td {
  padding: 8px 10px;
  border-bottom-color: var(--v2-line);
}

html.v2-layout-ready tbody tr:hover td { background: #eef5f4; }
html.v2-layout-ready .selectable-row.is-selected { background: #e2efec; box-shadow: inset 3px 0 0 var(--v2-teal); }

html.v2-layout-ready .status-badge:not(.qualification-state) {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-width: 1px;
  border-style: solid;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

html.v2-layout-ready .status-badge:not(.qualification-state)::before {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

html.v2-layout-ready .status-badge.status-good:not(.qualification-state) {
  border-color: var(--state-pass-line);
  background: var(--state-pass-fill);
  color: var(--state-pass-ink);
}

html.v2-layout-ready .status-badge.status-good:not(.qualification-state)::before { content: "\2713"; }

html.v2-layout-ready .status-badge.status-warn:not(.qualification-state) {
  border-color: var(--state-wait-line);
  background: var(--state-wait-fill);
  color: var(--state-wait-ink);
}

html.v2-layout-ready .status-badge.status-warn:not(.qualification-state)::before { content: "\2026"; }

html.v2-layout-ready .status-badge.status-blocked:not(.qualification-state) {
  border-color: var(--state-block-line);
  background: var(--state-block-fill);
  color: var(--state-block-ink);
}

html.v2-layout-ready .status-badge.status-blocked:not(.qualification-state)::before { content: "\2715"; }

html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state) {
  border-color: var(--state-info-line);
  background: var(--state-info-fill);
  color: var(--state-info-ink);
}

html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state)::before { content: "\2022"; }

html.v2-layout-ready .status-dot.status-good { background: var(--v2-green); }
html.v2-layout-ready .status-dot.status-warn { background: var(--v2-gold); }
html.v2-layout-ready .status-dot.status-blocked { background: var(--v2-red); }
html.v2-layout-ready .status-dot.status-neutral { background: var(--v2-blue); }

html.v2-layout-ready [data-qualification-state="passed"] {
  --qualification-ink: var(--state-pass-ink);
  --qualification-fill: var(--state-pass-fill);
}

html.v2-layout-ready [data-qualification-state="pending"] {
  --qualification-ink: var(--state-wait-ink);
  --qualification-fill: var(--state-wait-fill);
}

html.v2-layout-ready [data-qualification-state="below-standard"] {
  --qualification-ink: var(--state-block-ink);
  --qualification-fill: var(--state-block-fill);
}

html.v2-layout-ready [data-qualification-state="incomplete"] {
  --qualification-ink: #82501f;
  --qualification-fill: #f8ecdf;
}

html.v2-layout-ready [data-qualification-state="missing"] {
  --qualification-ink: #455d67;
  --qualification-fill: #edf2f3;
}

html.v2-layout-ready [data-qualification-state="not-applicable"] {
  --qualification-ink: #5d6b71;
  --qualification-fill: #f0f2f3;
}

html.v2-layout-ready .qualification-state::before {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.15;
}

html.v2-layout-ready .gate-pass > svg,
html.v2-layout-ready .check-pass > svg { color: var(--v2-green); }
html.v2-layout-ready .gate-fail > svg,
html.v2-layout-ready .check-fail > svg { color: var(--v2-red); }
html.v2-layout-ready .gate-pending > svg,
html.v2-layout-ready .check-pending > svg { color: var(--v2-gold); }

html.v2-layout-ready .warning-note,
html.v2-layout-ready .plan-blocker {
  border-color: #d8bc7b;
  background: #fff4df;
  color: #77530f;
}

html.v2-layout-ready .danger-note,
html.v2-layout-ready .danger-confirm {
  border-color: #dba0a6;
  background: #faebed;
  color: #922f39;
}

html.v2-layout-ready .success-note {
  border-color: #9bc9b7;
  background: #e8f4ef;
  color: #176649;
}

html.v2-layout-ready .status-value-good { color: var(--v2-green); }
html.v2-layout-ready .status-value-warn { color: var(--v2-gold); }
html.v2-layout-ready .status-value-bad { color: var(--v2-red); }

html.v2-layout-ready button:focus-visible,
html.v2-layout-ready input:focus-visible,
html.v2-layout-ready select:focus-visible,
html.v2-layout-ready textarea:focus-visible,
html.v2-layout-ready [tabindex]:focus-visible {
  outline: 2px solid var(--v2-blue);
  outline-offset: 2px;
}

@media (min-width: 721px) {
  html.v2-layout-ready .page-heading h1 { font-size: 22px; line-height: 1.2; }
  html.v2-layout-ready .page-heading p { font-size: 13px; }
  html.v2-layout-ready .panel-heading h2,
  html.v2-layout-ready .section-heading h2 { font-size: 16px; line-height: 1.25; }
  html.v2-layout-ready .panel-heading p,
  html.v2-layout-ready .section-heading p { font-size: 12px; }
}

@media (max-width: 720px) {
  html.v2-layout-ready .qualification-state::before { font-size: 11px; }
  html.v2-layout-ready th { font-size: 11px; }
  html.v2-layout-ready td { font-size: 12px; }
}

html.v2-layout-ready .v2-overview-detail,
html.v2-layout-ready .v2-detail-grid,
html.v2-layout-ready .v2-control-grid,
html.v2-layout-ready .v2-position-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

html.v2-layout-ready .v2-overview-detail .v2-region-heading,
html.v2-layout-ready .v2-detail-grid .v2-region-heading,
html.v2-layout-ready .v2-control-grid .v2-region-heading,
html.v2-layout-ready .v2-position-workspace .v2-region-heading {
  grid-column: 1 / -1;
  margin-bottom: -4px;
}

html.v2-layout-ready .v2-overview-detail .exact-contract-curve-section,
html.v2-layout-ready .v2-overview-detail .overview-opportunity-section {
  grid-column: 1 / -1;
}

html.v2-layout-ready #operations > .v2-detail-grid {
  align-items: stretch;
}

html.v2-layout-ready #operations > .v2-detail-grid > .log-panel,
html.v2-layout-ready #operations > .v2-detail-grid > .recovery-control-panel {
  min-height: 0;
  height: auto;
  margin-top: 0;
  align-self: stretch;
}

html.v2-layout-ready #operations > .v2-detail-grid > .log-panel {
  display: flex;
  flex-direction: column;
}

html.v2-layout-ready #operations > .v2-detail-grid > .log-panel > .panel-heading {
  flex: 0 0 auto;
}

html.v2-layout-ready #operations > .v2-detail-grid > .log-panel > pre {
  min-height: 0;
  max-height: 164px;
  flex: 1 1 auto;
}

@media (min-width: 1181px) {
  html.v2-layout-ready #operations .operations-layout {
    height: clamp(400px, 46dvh, 500px);
    min-height: 0;
    align-items: stretch;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section,
  html.v2-layout-ready #operations .operations-layout > .reconciliation-panel {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section {
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section > .section-heading {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section > .table-scroll,
  html.v2-layout-ready #operations .reconciliation-panel {
    min-height: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section > .table-scroll {
    flex: 1 1 auto;
  }

  html.v2-layout-ready #operations > .v2-detail-grid {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto;
    overflow: visible;
  }

  html.v2-layout-ready #operations > .v2-detail-grid > .log-panel,
  html.v2-layout-ready #operations > .v2-detail-grid > .recovery-control-panel {
    min-height: 0;
    height: auto;
    overflow: hidden;
  }

  html.v2-layout-ready #operations > .v2-detail-grid > .recovery-control-panel {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
}

html.v2-layout-ready .v2-overview-detail .overview-opportunity-section,
html.v2-layout-ready .v2-overview-detail .overview-opportunity-section > .table-scroll,
html.v2-layout-ready .v2-overview-detail .overview-opportunity-section table {
  width: 100%;
}

html.v2-layout-ready .v2-page-controls {
  margin-top: 10px;
}

html.v2-layout-ready #simulation .simulation-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

html.v2-layout-ready #simulation .simulation-layout > .tool-panel {
  min-width: 0;
  height: 100%;
}

html.v2-layout-ready #simulation .simulation-account-panel {
  grid-column: 1;
}

html.v2-layout-ready #simulation .simulation-equity-panel {
  grid-column: 2;
}

html.v2-layout-ready #simulation > .simulation-order-history {
  width: 100%;
  margin: 12px 0;
}

html.v2-layout-ready #simulation .forward-progress-panel {
  clear: both;
}

html.v2-layout-ready .v2-analysis-controls .analysis-inputs,
html.v2-layout-ready .v2-filter-controls .filter-bar,
html.v2-layout-ready .v2-trade-controls .trade-environment-workbench,
html.v2-layout-ready .v2-operator-controls .operator-control-strip,
html.v2-layout-ready .v2-validation-controls .validation-stage-strip {
  margin: 0;
}

html.v2-layout-ready .v2-analysis-controls .analysis-inputs {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  padding: 9px 10px;
  background: #f4f7f8;
  border: 1px solid var(--v2-line);
  border-radius: 4px;
}

html.v2-layout-ready .decision-grid {
  grid-template-columns: minmax(680px, 1.55fr) minmax(360px, .75fr);
  gap: 12px;
  align-items: stretch;
}

html.v2-layout-ready #decision .decision-judgment-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding-bottom: 0;
  overflow: hidden;
}

html.v2-layout-ready .direction-summary {
  border-left: 3px solid var(--v2-blue);
}

html.v2-layout-ready #decision .decision-judgment-block {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 12px;
}

@media (min-width: 721px) {
  html.v2-layout-ready #decision .decision-judgment-block {
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    align-content: stretch;
  }

  html.v2-layout-ready #decision .decision-judgment-block > .trend-report-primary {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
  }

  html.v2-layout-ready #decision .trend-scenario-grid {
    min-height: 0;
    align-items: stretch;
  }

  html.v2-layout-ready #decision .trend-scenario-grid > article {
    height: 100%;
  }
}

html.v2-layout-ready #decision .decision-no-trade-section {
  width: calc(100% + 24px);
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(165px, .22fr) minmax(0, 1fr);
  align-items: stretch;
  margin: 12px -12px 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
}

html.v2-layout-ready #decision .decision-no-trade-section .section-heading {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  align-items: flex-start;
  border-right: 1px solid var(--v2-line);
  border-bottom: 0;
  background: #f3f7f8;
}

html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid {
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: stretch;
}

html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid > span {
  display: flex;
  align-items: center;
  min-height: 42px;
}

html.v2-layout-ready #decision .execution-disposition[hidden] {
  display: none !important;
}

html.v2-layout-ready #decision .decision-judgment-block > .panel-heading {
  margin: 0;
}

html.v2-layout-ready #decision .decision-judgment-block > .direction-summary,
html.v2-layout-ready #decision .decision-judgment-block > .direction-rationale,
html.v2-layout-ready #decision .decision-judgment-block > .conflict-row,
html.v2-layout-ready #decision .decision-judgment-block > .trend-report-primary {
  min-width: 0;
  margin-top: 0;
}

html.v2-layout-ready #decision .decision-judgment-block > .trend-report-primary {
  padding-top: 2px;
}

html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--v2-line);
}

html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid > section {
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(165px, .16fr) minmax(0, 1fr);
  border: 0;
  border-radius: 0;
}

html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid > section + section {
  border-top: 1px solid var(--v2-line);
}

html.v2-layout-ready #decision .trend-report-detail-grid > section > h3 {
  margin: 0;
  padding: 11px 12px;
  display: flex;
  align-items: flex-start;
  border-right: 1px solid var(--v2-line);
  background: #f3f7f8;
}

html.v2-layout-ready #decision .trend-chain-list,
html.v2-layout-ready #decision .trend-capability-list,
html.v2-layout-ready #decision .trend-limit-list {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  border-top: 0;
}

html.v2-layout-ready #decision .trend-chain-list > div,
html.v2-layout-ready #decision .trend-capability-list > div,
html.v2-layout-ready #decision .trend-limit-list > li {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--v2-line);
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready #decision .trend-chain-list > div:nth-child(4n),
html.v2-layout-ready #decision .trend-capability-list > div:nth-child(4n),
html.v2-layout-ready #decision .trend-limit-list > li:nth-child(4n) {
  border-right: 0;
}

html.v2-layout-ready #decision .trend-chain-list > .empty-state,
html.v2-layout-ready #decision .trend-capability-list > .empty-state {
  grid-column: 1 / -1;
  padding: 12px;
}

html.v2-layout-ready #decision .trend-limit-list > li::before {
  top: 15px;
}

html.v2-layout-ready #decision .v2-no-trade-band > .no-trade-section {
  display: grid;
  grid-template-columns: minmax(165px, .16fr) minmax(0, 1fr);
  align-items: stretch;
}

html.v2-layout-ready #decision .v2-no-trade-band .section-heading {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  align-items: flex-start;
  border-right: 1px solid var(--v2-line);
  border-bottom: 0;
  background: #f3f7f8;
}

html.v2-layout-ready #decision .v2-no-trade-band .no-trade-grid {
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
}

html.v2-layout-ready #decision .v2-event-risk-band > .analysis-event-section {
  width: 100%;
}

html.v2-layout-ready .v2-detail-grid > .table-section,
html.v2-layout-ready .v2-control-grid > section,
html.v2-layout-ready .v2-position-workspace > .table-section,
html.v2-layout-ready .v2-position-workspace > #positionDetail {
  min-width: 0;
}

html.v2-layout-ready .v2-automation-detail {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
}

html.v2-layout-ready .operator-control-strip {
  padding: 9px 11px;
}

html.v2-layout-ready .v2-control-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

html.v2-layout-ready .arbitrage-capability-item {
  grid-template-columns: 30px minmax(0, 1fr);
}

html.v2-layout-ready .arbitrage-capability-item > .status-badge {
  grid-column: 2;
  justify-self: start;
  margin-top: 2px;
}

html.v2-layout-ready .arbitrage-layout {
  grid-template-columns: minmax(420px, .78fr) minmax(650px, 1.35fr);
  gap: 12px;
  align-items: stretch;
}

@media (min-width: 721px) {
  html.v2-layout-ready .v2-arbitrage-ranking-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 12px;
  }

  html.v2-layout-ready .v2-arbitrage-ranking-workspace > .v2-region-heading {
    min-width: 0;
    grid-column: 1;
    margin-bottom: 0;
  }

  html.v2-layout-ready .v2-arbitrage-ranking-workspace > .arbitrage-ranking-kind-control {
    min-height: 34px;
    grid-column: 2;
    padding: 0;
    gap: 8px;
    border: 0;
    background: transparent;
  }

  html.v2-layout-ready .v2-arbitrage-ranking-workspace > .arbitrage-ranking-kind-control > span {
    font-size: 12px;
    white-space: nowrap;
  }

  html.v2-layout-ready .v2-arbitrage-ranking-workspace > .arbitrage-ranking-kind-control .segmented-control button {
    min-width: 104px;
    min-height: 34px;
    padding: 6px 12px;
  }

  html.v2-layout-ready .v2-arbitrage-ranking-workspace > .arbitrage-layout {
    min-width: 0;
    grid-column: 1 / -1;
  }
}

html.v2-layout-ready #arbitrageDetail {
  grid-column: 1;
  grid-row: 1;
}

html.v2-layout-ready .arbitrage-candidate-section {
  grid-column: 2;
  grid-row: 1;
}

html.v2-layout-ready .arbitrage-candidate-section,
html.v2-layout-ready #arbitrageDetail {
  height: auto;
  max-height: none;
  overflow: visible;
}

html.v2-layout-ready .ranking-layout,
html.v2-layout-ready .event-layout,
html.v2-layout-ready .model-layout,
html.v2-layout-ready .operations-layout {
  gap: 12px;
  align-items: start;
}

html.v2-layout-ready #models .model-layout {
  grid-template-columns: minmax(790px, 1.9fr) minmax(350px, .7fr);
}

html.v2-layout-ready #models .model-layout table {
  min-width: 0;
  table-layout: fixed;
}

html.v2-layout-ready #models .model-layout th,
html.v2-layout-ready #models .model-layout td {
  font-size: var(--font-body);
  white-space: normal;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #models .model-layout th:nth-child(1) { width: 22%; }
html.v2-layout-ready #models .model-layout th:nth-child(2) { width: 27%; }
html.v2-layout-ready #models .model-layout th:nth-child(3) { width: 12%; }
html.v2-layout-ready #models .model-layout th:nth-child(4) { width: 15%; }
html.v2-layout-ready #models .model-layout th:nth-child(5) { width: 13%; }
html.v2-layout-ready #models .model-layout th:nth-child(6) { width: 11%; }

html.v2-layout-ready #models .model-layout td:nth-child(4) .status-badge,
html.v2-layout-ready #models .model-layout td:nth-child(5) .status-badge {
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--v2-ink);
  font-size: var(--font-meta);
  font-weight: 400;
  white-space: nowrap;
}

html.v2-layout-ready #models .model-layout td:nth-child(4) .status-badge::before,
html.v2-layout-ready #models .model-layout td:nth-child(5) .status-badge::before {
  padding-inline: 5px;
}

html.v2-layout-ready #models .model-training-section {
  margin-bottom: 0;
}

html.v2-layout-ready #models .training-row {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready #models .training-queue-table {
  min-width: 560px;
}

html.v2-layout-ready #models .training-queue-table tbody tr:nth-child(even) {
  background: #f8fafb;
}

html.v2-layout-ready #automation .shadow-oms-section > .shadow-oms-metrics {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--v2-line);
}

html.v2-layout-ready #automation .shadow-oms-section > .shadow-oms-metrics .metric-card {
  min-height: 72px;
  padding: 9px 11px;
  border: 0;
  border-right: 1px solid var(--v2-line);
  border-radius: 0;
  box-shadow: none;
}

html.v2-layout-ready #automation .shadow-oms-section > .shadow-oms-metrics .metric-card:last-child {
  border-right: 0;
}

@media (max-width: 1180px) {
  html.v2-layout-ready #automation .shadow-oms-section > .shadow-oms-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html.v2-layout-ready #automation .shadow-oms-section > .shadow-oms-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1181px) {
  html.v2-layout-ready #models.is-active {
    height: auto;
    min-height: calc(100dvh - 128px);
    padding-bottom: 0;
    display: block;
    overflow: visible;
  }

  html.v2-layout-ready #models > .page-heading,
  html.v2-layout-ready #models > .metric-strip {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #models > .v2-primary-workspace {
    min-height: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #models > .v2-primary-workspace > .v2-region-heading {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #models .model-layout {
    height: auto;
    min-height: max(420px, var(--v2-model-register-height, calc(100dvh - 787px)));
    max-height: none;
    flex: 0 0 auto;
    align-items: stretch;
  }

  html.v2-layout-ready #models .model-layout > .table-section,
  html.v2-layout-ready #models .model-layout > .detail-panel {
    min-height: max(420px, var(--v2-model-register-height, calc(100dvh - 787px)));
    height: auto;
    margin-bottom: 0;
  }

  html.v2-layout-ready #models .model-layout > .table-section {
    overflow: hidden;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel {
    padding: 10px;
    overflow: visible;
  }

  html.v2-layout-ready #models .model-layout > .table-section {
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #models .model-layout > .table-section > .section-heading {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #models .model-layout > .table-section > .table-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    scrollbar-gutter: stable;
  }

  html.v2-layout-ready #models .model-layout > .table-section > .table-scroll > table {
    height: 100%;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel {
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel > .panel-heading,
  html.v2-layout-ready #models .model-layout > .detail-panel > .button-block {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel > .gate-list {
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-rows: repeat(5, minmax(42px, 1fr));
    overflow: visible;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel > .button-block {
    min-height: 34px;
    margin-top: 8px;
  }

  html.v2-layout-ready #models > .v2-detail-band {
    min-height: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  html.v2-layout-ready #models > .v2-detail-band > .v2-region-heading {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #models .model-training-section {
    min-height: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  html.v2-layout-ready #models .model-training-section > .section-heading,
  html.v2-layout-ready #models .model-training-section > .training-row {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #models .training-queue-scroll {
    min-height: 0;
    max-height: 189px;
    flex: 0 0 auto;
    overflow: auto;
  }
}

@media (min-width: 1181px) {
  html.v2-layout-ready #models .model-layout > .table-section th,
  html.v2-layout-ready #models .model-layout > .table-section td {
    padding: 2px 8px;
    line-height: 1.2;
  }

  html.v2-layout-ready #models .model-layout > .table-section tbody tr {
    height: 36px;
  }

  html.v2-layout-ready #models .model-layout td:nth-child(4) .status-badge,
  html.v2-layout-ready #models .model-layout td:nth-child(5) .status-badge {
    min-height: 24px;
    padding: 0;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel > .panel-heading {
    min-height: 40px;
    margin-bottom: 6px;
  }

  html.v2-layout-ready #models .v2-model-readiness {
    margin-bottom: 5px;
    padding: 6px 8px;
  }

  html.v2-layout-ready #models .v2-gauge-row + .v2-gauge-row {
    margin-top: 3px;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel > .gate-list > div {
    min-height: 42px;
    padding-block: 5px;
  }
}

html.v2-layout-ready #models .training-queue-disclosure {
  min-width: 0;
  border-top: 1px solid var(--v2-line);
}

html.v2-layout-ready #models .training-queue-disclosure > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: #f4f8fa;
  color: #173640;
  cursor: pointer;
  list-style: none;
}

html.v2-layout-ready #models .training-queue-disclosure > summary::-webkit-details-marker {
  display: none;
}

html.v2-layout-ready #models .training-queue-disclosure > summary::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 2px solid var(--v2-blue);
  border-bottom: 2px solid var(--v2-blue);
  transform: rotate(-45deg);
  transition: transform 140ms ease;
}

html.v2-layout-ready #models .training-queue-disclosure[open] > summary::before {
  transform: rotate(45deg) translate(-2px, -2px);
}

html.v2-layout-ready #models .training-queue-disclosure > summary > span {
  font-size: var(--font-meta);
  font-weight: 600;
}

html.v2-layout-ready #models .training-queue-disclosure > summary > small {
  margin-left: auto;
  color: var(--v2-muted);
  font-size: var(--font-assist);
}

html.v2-layout-ready #models .training-queue-disclosure > .training-queue-scroll {
  margin: 0;
  max-height: 189px;
  border-top: 1px solid var(--v2-line);
}

html.v2-layout-ready #models .training-queue-table thead tr {
  height: 34px;
}

html.v2-layout-ready #models .training-queue-table tbody tr {
  height: 52px;
}

html.v2-layout-ready #models .training-queue-table th,
html.v2-layout-ready #models .training-queue-table td {
  padding-block: 5px;
}

html.v2-layout-ready .trade-account-strip {
  margin: 0;
}

html.v2-layout-ready .v2-trade-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .38fr);
  gap: 10px;
  align-items: stretch;
}

html.v2-layout-ready .v2-trade-summary .trade-mode-gate {
  margin: 0;
}

html.v2-layout-ready .order-layout {
  grid-template-columns: minmax(570px, .95fr) minmax(570px, 1.05fr);
  gap: 12px;
  margin: 0;
}

html.v2-layout-ready .order-ticket,
html.v2-layout-ready .order-book-panel {
  border-top: 3px solid var(--v2-blue);
}

html.v2-layout-ready .orders-simulation-workspace {
  margin-top: 12px;
}

html.v2-layout-ready .automation-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

html.v2-layout-ready .v2-position-workspace {
  grid-template-columns: minmax(620px, 1.35fr) minmax(360px, .65fr);
  align-items: start;
}

html.v2-layout-ready .position-detail-grid {
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}

html.v2-layout-ready .risk-layout,
html.v2-layout-ready .validation-layout,
html.v2-layout-ready .data-layout,
html.v2-layout-ready .model-layout,
html.v2-layout-ready .operations-layout,
html.v2-layout-ready .governance-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

html.v2-layout-ready .settings-layout {
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

html.v2-layout-ready #data .v2-detail-grid {
  grid-template-columns: minmax(0, 1fr);
}

html.v2-layout-ready #data .v2-detail-grid > .table-section,
html.v2-layout-ready #data .v2-data-coverage {
  grid-column: 1 / -1;
}

html.v2-layout-ready #data .v2-detail-grid .table-scroll {
  max-height: 430px;
  overflow: auto;
  scrollbar-gutter: stable;
}

@media (min-width: 1181px) {
  html.v2-layout-ready #data .v2-detail-grid > .table-section:has(#dataCatalogBody) {
    height: var(--v2-data-catalog-section-height, auto);
    min-height: 160px;
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #data .v2-detail-grid > .table-section:has(#dataCatalogBody) > .section-heading {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #data .v2-detail-grid > .table-section:has(#dataCatalogBody) > .table-scroll {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    overflow: auto;
  }
}

html.v2-layout-ready #data .v2-detail-grid table {
  min-width: 1040px;
}

html.v2-layout-ready #data .v2-detail-grid thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Long collector names must wrap inside the fixed-width activity table rather
   than overflow the cell at compact desktop widths. */
html.v2-layout-ready #data .data-activity-scroll td:first-child,
html.v2-layout-ready #data .data-activity-scroll td:first-child strong,
html.v2-layout-ready #data .data-activity-scroll td:first-child small {
  white-space: normal;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #data .data-catalog-scroll td:first-child {
  white-space: normal;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #data .data-activity-event-scroll td:nth-child(2) {
  white-space: normal;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #events .event-layout {
  grid-template-columns: minmax(720px, 1fr) 360px;
  height: calc(100dvh - 250px);
  min-height: 520px;
  align-items: stretch;
}

/* The event workbench keeps a fixed 750px evidence timeline on desktop. Give
   the page header and action strip a compact, bounded rhythm so that timeline
   and risk panel finish on the same baseline as the navigation footer. */
html.v2-layout-ready #events > .page-heading {
  height: 46px;
  min-height: 46px;
  padding-block: 0;
  overflow: hidden;
}

html.v2-layout-ready #events > .page-heading h1 {
  font-size: 22px;
  line-height: 1.15;
}

html.v2-layout-ready #events > .page-heading p {
  font-size: 13px;
  line-height: 1.35;
}

html.v2-layout-ready #events .event-execution-policy {
  height: 50px;
  min-height: 50px;
}

html.v2-layout-ready #events .event-execution-policy > div {
  min-height: 50px;
  padding-block: 2px;
}

html.v2-layout-ready #events .timeline-panel {
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

html.v2-layout-ready #events .timeline-date {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 7px 12px;
}

html.v2-layout-ready #events .timeline-item {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 11px;
}

html.v2-layout-ready #events .timeline-item p {
  margin: 3px 0;
}

html.v2-layout-ready #events .event-risk-panel {
  position: static;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (min-width: 721px) {
  html.v2-layout-ready #ranking.is-active {
    height: calc(100dvh - 128px);
    min-height: 0;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.v2-layout-ready #ranking > .page-heading,
  html.v2-layout-ready #ranking > .v2-page-controls,
  html.v2-layout-ready #ranking > .ranking-summary-strip {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #ranking > .v2-primary-workspace {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.v2-layout-ready #ranking .v2-region-heading {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #ranking .ranking-layout {
    min-height: 0;
    flex: 1 1 auto;
    align-items: stretch;
  }

  html.v2-layout-ready #ranking .ranking-table {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #ranking .ranking-table > .table-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  html.v2-layout-ready #ranking .ranking-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7f9fa;
  }

  html.v2-layout-ready #rankingDetail {
    height: 100%;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }

  html.v2-layout-ready #positions.is-active {
    height: calc(100dvh - 128px);
    min-height: 0;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.v2-layout-ready #positions > .page-heading,
  html.v2-layout-ready #positions > .v2-page-controls,
  html.v2-layout-ready #positions > .positions-metrics {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #positions > .v2-position-workspace {
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: minmax(620px, 1.42fr) minmax(360px, .68fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
  }

  html.v2-layout-ready #positions .positions-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  html.v2-layout-ready #positions .positions-ledger-table {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
  }

  html.v2-layout-ready #positions .positions-ledger-table > .table-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  html.v2-layout-ready #positions .positions-ledger-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  html.v2-layout-ready #positions .positions-ledger-table th,
  html.v2-layout-ready #positions .positions-ledger-table td {
    min-width: 0;
    padding-inline: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(1) { width: 11%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(2) { width: 6%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(3) { width: 6%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(4) { width: 6%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(5) { width: 8%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(6) { width: 8%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(7) { width: 9%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(8) { width: 10%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(9) { width: 9%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(10) { width: 12%; }
  html.v2-layout-ready #positions .positions-ledger-table th:nth-child(11) { width: 15%; }

  html.v2-layout-ready #positions .positions-ledger-table td:nth-child(10) {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  html.v2-layout-ready #positions .positions-ledger-table td:nth-child(11) {
    overflow: visible;
    text-overflow: clip;
  }

  html.v2-layout-ready #positions .positions-ledger-table .row-actions {
    min-width: 0;
    flex-wrap: wrap;
    gap: 4px;
  }

  html.v2-layout-ready #positions .positions-ledger-table .row-actions > button {
    min-width: 0;
    flex: 1 1 52px;
    padding-inline: 5px;
  }

  html.v2-layout-ready #positions .positions-ledger-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7f9fa;
  }

  html.v2-layout-ready #positions .positions-ledger-table table:has(#positionsBody > tr:only-child .empty-state) {
    height: 100%;
  }

  html.v2-layout-ready #positions #positionDetail {
    height: 100%;
    min-height: 0;
    align-content: start;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

html.v2-layout-ready #positions .position-empty-card {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

html.v2-layout-ready #positions .position-empty-overview {
  min-height: 170px;
  flex: 1 1 auto;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  color: var(--v2-muted);
  text-align: center;
}

html.v2-layout-ready #positions .position-empty-overview svg {
  width: 28px;
  height: 28px;
  color: var(--v2-teal);
}

html.v2-layout-ready #positions .position-empty-overview strong {
  color: var(--v2-ink);
  font-size: 16px;
}

html.v2-layout-ready #positions .position-empty-facts,
html.v2-layout-ready #positions .position-fact-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--v2-line);
  border-left: 1px solid var(--v2-line);
}

html.v2-layout-ready #positions .position-empty-facts > div,
html.v2-layout-ready #positions .position-fact-grid > div {
  min-width: 0;
  padding: 8px 9px;
  border-right: 1px solid var(--v2-line);
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready #positions .position-empty-facts dt,
html.v2-layout-ready #positions .position-fact-grid dt {
  color: var(--v2-muted);
  font-size: 11px;
}

html.v2-layout-ready #positions .position-empty-facts dd,
html.v2-layout-ready #positions .position-fact-grid dd {
  margin: 3px 0 0;
  color: var(--v2-ink);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #positions .position-highlight-strip {
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border: 1px solid var(--v2-line);
}

html.v2-layout-ready #positions .position-highlight-strip > div {
  min-width: 0;
  padding: 9px;
  border-right: 1px solid var(--v2-line);
}

html.v2-layout-ready #positions .position-highlight-strip > div:last-child {
  border-right: 0;
}

html.v2-layout-ready #positions .position-highlight-strip span,
html.v2-layout-ready #positions .position-highlight-strip strong,
html.v2-layout-ready #positions .position-highlight-strip small {
  display: block;
}

html.v2-layout-ready #positions .position-highlight-strip span,
html.v2-layout-ready #positions .position-highlight-strip small {
  color: var(--v2-muted);
  font-size: 11px;
}

html.v2-layout-ready #positions .position-highlight-strip strong {
  margin: 3px 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #positions .position-utilization-grid {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

html.v2-layout-ready #positions .position-utilization-grid > div {
  display: grid;
  grid-template-columns: 92px minmax(70px, 1fr) 48px;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

html.v2-layout-ready #positions .position-utilization-grid progress {
  width: 100%;
}

html.v2-layout-ready #positions .position-utilization-grid strong {
  text-align: right;
}

html.v2-layout-ready #positions .position-exit-card {
  display: flex;
  flex-direction: column;
}

html.v2-layout-ready #positions .position-exit-summary {
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--v2-line);
}

html.v2-layout-ready #positions .position-exit-summary span {
  min-width: 0;
  padding: 8px 9px;
  color: var(--v2-muted);
  font-size: 11px;
}

html.v2-layout-ready #positions .position-exit-summary span + span {
  border-left: 1px solid var(--v2-line);
}

html.v2-layout-ready #positions .position-exit-summary strong {
  display: block;
  margin-bottom: 2px;
  color: var(--v2-ink);
  font-size: 13px;
}

html.v2-layout-ready #positions .position-exit-card .exit-actions > .danger-button {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  html.v2-layout-ready #positions .position-highlight-strip,
  html.v2-layout-ready #positions .position-empty-facts,
  html.v2-layout-ready #positions .position-fact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #positions .position-highlight-strip > div,
  html.v2-layout-ready #positions .position-empty-facts > div,
  html.v2-layout-ready #positions .position-fact-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }
}

html.v2-layout-ready .v2-generated-chart {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--v2-line);
  background: #f7f9fa;
}

html.v2-layout-ready .v2-chart-heading,
html.v2-layout-ready .v2-chart-row,
html.v2-layout-ready .v2-gauge-row {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 8px;
}

html.v2-layout-ready .v2-chart-heading {
  grid-template-columns: auto minmax(0, 1fr);
  margin-bottom: 7px;
}

html.v2-layout-ready .v2-chart-heading strong {
  font-size: 12px;
}

html.v2-layout-ready .v2-chart-heading span {
  color: var(--v2-muted);
  font-size: 11px;
  text-align: right;
}

html.v2-layout-ready .v2-chart-row,
html.v2-layout-ready .v2-gauge-row {
  grid-template-columns: 74px minmax(80px, 1fr) 76px;
}

html.v2-layout-ready .v2-chart-row > span,
html.v2-layout-ready .v2-gauge-row > span {
  color: var(--v2-muted);
  font-size: 11px;
}

html.v2-layout-ready .v2-chart-row > strong,
html.v2-layout-ready .v2-gauge-row > strong {
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready .v2-stacked-bar {
  height: 9px;
  display: flex;
  overflow: hidden;
  background: #e2e9eb;
}

html.v2-layout-ready .v2-stacked-bar > i {
  display: block;
  height: 100%;
  transition: width 180ms ease;
}

html.v2-layout-ready .v2-stacked-bar.is-empty::after {
  content: "暂无可计算记录";
  align-self: center;
  width: 100%;
  color: #7d8d94;
  font-size: 11px;
  text-align: center;
}

html.v2-layout-ready .v2-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 7px;
}

html.v2-layout-ready .v2-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--v2-muted);
  font-size: 11px;
}

html.v2-layout-ready .v2-chart-legend i {
  width: 8px;
  height: 8px;
}

html.v2-layout-ready .v2-chart-legend b {
  color: var(--v2-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready .v2-generated-chart .is-good,
html.v2-layout-ready .v2-generated-chart .is-bullish,
html.v2-layout-ready .v2-generated-chart .is-approved { background: var(--v2-green); }
html.v2-layout-ready .v2-generated-chart .is-warning { background: var(--v2-gold); }
html.v2-layout-ready .v2-generated-chart .is-blocked,
html.v2-layout-ready .v2-generated-chart .is-bearish { background: var(--v2-red); }
html.v2-layout-ready .v2-generated-chart .is-neutral { background: #95a7ae; }
html.v2-layout-ready .v2-generated-chart .is-strong { background: var(--v2-blue); }
html.v2-layout-ready .v2-generated-chart .is-official { background: #0a6b90; }

html.v2-layout-ready .v2-event-distribution {
  margin: 8px 0;
}

html.v2-layout-ready .v2-data-coverage {
  padding: 10px 12px;
}

html.v2-layout-ready .v2-model-readiness,
html.v2-layout-ready .v2-validation-evidence {
  margin-bottom: 9px;
}

html.v2-layout-ready .v2-gauge-row + .v2-gauge-row {
  margin-top: 6px;
}

html.v2-layout-ready .v2-validation-evidence .v2-stacked-bar {
  height: 12px;
}

html.v2-layout-ready .settings-nav {
  position: sticky;
  top: 12px;
  border: 1px solid var(--v2-line);
  border-radius: 4px;
  background: #fff;
}

html.v2-layout-ready .settings-nav button {
  min-height: 42px;
  border-left: 3px solid transparent;
  border-radius: 0;
}

html.v2-layout-ready .settings-nav button.is-active {
  border-left-color: var(--v2-teal);
  background: #eaf4f2;
  color: #06483e;
}

html.v2-layout-ready #operations .audit-log-section {
  height: 390px;
  min-height: 390px;
  max-height: 390px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.v2-layout-ready #operations .audit-log-section > .section-heading {
  flex: 0 0 auto;
}

html.v2-layout-ready #operations .audit-log-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-gutter: stable;
}

html.v2-layout-ready #operations .audit-log-scroll thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

html.v2-layout-ready #operations .audit-log-scroll tbody tr:nth-child(even) {
  background: #f8fafb;
}

@media (max-width: 720px) {
  html.v2-layout-ready #operations .audit-log-section {
    height: 340px;
    min-height: 340px;
    max-height: 340px;
  }
}

html.v2-layout-ready table thead th {
  background: #edf2f3;
  color: #4d6169;
  font-size: 11px;
  font-weight: 800;
}

html.v2-layout-ready table tbody tr:hover {
  background: #f2f7f7;
}

html.v2-layout-ready .primary-button {
  background: var(--v2-blue);
  border-color: var(--v2-blue);
}

html.v2-layout-ready .primary-button:hover {
  background: #005e91;
  border-color: #005e91;
}

@media (max-width: 1500px) and (min-width: 721px) {
  html.v2-layout-ready .main-shell {
    min-width: 0;
  }

  html.v2-layout-ready #ranking.is-active {
    height: calc(100dvh - 128px);
  }

  html.v2-layout-ready .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html.v2-layout-ready .top-actions .broker-login-shortcut {
    display: none;
  }

  html.v2-layout-ready .top-actions .user-button-copy {
    display: block;
  }

  html.v2-layout-ready .top-actions .danger-button {
    width: 38px;
    padding-inline: 0;
  }

  html.v2-layout-ready .top-actions .danger-button span {
    display: none;
  }

}

@media (max-width: 1180px) and (min-width: 721px) {
  html.v2-layout-ready .overview-summary-row,
  html.v2-layout-ready .v2-trade-summary {
    grid-template-columns: 1fr;
  }

  html.v2-layout-ready #models .model-layout table {
    min-width: 900px;
    table-layout: fixed;
  }

  html.v2-layout-ready .topbar,
  html.v2-layout-ready .system-ribbon,
  html.v2-layout-ready main,
  html.v2-layout-ready .view,
  html.v2-layout-ready .v2-region,
  html.v2-layout-ready .tool-panel,
  html.v2-layout-ready .table-section,
  html.v2-layout-ready .detail-panel {
    min-width: 0;
    max-width: 100%;
  }

}

@media (max-width: 720px) {
  html.v2-layout-ready .app-shell {
    display: block;
  }

  html.v2-layout-ready .main-shell {
    min-width: 0;
  }

  html.v2-layout-ready .topbar {
    position: relative;
    min-height: 206px;
    padding: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 42px;
    gap: 7px;
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready .topbar > .global-controls {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: repeat(3, 40px);
    align-items: center;
    gap: 6px;
  }

  html.v2-layout-ready .mobile-nav-button {
    display: inline-flex !important;
    grid-column: 1;
    grid-row: 1 / 4;
  }

  html.v2-layout-ready .contract-switcher {
    grid-column: 2;
    grid-row: 1 / 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  html.v2-layout-ready .contract-switcher .product-search-label {
    grid-column: 1 / -1;
  }

  html.v2-layout-ready .environment-control {
    grid-column: 2;
    grid-row: 3;
  }

  html.v2-layout-ready .contract-switcher .control-label,
  html.v2-layout-ready .environment-control > label {
    display: none;
  }

  html.v2-layout-ready #globalProductSearch,
  html.v2-layout-ready #globalProduct,
  html.v2-layout-ready #globalContract,
  html.v2-layout-ready #globalEnvironment {
    min-height: 40px;
    padding-inline: 7px 22px;
    font-size: 12px;
  }

  html.v2-layout-ready #globalProductSearch {
    padding-left: 30px;
  }

  html.v2-layout-ready .v2-command-side {
    display: contents;
  }

  html.v2-layout-ready .global-latest-quote {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    min-height: 42px;
    padding: 5px 8px;
    display: block;
    border: 1px solid var(--v2-line);
    border-radius: 3px;
  }

  html.v2-layout-ready #globalLastPrice { font-size: 20px; }

  html.v2-layout-ready .top-actions {
    grid-column: 2;
    grid-row: 2;
    padding-left: 7px;
    gap: 5px;
    border-left: 1px solid var(--v2-line);
  }

  html.v2-layout-ready .top-actions .broker-login-shortcut { display: none; }

  html.v2-layout-ready .system-ribbon {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;
    display: block;
    border: 0;
    border-bottom: 1px solid #bed4e2;
    border-radius: 0;
  }

  html.v2-layout-ready .system-ribbon > .top-status-item {
    display: none;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner {
    min-height: 52px;
    padding: 7px 10px;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: start;
    gap: 2px 7px;
    border: 0;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner svg {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner strong,
  html.v2-layout-ready .system-ribbon #environmentBanner span {
    grid-column: 2;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html.v2-layout-ready .view {
    padding: 10px 10px 80px;
  }

  html.v2-layout-ready .view > .page-heading {
    margin: -10px -10px 0;
    padding: 11px 10px;
  }

  html.v2-layout-ready .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  html.v2-layout-ready .page-heading::before {
    width: 100%;
    min-width: 0;
    min-height: 25px;
    padding: 0 0 6px;
    border-right: 0;
    border-bottom: 2px solid var(--v2-teal);
  }

  html.v2-layout-ready .page-heading h1 {
    font-size: 19px;
  }

  html.v2-layout-ready .page-heading > button,
  html.v2-layout-ready .page-heading > .view-actions,
  html.v2-layout-ready .page-heading > .gateway-state,
  html.v2-layout-ready .page-heading > .segmented-control {
    width: 100%;
    margin-left: 0;
  }

  html.v2-layout-ready .arbitrage-page-heading > .view-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
  }

  html.v2-layout-ready .arbitrage-page-heading > .view-actions > .timestamp {
    min-width: 0;
    grid-column: 1 / -1;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html.v2-layout-ready .overview-summary-row,
  html.v2-layout-ready .v2-overview-detail,
  html.v2-layout-ready .v2-detail-grid,
  html.v2-layout-ready .v2-control-grid,
  html.v2-layout-ready .v2-position-workspace,
  html.v2-layout-ready .v2-trade-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready .v2-analysis-controls .analysis-inputs {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #simulation .simulation-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #simulation .simulation-account-panel,
  html.v2-layout-ready #simulation .simulation-equity-panel {
    grid-column: 1;
  }

  html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid > section,
  html.v2-layout-ready #decision .v2-no-trade-band > .no-trade-section,
  html.v2-layout-ready #decision .decision-no-trade-section {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #decision .trend-report-detail-grid > section > h3,
  html.v2-layout-ready #decision .v2-no-trade-band .section-heading,
  html.v2-layout-ready #decision .decision-no-trade-section .section-heading {
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #decision .trend-chain-list,
  html.v2-layout-ready #decision .trend-capability-list,
  html.v2-layout-ready #decision .trend-limit-list,
  html.v2-layout-ready #decision .v2-no-trade-band .no-trade-grid,
  html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready #decision .decision-judgment-panel {
    overflow: visible;
  }

  html.v2-layout-ready .dashboard-grid,
  html.v2-layout-ready .decision-grid,
  html.v2-layout-ready .ranking-layout,
  html.v2-layout-ready .event-layout,
  html.v2-layout-ready .order-layout,
  html.v2-layout-ready .automation-layout,
  html.v2-layout-ready .arbitrage-layout,
  html.v2-layout-ready .risk-layout,
  html.v2-layout-ready .validation-layout,
  html.v2-layout-ready .cost-layout,
  html.v2-layout-ready .data-layout,
  html.v2-layout-ready .model-layout,
  html.v2-layout-ready .operations-layout,
  html.v2-layout-ready .governance-layout,
  html.v2-layout-ready .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #arbitrageDetail,
  html.v2-layout-ready .arbitrage-candidate-section {
    grid-column: auto;
    grid-row: auto;
  }

  html.v2-layout-ready #events .event-layout,
  html.v2-layout-ready #models .model-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #events .event-layout {
    height: auto;
    min-height: 0;
    align-items: start;
  }

  html.v2-layout-ready #events .timeline-panel {
    height: 600px;
    min-height: 420px;
  }

  html.v2-layout-ready #events .event-risk-panel {
    position: static;
    height: auto;
    overflow-y: visible;
  }

  html.v2-layout-ready #models .model-layout table {
    min-width: 780px;
    table-layout: auto;
  }

  html.v2-layout-ready #models .model-layout th,
  html.v2-layout-ready #models .model-layout td {
    white-space: nowrap;
  }

  html.v2-layout-ready .v2-chart-row,
  html.v2-layout-ready .v2-gauge-row {
    grid-template-columns: 62px minmax(60px, 1fr) 62px;
    gap: 6px;
  }

  html.v2-layout-ready button:not(.icon-button),
  html.v2-layout-ready select,
  html.v2-layout-ready .status-badge {
    min-width: 0;
    max-width: 100%;
  }

  html.v2-layout-ready button:not(.icon-button),
  html.v2-layout-ready .status-badge {
    height: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-overflow: clip;
  }

  html.v2-layout-ready .panel-heading,
  html.v2-layout-ready .section-heading,
  html.v2-layout-ready .view-actions {
    flex-wrap: wrap;
  }

  html.v2-layout-ready .segmented-control:not(.market-timeframe-control) {
    max-width: 100%;
    flex-wrap: wrap;
  }

  html.v2-layout-ready .segmented-control:not(.market-timeframe-control) > button {
    flex: 1 1 auto;
  }

  html.v2-layout-ready .button-block,
  html.v2-layout-ready #saveAutomationConfig,
  html.v2-layout-ready #acknowledgeRecoveryButton {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html.v2-layout-ready .v2-region-heading,
  html.v2-layout-ready .v2-overview-detail .v2-region-heading,
  html.v2-layout-ready .v2-detail-grid .v2-region-heading,
  html.v2-layout-ready .v2-control-grid .v2-region-heading,
  html.v2-layout-ready .v2-position-workspace .v2-region-heading {
    grid-column: 1;
  }

  html.v2-layout-ready .settings-nav {
    position: static;
  }
}

@media (max-width: 500px) {
  html.v2-layout-ready #decision .trend-chain-list,
  html.v2-layout-ready #decision .trend-capability-list,
  html.v2-layout-ready #decision .trend-limit-list,
  html.v2-layout-ready #decision .v2-no-trade-band .no-trade-grid,
  html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready .top-actions .user-button-copy {
    display: none;
  }
}

/* Desktop readability and hierarchy pass across every production workspace. */
:root {
  --v2-muted: #526771;
  --v2-line: #cbd7dc;
  --v2-line-strong: #aebfc6;
}

@media (min-width: 721px) {
  html.v2-layout-ready .nav-button {
    font-size: 14px;
  }

  html.v2-layout-ready .nav-button::after,
  html.v2-layout-ready .nav-group-label,
  html.v2-layout-ready .control-label,
  html.v2-layout-ready .environment-control > label,
  html.v2-layout-ready .global-latest-quote > span {
    font-size: 12px;
  }

  html.v2-layout-ready .system-ribbon .top-status-item > span {
    font-size: 11px;
  }

  html.v2-layout-ready .system-ribbon .top-status-item > strong {
    font-size: 13px;
  }

  html.v2-layout-ready .view {
    padding-bottom: 28px;
  }

  html.v2-layout-ready .v2-region + .v2-region {
    margin-top: 12px;
  }

  html.v2-layout-ready .page-heading::before {
    min-width: 96px;
    font-size: 12px;
  }

  html.v2-layout-ready .v2-region-heading {
    min-height: 25px;
    margin-bottom: 7px;
  }

  html.v2-layout-ready .v2-region-heading span {
    font-size: 13px;
  }

  html.v2-layout-ready .metric-card,
  html.v2-layout-ready .trade-account-strip > div {
    padding: 10px 12px;
  }

  html.v2-layout-ready .compact-metrics .metric-card,
  html.v2-layout-ready .automation-metrics .metric-card {
    padding-block: 6px;
  }

  html.v2-layout-ready .automation-metrics {
    grid-template-columns:
      minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr)
      minmax(0, 1fr) minmax(0, 1.2fr);
  }

  html.v2-layout-ready .metric-card > span,
  html.v2-layout-ready .metric-card > small,
  html.v2-layout-ready .ranking-summary-strip span,
  html.v2-layout-ready .ranking-summary-strip small,
  html.v2-layout-ready .trade-account-strip span {
    font-size: 12px;
  }

  html.v2-layout-ready .metric-card > strong,
  html.v2-layout-ready .ranking-summary-strip strong,
  html.v2-layout-ready .trade-account-strip strong {
    font-size: 20px;
    line-height: 1.08;
  }

  html.v2-layout-ready .tool-panel,
  html.v2-layout-ready .table-section,
  html.v2-layout-ready .detail-panel,
  html.v2-layout-ready .log-panel,
  html.v2-layout-ready .trade-environment-workbench,
  html.v2-layout-ready .arbitrage-auto-workbench,
  html.v2-layout-ready .arbitrage-capability-section,
  html.v2-layout-ready .operator-control-strip,
  html.v2-layout-ready .forward-progress-panel {
    border-color: var(--v2-line);
    box-shadow: 0 3px 12px rgba(16, 44, 55, .055);
  }

  html.v2-layout-ready .tool-panel,
  html.v2-layout-ready .detail-panel,
  html.v2-layout-ready .log-panel,
  html.v2-layout-ready .forward-progress-panel {
    padding: 14px;
  }

  html.v2-layout-ready .panel-heading,
  html.v2-layout-ready .section-heading {
    min-height: 46px;
    padding-bottom: 9px;
  }

  html.v2-layout-ready .panel-heading p,
  html.v2-layout-ready .section-heading p {
    font-size: 12px;
    line-height: 1.45;
  }

  html.v2-layout-ready .table-section .section-heading {
    padding: 9px 12px;
    background: #fbfcfd;
  }

  html.v2-layout-ready th,
  html.v2-layout-ready td {
    padding: 9px 11px;
  }

  html.v2-layout-ready th {
    color: #465d67;
    background: #f0f5f6;
    font-weight: 700;
  }

  html.v2-layout-ready .status-badge,
  html.v2-layout-ready .direction-chip {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 12px;
  }

  html.v2-layout-ready .status-good {
    border-color: #78bfa8;
    background: #e1f3ec;
  }

  html.v2-layout-ready .status-warn {
    border-color: #d9ae58;
    background: #fff0cf;
  }

  html.v2-layout-ready .status-blocked {
    border-color: #dc8e97;
    background: #fbe5e8;
  }

  html.v2-layout-ready .status-neutral {
    border-color: #8ebbd4;
    background: #e4f1f8;
  }

  html.v2-layout-ready .detail-note,
  html.v2-layout-ready .conflict-row,
  html.v2-layout-ready .plan-blocker {
    padding: 9px 10px;
    line-height: 1.5;
  }

  html.v2-layout-ready .latest-price-cell,
  html.v2-layout-ready [id$="LastPrice"],
  html.v2-layout-ready [id$="LastPriceValue"] {
    color: #071a22;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
  }

  html.v2-layout-ready #positions .position-empty-facts dt,
  html.v2-layout-ready #positions .position-fact-grid dt,
  html.v2-layout-ready #positions .position-highlight-strip span,
  html.v2-layout-ready #positions .position-highlight-strip small,
  html.v2-layout-ready #positions .position-exit-summary span,
  html.v2-layout-ready #positions .position-utilization-grid {
    font-size: 12px;
  }

  html.v2-layout-ready #positions .position-empty-facts dd,
  html.v2-layout-ready #positions .position-fact-grid dd,
  html.v2-layout-ready #positions .position-highlight-strip strong,
  html.v2-layout-ready #positions .position-exit-summary strong {
    font-size: 14px;
  }

  html.v2-layout-ready .v2-chart-heading strong {
    font-size: 13px;
  }

  html.v2-layout-ready .v2-chart-heading span,
  html.v2-layout-ready .v2-chart-row > span,
  html.v2-layout-ready .v2-gauge-row > span,
  html.v2-layout-ready .v2-chart-row > strong,
  html.v2-layout-ready .v2-gauge-row > strong,
  html.v2-layout-ready .v2-chart-legend span {
    font-size: 11px;
  }

  html.v2-layout-ready .v2-stacked-bar.is-empty::after {
    font-size: 11px;
  }
}

/* Decision evidence and arbitrage gate composition refinements. */
html.v2-layout-ready #decision .decision-no-trade-section {
  grid-template-columns: minmax(260px, .28fr) minmax(0, 1fr);
  border: 0;
  background: #f9edef;
}

html.v2-layout-ready #decision .decision-no-trade-section .section-heading {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border: 0;
  background: #f9edef;
  text-align: center;
}

html.v2-layout-ready #decision .decision-no-trade-section .section-heading > div {
  width: 100%;
}

html.v2-layout-ready #decision .decision-no-trade-section .section-heading h2 {
  color: #8f2230;
  font-size: 16px;
}

html.v2-layout-ready #decision .decision-no-trade-section .section-heading p {
  max-width: 230px;
  margin-top: 4px;
  margin-inline: auto;
  line-height: 1.4;
}

html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: stretch;
  gap: 0;
  background: #f9edef;
}

html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid > span {
  position: relative;
  min-width: 0;
  min-height: 58px;
  justify-content: center;
  gap: 9px;
  padding: 11px 14px;
  border: 0;
  background: #f9edef;
  color: #263f49;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid > span::before {
  content: "!";
  display: inline-flex;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c86f79;
  border-radius: 50%;
  background: #fbeaec;
  color: #a42635;
  font-size: 12px;
  font-weight: 800;
}

html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid > span:last-child {
  border-right: 0;
}

html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 0;
  background: transparent;
}

html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid > section {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--v2-line);
  border-top: 3px solid var(--v2-teal);
  background: #fff;
  box-shadow: 0 2px 7px rgba(16, 44, 55, .045);
}

html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid > section:nth-child(2) {
  border-top-color: var(--v2-blue);
}

html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid > section:nth-child(3) {
  border-top-color: var(--v2-gold);
}

html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid > section + section {
  border-top-width: 3px;
}

html.v2-layout-ready #decision .trend-report-detail-grid > section > h3 {
  min-height: 42px;
  padding: 10px 12px;
  align-items: center;
  border-right: 0;
  border-bottom: 1px solid var(--v2-line);
  background: #f5f8f9;
  font-size: 13px;
}

html.v2-layout-ready #decision .trend-chain-list,
html.v2-layout-ready #decision .trend-capability-list,
html.v2-layout-ready #decision .trend-limit-list {
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff;
}

html.v2-layout-ready #decision .trend-chain-list > div,
html.v2-layout-ready #decision .trend-capability-list > div,
html.v2-layout-ready #decision .trend-limit-list > li {
  min-height: 58px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

html.v2-layout-ready #decision .trend-capability-list > div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-content: center;
}

html.v2-layout-ready #decision .trend-chain-list > div:nth-child(2n),
html.v2-layout-ready #decision .trend-capability-list > div:nth-child(2n),
html.v2-layout-ready #decision .trend-limit-list > li:nth-child(2n) {
  border-right: 0;
}

html.v2-layout-ready .arbitrage-auto-gate {
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--v2-line);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

html.v2-layout-ready .arbitrage-auto-gate-status {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-right: 0;
  border-bottom: 1px solid var(--v2-line);
  background: #fff;
}

html.v2-layout-ready .arbitrage-auto-gate-heading {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-right: 0;
  border-bottom: 1px solid var(--v2-line);
  background: #f5f8f9;
}

html.v2-layout-ready .arbitrage-auto-gate-heading span {
  color: #193742;
  font-size: 12px;
  font-weight: 750;
}

html.v2-layout-ready .arbitrage-auto-gate-heading strong {
  color: var(--v2-red);
  font-size: 12px;
  white-space: nowrap;
}

html.v2-layout-ready .arbitrage-auto-gate-status > span {
  width: auto;
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-left: 0;
  border-right: 1px solid var(--v2-line);
  background: #fff;
  font-size: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}

html.v2-layout-ready .arbitrage-auto-gate-status > span:last-child {
  border-right: 0;
}

html.v2-layout-ready .arbitrage-auto-gate-status > span > svg {
  display: none;
}

html.v2-layout-ready .arbitrage-evidence-metrics .metric-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(92px, .72fr) minmax(0, 1.28fr);
  grid-template-rows: auto auto;
  align-content: center;
  justify-content: stretch;
  column-gap: 10px;
  row-gap: 2px;
  padding: 9px 12px;
  border-top: 0;
  background: #fff;
}

html.v2-layout-ready .arbitrage-evidence-metrics .metric-card > span {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  color: #415b65;
  font-size: 11px;
  font-weight: 650;
}

html.v2-layout-ready .arbitrage-evidence-metrics .metric-card > strong {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
  font-size: 18px;
  line-height: 1.1;
}

html.v2-layout-ready .arbitrage-evidence-metrics .metric-card > small {
  grid-column: 2;
  grid-row: 2;
  margin-top: 0;
  color: #61747d;
}

@media (max-width: 1040px) and (min-width: 721px) {
  html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid > section {
    min-height: 0;
  }

}

@media (max-width: 720px) {
  html.v2-layout-ready #decision .decision-no-trade-section,
  html.v2-layout-ready .arbitrage-auto-gate {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #decision .decision-no-trade-section .section-heading,
  html.v2-layout-ready .arbitrage-auto-gate-status {
    border-right: 0;
    border-bottom: 0;
  }

  html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid {
    display: grid;
    justify-content: stretch;
  }

  html.v2-layout-ready .arbitrage-auto-gate-status {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready .arbitrage-auto-gate-heading {
    width: 100%;
    flex-basis: auto;
    padding: 3px 2px 7px;
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready .arbitrage-auto-gate-status > span {
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid,
  html.v2-layout-ready #decision .trend-chain-list,
  html.v2-layout-ready #decision .trend-capability-list,
  html.v2-layout-ready #decision .trend-limit-list {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #decision .trend-report-section > .trend-report-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready .arbitrage-evidence-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready .arbitrage-evidence-metrics .metric-card {
    min-height: 86px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 9px 10px;
  }

  html.v2-layout-ready .arbitrage-evidence-metrics .metric-card > strong {
    margin-top: 4px;
    font-size: 18px;
  }

  html.v2-layout-ready .arbitrage-evidence-metrics .metric-card > small {
    margin-top: 3px;
  }
}

/* Qualification labels must not create implicit narrow columns. */
html.v2-layout-ready #governance .recovery-checklist > .qualification-state {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
}

html.v2-layout-ready #governance .recovery-checklist > .qualification-state::before {
  grid-column: 1;
  grid-row: 1;
}

html.v2-layout-ready #governance .recovery-checklist > .qualification-state > span {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
  color: #29454f;
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

html.v2-layout-ready #validation .replay-section > .table-scroll {
  overflow: auto;
  scrollbar-gutter: stable;
}

html.v2-layout-ready #validation .replay-section table {
  width: 100%;
  min-width: 1530px;
  table-layout: fixed;
}

html.v2-layout-ready #validation .replay-section th:nth-child(1) { width: 72px; }
html.v2-layout-ready #validation .replay-section th:nth-child(2) { width: 150px; }
html.v2-layout-ready #validation .replay-section th:nth-child(3),
html.v2-layout-ready #validation .replay-section th:nth-child(4) { width: 150px; }
html.v2-layout-ready #validation .replay-section th:nth-child(5),
html.v2-layout-ready #validation .replay-section th:nth-child(6) { width: 100px; }
html.v2-layout-ready #validation .replay-section th:nth-child(7) { width: 190px; }
html.v2-layout-ready #validation .replay-section th:nth-child(8) { width: 470px; }
html.v2-layout-ready #validation .replay-section th:nth-child(9) { width: 148px; }

html.v2-layout-ready #validation #replayBody td {
  height: auto;
  vertical-align: middle;
}

html.v2-layout-ready #validation #replayBody td:not(:nth-child(8)) {
  white-space: nowrap;
}

html.v2-layout-ready #validation #replayBody td:nth-child(8) {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

html.v2-layout-ready #validation #replayBody .status-badge.qualification-state {
  display: inline-flex;
  flex-wrap: nowrap;
  width: max-content;
  max-width: none;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
}

html.v2-layout-ready #validation #replayBody .status-badge.qualification-state::before {
  min-height: 24px;
  padding: 3px 8px;
}

html.v2-layout-ready #validation #replayBody .replay-job-status,
html.v2-layout-ready #validation #replayBody .replay-result-label {
  color: #28444f;
  font-weight: 650;
}

html.v2-layout-ready #validation #replayBody .replay-blocker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

html.v2-layout-ready #validation #replayBody .replay-blocker-list > span {
  padding: 3px 7px;
  border-radius: 3px;
  background: #f9edef;
  color: #7e2934;
  line-height: 1.35;
}

html.v2-layout-ready #validation #replayBody .replay-blocker-list > .is-clear {
  background: #e8f4ef;
  color: #146b4a;
}

html.v2-layout-ready #validation #replayBody .replay-blocker-list > .is-warning {
  background: #fff4df;
  color: #8a5711;
}

/* Account reconciliation uses the available grid height for a real four-step workflow. */
html.v2-layout-ready #operations .operations-layout {
  align-items: stretch;
}

html.v2-layout-ready #operations .operations-layout > .table-section,
html.v2-layout-ready #operations .operations-layout > .reconciliation-panel {
  margin-bottom: 0;
}

html.v2-layout-ready #operations .reconciliation-panel {
  min-height: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

html.v2-layout-ready #operations .reconciliation-flow {
  min-height: 260px;
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--v2-line);
}

html.v2-layout-ready #operations .reconciliation-flow-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
}

html.v2-layout-ready #operations .reconciliation-flow-heading > div,
html.v2-layout-ready #operations .reconciliation-step-copy {
  min-width: 0;
}

html.v2-layout-ready #operations .reconciliation-flow-heading strong,
html.v2-layout-ready #operations .reconciliation-flow-heading span,
html.v2-layout-ready #operations .reconciliation-step-copy strong,
html.v2-layout-ready #operations .reconciliation-step-copy small {
  display: block;
}

html.v2-layout-ready #operations .reconciliation-flow-heading > div > strong {
  color: #12333d;
  font-size: 14px;
}

html.v2-layout-ready #operations .reconciliation-flow-heading > div > span {
  margin-top: 3px;
  color: var(--v2-muted);
  font-size: 11px;
}

html.v2-layout-ready #operations .reconciliation-flow-list {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: repeat(4, minmax(58px, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--v2-line);
  list-style: none;
}

html.v2-layout-ready #operations .reconciliation-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 8px 8px;
  border-bottom: 1px solid var(--v2-line);
  border-left: 0;
}

html.v2-layout-ready #operations .reconciliation-step-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #a8bbc2;
  border-radius: 50%;
  color: #38545e;
  background: #f5f8f9;
  font-size: 11px;
  font-weight: 750;
}

html.v2-layout-ready #operations .reconciliation-step-copy strong {
  color: #173640;
  font-size: 12px;
}

html.v2-layout-ready #operations .reconciliation-step-copy small {
  margin-top: 3px;
  color: var(--v2-muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #operations .reconciliation-step > svg {
  width: 17px;
  height: 17px;
  color: #7b9098;
}

html.v2-layout-ready #operations .reconciliation-step.is-passed > svg { color: var(--v2-green); }
html.v2-layout-ready #operations .reconciliation-step.is-pending > svg { color: var(--v2-amber); }
html.v2-layout-ready #operations .reconciliation-step.is-blocked > svg { color: var(--v2-red); }

html.v2-layout-ready #operations .reconciliation-panel > .detail-note {
  flex: 0 0 auto;
  margin-top: 12px;
}

@media (min-width: 1181px) {
  html.v2-layout-ready #operations .operations-layout > .table-section table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(1) { width: 30%; }
  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(2) { width: 16%; }
  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(3) { width: 23%; }
  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(4) { width: 23%; }
  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(5) { width: 8%; }

  html.v2-layout-ready #operations .operations-layout > .table-section td {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section > .table-scroll,
  html.v2-layout-ready #operations .operations-layout > .reconciliation-panel {
    overflow-y: hidden;
    scrollbar-gutter: auto;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section tbody tr {
    height: 27px;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section tbody td {
    box-sizing: border-box;
    height: 27px;
    padding: 1px 6px;
    font-size: var(--font-body);
    line-height: 1.25;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section thead tr,
  html.v2-layout-ready #operations .operations-layout > .table-section thead th {
    box-sizing: border-box;
    height: 22px;
    padding: 0 6px;
    line-height: 1.15;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section > .section-heading {
    min-height: 46px;
    padding: 4px 10px;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section .status-badge {
    min-height: 18px;
    padding: 0 5px;
    font-size: var(--font-meta);
  }

  html.v2-layout-ready #operations .operations-layout > .table-section .icon-button.small {
    width: 20px;
    height: 20px;
    min-height: 20px;
    padding: 2px;
  }

  html.v2-layout-ready #operations .reconciliation-panel > .panel-heading {
    min-height: 34px;
    margin-bottom: 8px;
  }

  html.v2-layout-ready #operations .reconciliation-panel > .plan-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 1px solid var(--v2-line);
    background: #f8fafb;
  }

  html.v2-layout-ready #operations .reconciliation-panel > .plan-list > div {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 6px 8px;
    border-right: 1px solid var(--v2-line);
    border-bottom: 0;
  }

  html.v2-layout-ready #operations .reconciliation-panel > .plan-list > div:last-child {
    border-right: 0;
  }

  html.v2-layout-ready #operations .reconciliation-panel > .plan-list dd {
    margin-top: 2px;
    text-align: left;
    line-height: 1.25;
  }

  html.v2-layout-ready #operations .reconciliation-flow {
    min-height: 0;
    flex: 0 0 auto;
    margin-top: 9px;
    padding-top: 7px;
  }

  html.v2-layout-ready #operations .reconciliation-flow-heading {
    align-items: center;
    padding-bottom: 6px;
  }

  html.v2-layout-ready #operations .reconciliation-flow-list {
    min-height: 92px;
    flex: 0 0 auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: minmax(92px, auto);
    border-left: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #operations .reconciliation-step {
    grid-template-columns: 24px minmax(0, 1fr) 16px;
    align-content: center;
    gap: 6px;
    padding: 7px 6px;
    border-right: 1px solid var(--v2-line);
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #operations .reconciliation-step-copy small {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.25;
  }

  html.v2-layout-ready #operations .reconciliation-panel > .detail-note {
    margin-top: 8px;
    padding: 7px 9px;
    line-height: 1.35;
  }
}

/* Governance summary now belongs to the software qualification evidence list. */
html.v2-layout-ready #governance .governance-qualification-summary {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 14px 0 0;
  border-top: 1px solid var(--v2-line);
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
  min-height: 57px;
  position: relative;
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: baseline;
  column-gap: 6px;
  row-gap: 2px;
  padding: 9px 4px 9px 50px;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  border-radius: 0;
  background: transparent;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card::before,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card::after {
  display: none;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > span,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card > strong,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card > small {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > strong {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  font-size: var(--font-meta);
  font-weight: 500;
  line-height: 1.35;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > span {
  grid-column: 1;
  grid-row: 1;
  color: #173640;
  font-size: var(--font-meta);
  font-weight: 500;
  line-height: 1.35;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > small {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--v2-muted);
  font-size: var(--font-assist);
  line-height: 1.45;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > strong.qualification-state::before {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
}

html.v2-layout-ready #governance .governance-warning {
  margin: 12px 0 0;
}

/* Arbitrage follows execution management + capability -> auto config -> ranking -> gate -> method. */
html.v2-layout-ready #arbitrage .v2-arbitrage-control-capability {
  border: 1px solid var(--v2-line);
  border-radius: 4px;
  background: var(--v2-surface);
  box-shadow: 0 3px 12px rgba(19, 45, 55, .035);
  overflow: hidden;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-capability > .operator-control-strip {
  width: 100%;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  border-radius: 0;
  background: #f5f8f9;
  box-shadow: none;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-capability > .arbitrage-capability-section {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-auto-workspace > .arbitrage-auto-workbench,
html.v2-layout-ready #arbitrage .v2-arbitrage-gate-band > .arbitrage-auto-gate {
  width: 100%;
  margin: 0;
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--v2-line);
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics .metric-card {
  min-height: 72px;
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--v2-line);
  border-radius: 0;
  background: #f8fafb;
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics .metric-card:last-child {
  border-right: 0;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-gate-band {
  padding-top: 0;
}

@media (max-width: 1180px) {
  html.v2-layout-ready #operations .reconciliation-flow {
    min-height: 0;
    flex-basis: auto;
  }

  html.v2-layout-ready #operations .reconciliation-flow-list {
    grid-template-rows: repeat(4, minmax(58px, auto));
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics .metric-card:nth-child(3) {
    border-right: 0;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics .metric-card:nth-child(-n + 3) {
    border-bottom: 1px solid var(--v2-line);
  }
}

@media (max-width: 720px) {
  html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
    grid-template-columns: max-content max-content minmax(0, 1fr);
  }

  html.v2-layout-ready #governance .governance-qualification-summary .metric-card > small {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  html.v2-layout-ready #governance .governance-qualification-summary .metric-card > span {
    grid-column: 1;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics .metric-card,
  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics .metric-card:nth-child(3) {
    border-right: 1px solid var(--v2-line);
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics .metric-card:nth-child(2n),
  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics .metric-card:last-child {
    border-right: 0;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-metrics .metric-card:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }
}

/* Premium terminal contrast layer: visual emphasis stays on price, action and risk. */
:root {
  --v2-canvas: #e9eff1;
  --v2-surface-soft: #f1f5f6;
  --v2-ink: #0b2029;
  --v2-muted: #506670;
  --v2-line: #becdd2;
  --v2-line-strong: #96abb3;
  --v2-blue: #006a99;
  --v2-teal: #007a63;
  --v2-gold: #8d5b00;
  --v2-red: #b52435;
  --v2-green: #006d4d;
  --v2-sidebar: #0d2028;
  --state-pass-ink: #006746;
  --state-pass-fill: #dff1e9;
  --state-pass-line: #6faf97;
  --state-wait-ink: #7e5200;
  --state-wait-fill: #fff0cf;
  --state-wait-line: #d2a64b;
  --state-block-ink: #9f2633;
  --state-block-fill: #f9e3e6;
  --state-block-line: #d17983;
  --state-info-ink: #245b72;
  --state-info-fill: #e2eef3;
  --state-info-line: #82adbf;
}

html.v2-layout-ready .sidebar {
  background: var(--v2-sidebar);
  border-right-color: #29444e;
  box-shadow: 10px 0 30px rgba(6, 23, 30, .13);
}

html.v2-layout-ready .nav-button.is-active {
  background: #07504d;
  border-color: #147268;
  color: #ffffff;
  box-shadow: inset 4px 0 0 #4de0b8, 0 4px 12px rgba(0, 0, 0, .14);
}

html.v2-layout-ready .nav-button.is-active svg { color: #61f0c8; }

html.v2-layout-ready .sidebar-footer {
  border-color: #31525e;
  background: #142d36;
  box-shadow: inset 0 3px 0 #2b6f68;
}

html.v2-layout-ready .topbar {
  background: #ffffff;
  border-bottom-color: #b3c4ca;
  box-shadow: 0 4px 16px rgba(11, 32, 41, .08);
}

html.v2-layout-ready .global-latest-quote {
  padding: 7px 12px;
  border: 1px solid #9eb8c3;
  background: #e1edf1;
  box-shadow: inset 4px 0 0 var(--v2-blue);
}

html.v2-layout-ready .global-latest-quote > strong {
  color: #003f58;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

html.v2-layout-ready .metric-card {
  border-color: #b9c9cf;
  box-shadow: 0 3px 10px rgba(11, 32, 41, .065);
}

html.v2-layout-ready .metric-card::before {
  width: 4px;
  background: var(--v2-blue);
}

html.v2-layout-ready .metric-card:has(.status-value-good)::before,
html.v2-layout-ready .metric-card:has(.value-positive)::before { background: var(--v2-green); }
html.v2-layout-ready .metric-card:has(.status-value-warn)::before,
html.v2-layout-ready .metric-card:has(.value-warning)::before { background: #d39a19; }
html.v2-layout-ready .metric-card:has(.status-value-bad)::before,
html.v2-layout-ready .metric-card:has(.value-negative)::before { background: var(--v2-red); }

html.v2-layout-ready .tool-panel,
html.v2-layout-ready .table-section,
html.v2-layout-ready .detail-panel,
html.v2-layout-ready .log-panel,
html.v2-layout-ready .forward-progress-panel,
html.v2-layout-ready .trade-environment-workbench,
html.v2-layout-ready .arbitrage-auto-workbench,
html.v2-layout-ready .arbitrage-capability-section,
html.v2-layout-ready .operator-control-strip {
  border-color: var(--v2-line);
  box-shadow: 0 4px 14px rgba(11, 32, 41, .06);
}

html.v2-layout-ready .section-heading {
  background: #edf3f4;
  border-bottom-color: #b8c8ce;
}

html.v2-layout-ready table thead th {
  background: #e6eef0;
  color: #314f5b;
  font-size: 12px;
  line-height: 1.3;
}

html.v2-layout-ready td {
  font-size: 13px;
  line-height: 1.4;
}

html.v2-layout-ready tbody tr:hover td { background: #e8f3f1; }

html.v2-layout-ready .primary-button,
html.v2-layout-ready .segmented-control button.is-selected {
  border-color: #005f8b;
  background: #005f8b;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 95, 139, .2);
}

html.v2-layout-ready .primary-button:hover,
html.v2-layout-ready .segmented-control button.is-selected:hover {
  border-color: #004d72;
  background: #004d72;
}

html.v2-layout-ready .danger-button {
  border-color: var(--v2-red);
  background: var(--v2-red);
  box-shadow: 0 3px 8px rgba(181, 36, 53, .18);
}

html.v2-layout-ready .market-panel,
html.v2-layout-ready .order-ticket,
html.v2-layout-ready .order-book-panel { border-top-color: var(--v2-blue); }
html.v2-layout-ready .fundamental-report-panel { border-top-color: var(--v2-teal); }
html.v2-layout-ready .trade-plan-panel,
html.v2-layout-ready .execution-plan { border-top-color: #c48a0d; }

html.v2-layout-ready .status-value-good { color: #006746; }
html.v2-layout-ready .status-value-warn { color: #8d5b00; }
html.v2-layout-ready .status-value-bad { color: #ad2635; }

html.v2-layout-ready button:focus-visible,
html.v2-layout-ready input:focus-visible,
html.v2-layout-ready select:focus-visible,
html.v2-layout-ready textarea:focus-visible,
html.v2-layout-ready [tabindex]:focus-visible {
  outline-color: #008bb5;
  box-shadow: 0 0 0 3px rgba(0, 139, 181, .16);
}

html.v2-layout-ready #models .model-layout td:nth-child(4) .qualification-state::before,
html.v2-layout-ready #models .model-layout td:nth-child(5) .qualification-state::before {
  min-height: 20px;
  padding: 1px 5px;
  font-size: 11px;
}

html.v2-layout-ready #models .model-layout > .table-section > .table-scroll > table {
  height: auto;
}

html.v2-layout-ready #models .model-layout > .table-section tbody tr {
  height: 36px;
}

/* Contract decision: stable result -> analysis -> evidence hierarchy. */
html.v2-layout-ready #decision .decision-hierarchy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

html.v2-layout-ready #decision .decision-hierarchy-grid > .tool-panel {
  width: 100%;
  min-width: 0;
  height: auto;
  align-self: start;
  overflow: visible;
}

html.v2-layout-ready #decision .decision-final-layer {
  padding-bottom: 12px;
  border-top: 4px solid var(--v2-blue);
  box-shadow: 0 7px 20px rgba(11, 58, 77, .10);
}

html.v2-layout-ready #decision .decision-final-layer > .panel-heading {
  margin: -12px -12px 12px;
  padding: 12px 14px;
  background: #eaf2f5;
  border-bottom: 1px solid #b6c9d1;
}

html.v2-layout-ready #decision .decision-final-layer > .panel-heading h2 {
  color: #003e58;
  font-size: 16px;
}

html.v2-layout-ready #decision .decision-final-layer > .direction-summary {
  min-width: 0;
  margin: 0;
  border: 1px solid #b8cbd3;
  border-left: 4px solid var(--v2-blue);
  background: #f7fafb;
}

html.v2-layout-ready #decision .decision-final-insight {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(390px, 1.28fr) minmax(360px, 1.15fr) minmax(220px, .72fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
}

html.v2-layout-ready #decision .decision-final-insight > * {
  min-width: 0;
  height: auto;
  align-self: stretch;
}

html.v2-layout-ready #decision .decision-final-insight .trend-report-key-status {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
  border-top-width: 1px;
}

html.v2-layout-ready #decision .decision-final-insight .trend-report-model-status {
  grid-column: auto;
}

html.v2-layout-ready #decision .decision-final-outcome {
  min-width: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 13px 15px;
  border: 1px solid #d6b766;
  border-top: 3px solid #c48a0d;
  background: #fff8e7;
}

html.v2-layout-ready #decision .decision-final-outcome.is-executable {
  border-color: #68a893;
  border-top-color: var(--v2-green);
  background: #edf8f4;
}

html.v2-layout-ready #decision .decision-final-outcome.is-blocked {
  border-color: #d9a3aa;
  border-top-color: var(--v2-red);
  background: #fff2f3;
}

html.v2-layout-ready #decision .decision-final-outcome > span {
  color: #5c717a;
  font-size: 12px;
  font-weight: 650;
}

html.v2-layout-ready #decision .decision-final-outcome > strong {
  display: block;
  margin-top: 5px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.08;
}

html.v2-layout-ready #decision .decision-final-outcome > p {
  margin: 8px 0 0;
  color: #334f5a;
  font-size: 13px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #decision .decision-final-outcome > small {
  margin-top: 9px;
  color: #657a83;
  font-size: 11px;
  line-height: 1.35;
}

html.v2-layout-ready #decision .decision-final-judgment {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(92, 113, 122, .28);
}

html.v2-layout-ready #decision .decision-final-judgment > span {
  color: #5c717a;
  font-size: 11px;
  font-weight: 650;
}

html.v2-layout-ready #decision .decision-final-judgment > strong {
  color: #123746;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #decision .decision-final-judgment > small {
  color: #657a83;
  font-size: 11px;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #decision .decision-final-layer > .conflict-row {
  margin: 10px 0 0;
}

html.v2-layout-ready #decision .decision-market-data-source[hidden] {
  display: none !important;
}

html.v2-layout-ready #decision .decision-execution-layer,
html.v2-layout-ready #decision .decision-analysis-layer {
  padding: 12px;
}

html.v2-layout-ready #decision .decision-execution-layer {
  border-top: 3px solid #c48a0d;
}

html.v2-layout-ready #decision .decision-analysis-layer {
  border-top: 3px solid var(--v2-teal);
}

html.v2-layout-ready #decision .decision-execution-layer > .panel-heading,
html.v2-layout-ready #decision .decision-analysis-layer > .panel-heading {
  margin: -12px -12px 12px;
  padding: 11px 13px;
  background: #f0f5f6;
  border-bottom: 1px solid #c3d1d6;
}

html.v2-layout-ready #decision .decision-layer-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

html.v2-layout-ready #decision .decision-report-authority {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
}

html.v2-layout-ready #decision .report-authority-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #8caeb8;
  border-radius: 4px;
  background: #e8f2f4;
  color: #0b5364;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

html.v2-layout-ready #decision .report-authority-badge.is-limited {
  border-color: #d6b766;
  background: #fff8e7;
  color: #79560a;
}

html.v2-layout-ready #decision .decision-report-authority > small {
  max-width: 310px;
  color: #657a83;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  margin-bottom: 10px;
  gap: 1px;
  background: #a9bec5;
  border-color: #a9bec5;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step {
  min-height: 86px;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 4px;
  background: #f8fafb;
  border: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > span {
  font-size: var(--font-meta);
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > strong {
  font-size: var(--font-body);
  line-height: 1.35;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > .pipeline-direction-bullish {
  color: var(--price-up);
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > .pipeline-direction-bearish {
  color: var(--price-down);
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > .pipeline-direction-neutral {
  color: var(--v2-gold);
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > small {
  font-size: var(--font-assist);
  line-height: 1.45;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step:last-child {
  border-right: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin: 0 0 10px;
  gap: 1px;
  background: #a9bec5;
  border-color: #a9bec5;
}

html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip > div {
  min-height: 110px;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 4px;
  background: #f8fafb;
  border: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip span {
  font-size: var(--font-meta);
}

html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip strong {
  font-size: var(--font-body);
  text-align: left;
}

html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip small {
  grid-column: auto;
  font-size: var(--font-assist);
  line-height: 1.45;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection {
  min-width: 0;
  margin-top: 10px;
  padding-bottom: 10px;
  overflow: hidden;
  background: #f8fafb;
  border-top: 1px solid #c3d1d6;
  border-bottom: 1px solid #d5dfe2;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  background: #eaf1f3;
  border-bottom: 1px solid #cbd8dc;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading > span {
  flex: 0 0 30px;
  color: #17616c;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading > div {
  min-width: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading h3,
html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading p {
  margin: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading h3 {
  color: #17333a;
  font-size: var(--font-section);
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading p {
  margin-top: 2px;
  color: var(--v2-muted);
  font-size: var(--font-meta);
}

html.v2-layout-ready #decision .decision-execution-layer .execution-pipeline-section {
  margin-top: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-trigger-section > .execution-subsection-heading {
  background: #eaf2f7;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-strategy-section > .execution-subsection-heading {
  background: #e9f3f1;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-risk-section > .execution-subsection-heading {
  background: #f5f1e6;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-data-section > .execution-subsection-heading,
html.v2-layout-ready #decision .decision-execution-layer .execution-exit-section > .execution-subsection-heading {
  background: #f0f3f4;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection > .decision-pipeline,
html.v2-layout-ready #decision .decision-execution-layer .execution-subsection > .specialist-gate-strip,
html.v2-layout-ready #decision .decision-execution-layer .execution-subsection > .trigger-columns,
html.v2-layout-ready #decision .decision-execution-layer .execution-subsection > .plan-list,
html.v2-layout-ready #decision .decision-execution-layer .execution-subsection > .exit-rule-list {
  margin-left: 10px;
  margin-right: 10px;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection > .decision-pipeline,
html.v2-layout-ready #decision .decision-execution-layer .execution-subsection > .trigger-columns,
html.v2-layout-ready #decision .decision-execution-layer .execution-subsection > .plan-list {
  margin-top: 10px;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-pipeline-section > .decision-pipeline {
  margin-bottom: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-pipeline-section > .specialist-gate-strip {
  margin-top: -1px;
  margin-bottom: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .trigger-columns {
  align-items: start;
  gap: 10px;
}

html.v2-layout-ready #decision .decision-execution-layer .trigger-side {
  height: auto;
  min-height: 0;
  background: #f8fafb;
}

html.v2-layout-ready #decision .decision-execution-layer .trigger-side > span,
html.v2-layout-ready #decision .decision-execution-layer .trigger-side > small {
  font-size: var(--font-meta);
  line-height: 1.45;
}

html.v2-layout-ready #decision .decision-execution-layer .trigger-side.long-side > span,
html.v2-layout-ready #decision .decision-execution-layer .trigger-side.long-side > strong,
html.v2-layout-ready #decision .decision-execution-layer .trigger-side.long-side > small {
  color: var(--price-up);
}

html.v2-layout-ready #decision .decision-execution-layer .trigger-side.short-side > span,
html.v2-layout-ready #decision .decision-execution-layer .trigger-side.short-side > strong,
html.v2-layout-ready #decision .decision-execution-layer .trigger-side.short-side > small {
  color: var(--price-down);
}

html.v2-layout-ready #decision .decision-execution-layer .scenario-levels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #a9bec5;
  border-color: #a9bec5;
}

html.v2-layout-ready #decision .decision-execution-layer .scenario-levels > div {
  min-height: 64px;
  padding: 7px 8px;
  background: #f8fafb;
}

html.v2-layout-ready #decision .decision-execution-layer .scenario-levels dt {
  font-size: var(--font-meta);
}

html.v2-layout-ready #decision .decision-execution-layer .scenario-levels dd {
  font-size: var(--font-body);
  line-height: 1.4;
}

html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact.execution-strategy-grid,
html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact.execution-risk-grid,
html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact.execution-data-grid {
  gap: 1px;
  overflow: hidden;
  background: #a9bec5;
  border: 1px solid #a9bec5;
}

html.v2-layout-ready #decision .decision-execution-layer .plan-list.execution-strategy-grid > div,
html.v2-layout-ready #decision .decision-execution-layer .plan-list.execution-risk-grid > div,
html.v2-layout-ready #decision .decision-execution-layer .plan-list.execution-data-grid > div {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 4px;
  padding: 9px 10px;
  background: #f8fafb;
  border: 0;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-strategy-grid dt,
html.v2-layout-ready #decision .decision-execution-layer .execution-risk-grid dt,
html.v2-layout-ready #decision .decision-execution-layer .execution-data-grid dt {
  color: #5a7077;
  font-size: var(--font-meta);
}

html.v2-layout-ready #decision .decision-execution-layer .execution-strategy-grid dd,
html.v2-layout-ready #decision .decision-execution-layer .execution-risk-grid dd,
html.v2-layout-ready #decision .decision-execution-layer .execution-data-grid dd {
  margin: 0;
  color: #132f37;
  font-size: var(--font-body);
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact.execution-risk-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact.execution-data-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.v2-layout-ready #decision .decision-execution-layer .execution-data-grid > .wide-plan-item {
  grid-column: 1 / -1;
}

html.v2-layout-ready #decision .decision-execution-layer .plan-list > div {
  min-width: 0;
  grid-template-columns: minmax(92px, .72fr) minmax(0, 1.28fr);
}

html.v2-layout-ready #decision .decision-execution-layer .exit-rule-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 10px;
  margin-bottom: 0;
  padding-top: 0;
  overflow: hidden;
  background: #a9bec5;
  border: 1px solid #a9bec5;
}

html.v2-layout-ready #decision .decision-execution-layer .exit-rule-list > span {
  min-width: 0;
  min-height: 72px;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 5px;
  padding: 8px 10px;
  background: #f8fafb;
  color: #29464f;
  font-size: var(--font-body);
  line-height: 1.45;
}

html.v2-layout-ready #decision .decision-execution-layer .exit-rule-list strong {
  font-size: var(--font-meta);
}

html.v2-layout-ready #decision .decision-execution-layer > .execution-disposition {
  display: none !important;
}

html.v2-layout-ready #decision .decision-analysis-layer > .trend-report-primary {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 12px;
}

html.v2-layout-ready #decision .decision-analysis-layer .direction-rationale {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin: 0;
}

html.v2-layout-ready #decision .decision-analysis-layer .rationale-column {
  min-height: 0;
  height: auto;
  align-self: stretch;
}

html.v2-layout-ready #decision .decision-analysis-layer .rationale-column > ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px 12px;
}

html.v2-layout-ready #decision .decision-analysis-layer .rationale-column > ul > li {
  align-content: start;
  padding: 7px 8px;
  border: 1px solid var(--v2-line);
  background: rgba(255, 255, 255, .72);
}

html.v2-layout-ready #decision .decision-analysis-layer .trend-scenario-grid {
  align-items: start;
}

html.v2-layout-ready #decision .decision-analysis-layer .trend-scenario-grid > article {
  min-height: 0;
  height: auto;
  align-self: start;
}

html.v2-layout-ready #decision .decision-evidence-layer {
  width: 100%;
  padding: 0;
  overflow: visible;
}

html.v2-layout-ready #decision .decision-analysis-data {
  min-width: 0;
}

html.v2-layout-ready #decision .decision-analysis-data > .section-heading {
  margin: 0;
  padding: 11px 13px;
}

html.v2-layout-ready #decision .decision-analysis-data-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: #c5d3d8;
}

html.v2-layout-ready #decision .decision-analysis-data-grid > div {
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-content: center;
  gap: 0 9px;
  padding: 10px 11px;
  background: #fff;
}

html.v2-layout-ready #decision .decision-analysis-data-grid > div > svg,
html.v2-layout-ready #decision .decision-analysis-data-grid > div > i {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  padding: 3px;
  border-radius: 50%;
  color: #fff;
  background: var(--v2-green);
}

html.v2-layout-ready #decision .decision-analysis-data-grid > .analysis-data-limited > svg,
html.v2-layout-ready #decision .decision-analysis-data-grid > .analysis-data-limited > i {
  background: var(--v2-red);
}

html.v2-layout-ready #decision .decision-analysis-data-grid span,
html.v2-layout-ready #decision .decision-analysis-data-grid strong,
html.v2-layout-ready #decision .decision-analysis-data-grid small {
  display: block;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #decision .decision-analysis-data-grid span {
  color: #5b7079;
  font-size: 11px;
}

html.v2-layout-ready #decision .decision-analysis-data-grid strong {
  margin-top: 3px;
  color: #173b4a;
  font-size: 14px;
}

html.v2-layout-ready #decision .decision-analysis-data-grid small {
  margin-top: 4px;
  color: #677a82;
  font-size: 11px;
  line-height: 1.4;
}

html.v2-layout-ready #decision .decision-report-catalog {
  min-width: 0;
  border-top: 1px solid var(--v2-line);
  background: #f7faf9;
}

html.v2-layout-ready #decision .decision-report-catalog-heading {
  min-width: 0;
  margin: 0;
  padding: 12px 13px;
  align-items: start;
}

html.v2-layout-ready #decision .decision-report-catalog-heading h3,
html.v2-layout-ready #decision .decision-report-catalog-heading p {
  overflow-wrap: anywhere;
}

html.v2-layout-ready #decision .decision-report-catalog-heading h3 {
  margin: 0;
  color: #173b4a;
  font-size: 15px;
  line-height: 1.35;
}

html.v2-layout-ready #decision .decision-report-catalog-heading p {
  max-width: 720px;
  margin: 4px 0 0;
  color: #677a82;
  font-size: 12px;
  line-height: 1.45;
}

html.v2-layout-ready #decision .decision-report-catalog-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: #c5d3d8;
}

html.v2-layout-ready #decision .decision-report-card {
  min-width: 0;
  min-height: 154px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-content: start;
  gap: 0 9px;
  padding: 12px 11px;
  background: #fff;
}

html.v2-layout-ready #decision .decision-report-card-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  color: #fff;
  background: var(--v2-green);
}

html.v2-layout-ready #decision .decision-report-card-icon svg {
  width: 14px;
  height: 14px;
}

html.v2-layout-ready #decision .decision-report-card.is-limited .decision-report-card-icon {
  background: #ad7a17;
}

html.v2-layout-ready #decision .decision-report-card.is-blocked .decision-report-card-icon {
  background: var(--v2-red);
}

html.v2-layout-ready #decision .decision-report-card.is-pending .decision-report-card-icon {
  background: #78909a;
}

html.v2-layout-ready #decision .decision-report-card-label,
html.v2-layout-ready #decision .decision-report-card strong,
html.v2-layout-ready #decision .decision-report-card p,
html.v2-layout-ready #decision .decision-report-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #decision .decision-report-card-label {
  color: #5b7079;
  font-size: 11px;
  line-height: 1.35;
}

html.v2-layout-ready #decision .decision-report-card strong {
  margin-top: 4px;
  color: #173b4a;
  font-size: 13px;
  line-height: 1.4;
}

html.v2-layout-ready #decision .decision-report-card p {
  margin: 5px 0 0;
  color: #425d67;
  font-size: 11px;
  line-height: 1.5;
}

html.v2-layout-ready #decision .decision-report-card small {
  margin-top: 7px;
  color: #758890;
  font-size: 11px;
  line-height: 1.4;
}

html.v2-layout-ready #decision .decision-evidence-layer > .trend-report-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
  border: 0;
}

html.v2-layout-ready #decision .decision-evidence-layer > .trend-report-detail-grid > section {
  min-width: 0;
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  border: 0;
  border-top: 1px solid var(--v2-line);
  border-radius: 0;
  box-shadow: none;
}

html.v2-layout-ready #decision .decision-evidence-layer > .trend-report-detail-grid > section + section {
  border-top-width: 1px;
}

html.v2-layout-ready #decision .decision-evidence-layer .trend-report-detail-grid > section > h3 {
  min-height: 0;
  margin: 0;
  padding: 12px 13px;
  align-items: flex-start;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  background: #edf3f4;
  font-size: 13px;
  line-height: 1.4;
}

html.v2-layout-ready #decision .decision-evidence-layer .trend-chain-list,
html.v2-layout-ready #decision .decision-evidence-layer .trend-capability-list,
html.v2-layout-ready #decision .decision-evidence-layer .trend-limit-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  margin: 0;
  padding: 0;
  background: #fff;
}

html.v2-layout-ready #decision .decision-evidence-layer .trend-chain-list > div,
html.v2-layout-ready #decision .decision-evidence-layer .trend-capability-list > div,
html.v2-layout-ready #decision .decision-evidence-layer .trend-limit-list > li {
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 10px 11px;
  justify-content: flex-start;
  border-right: 1px solid var(--v2-line);
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section {
  width: 100%;
  margin: 0;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid #e0b4ba;
  border-radius: 0;
  box-shadow: none;
}

html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section .section-heading {
  min-width: 0;
  padding: 12px 13px;
  justify-content: flex-start;
  text-align: left;
  border-right: 0;
  border-bottom: 1px solid #e0b4ba;
}

html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section .section-heading p {
  margin-inline: 0;
}

html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section .no-trade-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  align-content: start;
}

html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section .no-trade-grid > span {
  min-height: 0;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 10px 12px;
  font-weight: 500;
}

@media (max-width: 1180px) {
  html.v2-layout-ready #decision .decision-final-insight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready #decision .decision-final-insight > .trend-report-overview {
    grid-column: 1 / -1;
  }

    html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline,
    html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip,
    html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact,
    html.v2-layout-ready #decision .decision-analysis-data-grid,
    html.v2-layout-ready #decision .decision-report-catalog-grid,
    html.v2-layout-ready #decision .decision-evidence-layer .trend-chain-list,
  html.v2-layout-ready #decision .decision-evidence-layer .trend-capability-list,
  html.v2-layout-ready #decision .decision-evidence-layer .trend-limit-list,
  html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section .no-trade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step:nth-child(2n),
  html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip > div:nth-child(2n) {
    border-right: 0;
  }

  html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step,
  html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip > div {
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact.execution-risk-grid,
  html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact.execution-data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html.v2-layout-ready #decision .decision-layer-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  html.v2-layout-ready #decision .decision-report-authority {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
  }

  html.v2-layout-ready #decision .decision-final-insight,
  html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline,
  html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip,
  html.v2-layout-ready #decision .decision-execution-layer .trigger-columns,
  html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact,
  html.v2-layout-ready #decision .decision-execution-layer .exit-rule-list,
    html.v2-layout-ready #decision .decision-analysis-layer .direction-rationale,
    html.v2-layout-ready #decision .decision-analysis-layer .trend-scenario-grid,
    html.v2-layout-ready #decision .decision-analysis-data-grid,
    html.v2-layout-ready #decision .decision-report-catalog-grid,
    html.v2-layout-ready #decision .decision-evidence-layer .trend-chain-list,
  html.v2-layout-ready #decision .decision-evidence-layer .trend-capability-list,
  html.v2-layout-ready #decision .decision-evidence-layer .trend-limit-list,
  html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section .no-trade-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #decision .decision-final-insight > .trend-report-overview {
    grid-column: auto;
  }

  html.v2-layout-ready #decision .decision-final-insight .trend-report-key-status {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  html.v2-layout-ready #decision .decision-analysis-layer .rationale-column > ul {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step,
  html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip > div {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #decision .decision-evidence-layer > .trend-report-detail-grid > section,
  html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #decision .decision-evidence-layer .trend-report-detail-grid > section > h3 {
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section .section-heading {
    justify-content: center;
    text-align: center;
  }

  html.v2-layout-ready #decision .decision-evidence-layer > .decision-no-trade-section .section-heading p {
    margin-inline: auto;
  }

  html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact.execution-risk-grid,
  html.v2-layout-ready #decision .decision-execution-layer .plan-list.compact.execution-data-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Source: v2-consistency.css */
/* Global visual contract. This file intentionally loads after all page-specific layout rules. */
:root {
  --font-assist: 12px;
  --font-meta: 13px;
  --font-body: 14px;
  --font-control: 14px;
  --ui-page-title: 22px;
  --ui-section-title: 16px;
  --ui-panel-title: 16px;
  --ui-table-head: 12px;
  --ui-table-body: 13px;
  --ui-status: 12px;
  --ui-radius: 4px;
  --ui-gap: 12px;
  --ui-gap-compact: 8px;
  --ui-control-height: 36px;
  --ui-control-height-large: 38px;
  --ui-control-height-small: 32px;
  --ui-row-height-compact: 27px;
}

html.v2-layout-ready body {
  font-size: var(--font-body);
  line-height: 1.45;
  letter-spacing: 0;
}

/* One typographic hierarchy across all workspaces. */
html.v2-layout-ready .page-heading h1 {
  margin: 0;
  font-size: var(--ui-page-title);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

html.v2-layout-ready .page-heading p {
  margin-top: 3px;
  font-size: var(--font-meta);
  line-height: 1.45;
}

html.v2-layout-ready .panel-heading h2,
html.v2-layout-ready .section-heading h2,
html.v2-layout-ready .dialog-heading h2 {
  margin: 0;
  font-size: var(--ui-section-title);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

html.v2-layout-ready .panel-heading p,
html.v2-layout-ready .section-heading p,
html.v2-layout-ready .dialog-heading p,
html.v2-layout-ready #decision .decision-no-trade-section .section-heading p {
  margin-top: 3px;
  font-size: var(--font-assist);
  line-height: 1.45;
}

html.v2-layout-ready .panel-heading,
html.v2-layout-ready .section-heading {
  column-gap: var(--ui-gap);
}

html.v2-layout-ready .view-actions,
html.v2-layout-ready .panel-actions {
  gap: var(--ui-gap-compact);
}

/* Shared controls use three intentional heights: compact, standard and form. */
html.v2-layout-ready button,
html.v2-layout-ready input,
html.v2-layout-ready select,
html.v2-layout-ready textarea {
  font-size: var(--font-control);
  line-height: 1.4;
  letter-spacing: 0;
}

html.v2-layout-ready .primary-button,
html.v2-layout-ready .secondary-button,
html.v2-layout-ready .danger-button,
html.v2-layout-ready .danger-outline-button,
html.v2-layout-ready .button-block {
  min-height: var(--ui-control-height);
  padding: 6px 12px;
  border-radius: 3px;
  font-size: var(--font-control);
  line-height: 1.4;
}

html.v2-layout-ready .small-command,
html.v2-layout-ready .table-section .secondary-button,
html.v2-layout-ready .table-section .primary-button,
html.v2-layout-ready .table-section .danger-outline-button {
  min-height: var(--ui-control-height-small);
  padding: 4px 9px;
  font-size: var(--font-meta);
}

html.v2-layout-ready .icon-button.small {
  width: var(--ui-control-height-small);
  height: var(--ui-control-height-small);
  min-height: var(--ui-control-height-small);
  padding: 6px;
}

html.v2-layout-ready .segmented-control button {
  min-height: var(--ui-control-height);
  padding: 6px 12px;
  font-size: var(--font-control);
  line-height: 1.4;
}

html.v2-layout-ready .form-grid input,
html.v2-layout-ready .form-grid select,
html.v2-layout-ready .contract-switcher input,
html.v2-layout-ready .contract-switcher select,
html.v2-layout-ready .environment-control select {
  min-height: var(--ui-control-height-large);
}

/* Status language is always a compact label; qualification uses only its inner oval. */
html.v2-layout-ready .status-badge,
html.v2-layout-ready .direction-chip {
  min-height: 24px;
  padding: 2px 7px;
  border-radius: var(--ui-radius);
  font-size: var(--ui-status);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
}

html.v2-layout-ready .status-badge:not(.qualification-state) {
  min-height: 24px;
  padding: 2px 7px;
  border-radius: var(--ui-radius);
  font-size: var(--ui-status);
  font-weight: 650;
  line-height: 1.25;
}

html.v2-layout-ready .status-badge.qualification-state {
  min-height: 24px;
  padding: 0;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--v2-ink);
  font-size: var(--font-meta);
  font-weight: 500;
  line-height: 1.35;
}

html.v2-layout-ready .qualification-state::before,
html.v2-layout-ready .metric-card > strong.qualification-state::before,
html.v2-layout-ready #models .model-layout td:nth-child(4) .qualification-state::before,
html.v2-layout-ready #models .model-layout td:nth-child(5) .qualification-state::before {
  position: static;
  min-height: 22px;
  padding: 1px 7px;
  transform: none;
  border-width: 1px;
  border-style: solid;
  border-radius: 999px;
  font-size: var(--ui-status);
  font-weight: 650;
  line-height: 1.25;
}

/* One table type scale, with only standard and dense spacing. */
html.v2-layout-ready table thead th,
html.v2-layout-ready #models .model-layout th,
html.v2-layout-ready #operations .operations-layout > .table-section thead th {
  box-sizing: border-box;
  padding: 8px 10px;
  color: #405a65;
  font-size: var(--ui-table-head);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

html.v2-layout-ready table tbody td,
html.v2-layout-ready #models .model-layout td,
html.v2-layout-ready #operations .operations-layout > .table-section tbody td {
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: var(--ui-table-body);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

html.v2-layout-ready #models .model-layout > .table-section th,
html.v2-layout-ready #models .training-queue-table th,
html.v2-layout-ready #positions .positions-ledger-table th,
html.v2-layout-ready #operations .operations-layout > .table-section thead th {
  padding: 4px 6px;
  font-size: var(--ui-table-head);
  line-height: 1.3;
}

html.v2-layout-ready #models .model-layout > .table-section td,
html.v2-layout-ready #models .training-queue-table td,
html.v2-layout-ready #positions .positions-ledger-table td,
html.v2-layout-ready #operations .operations-layout > .table-section tbody td {
  padding: 4px 6px;
  font-size: var(--ui-table-body);
  line-height: 1.4;
}

html.v2-layout-ready #operations .operations-layout > .table-section thead tr,
html.v2-layout-ready #operations .operations-layout > .table-section thead th {
  height: 22px;
  padding: 0 6px;
  line-height: 1.15;
}

html.v2-layout-ready #operations .operations-layout > .table-section tbody tr,
html.v2-layout-ready #operations .operations-layout > .table-section tbody td {
  height: var(--ui-row-height-compact);
}

html.v2-layout-ready #operations .operations-layout > .table-section tbody td {
  padding: 1px 6px;
  line-height: 1.25;
}

html.v2-layout-ready #operations .operations-layout > .table-section .status-badge {
  min-height: 18px;
  padding: 0 5px;
  border-radius: var(--ui-radius);
  font-size: var(--ui-status);
  line-height: 1.25;
}

html.v2-layout-ready #operations .operations-layout > .table-section .icon-button.small {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 4px;
}

/* Repeated cards and panels share the same rhythm and edge treatment. */
html.v2-layout-ready .metric-card > span,
html.v2-layout-ready .ranking-summary-strip span,
html.v2-layout-ready .trade-account-strip span {
  font-size: var(--font-assist);
  font-weight: 650;
  line-height: 1.3;
}

html.v2-layout-ready .metric-card > strong,
html.v2-layout-ready .ranking-summary-strip strong,
html.v2-layout-ready .trade-account-strip strong {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

html.v2-layout-ready .metric-card > small,
html.v2-layout-ready .ranking-summary-strip small,
html.v2-layout-ready .trade-account-strip small {
  font-size: var(--font-assist);
  font-weight: 400;
  line-height: 1.4;
}

html.v2-layout-ready body .metric-card > span,
html.v2-layout-ready body .ranking-summary-strip span,
html.v2-layout-ready body .trade-account-strip span,
html.v2-layout-ready body .arbitrage-evidence-metrics .metric-card > span {
  font-size: var(--font-assist);
  line-height: 1.3;
}

html.v2-layout-ready body .metric-card > strong,
html.v2-layout-ready body .ranking-summary-strip strong,
html.v2-layout-ready body .trade-account-strip strong,
html.v2-layout-ready body .arbitrage-evidence-metrics .metric-card > strong {
  font-size: 20px;
  line-height: 1.1;
}

html.v2-layout-ready body .metric-card > small,
html.v2-layout-ready body .ranking-summary-strip small,
html.v2-layout-ready body .trade-account-strip small,
html.v2-layout-ready body .arbitrage-evidence-metrics .metric-card > small {
  font-size: var(--font-assist);
  line-height: 1.4;
}

@media (min-width: 721px) {
  html.v2-layout-ready main .view > .metric-strip .metric-card > span,
  html.v2-layout-ready #overview > .overview-summary-row .metric-card > span,
  html.v2-layout-ready .ranking-summary-strip span {
    line-height: 1.3;
  }

  html.v2-layout-ready main .view > .metric-strip .metric-card > strong,
  html.v2-layout-ready #overview > .overview-summary-row .metric-card > strong,
  html.v2-layout-ready .ranking-summary-strip strong {
    line-height: 1.1;
  }

  html.v2-layout-ready main .view > .metric-strip .metric-card > small,
  html.v2-layout-ready #overview > .overview-summary-row .metric-card > small,
  html.v2-layout-ready .ranking-summary-strip small {
    line-height: 1.4;
  }

  html.v2-layout-ready #simulation > .metric-strip .metric-card > span {
    line-height: 1.3;
  }

  html.v2-layout-ready #simulation > .metric-strip .metric-card > strong {
    line-height: 1.1;
  }

  html.v2-layout-ready #simulation > .metric-strip .metric-card > small {
    line-height: 1.4;
  }
}

html.v2-layout-ready #models .model-layout > .detail-panel .button-block {
  height: auto;
  min-height: var(--ui-control-height);
  padding: 6px 12px;
  font-size: var(--font-control);
  line-height: 1.4;
}

html.v2-layout-ready .tool-panel,
html.v2-layout-ready .detail-panel,
html.v2-layout-ready .table-section,
html.v2-layout-ready .log-panel,
html.v2-layout-ready .forward-progress-panel,
html.v2-layout-ready .trade-environment-workbench,
html.v2-layout-ready .arbitrage-auto-workbench,
html.v2-layout-ready .arbitrage-capability-section,
html.v2-layout-ready .operator-control-strip {
  border-radius: var(--ui-radius);
  border-color: var(--v2-line);
  box-shadow: 0 3px 12px rgba(11, 32, 41, 0.055);
}

html.v2-layout-ready .v2-overview-detail,
html.v2-layout-ready .v2-detail-grid,
html.v2-layout-ready .v2-control-grid,
html.v2-layout-ready .v2-position-workspace,
html.v2-layout-ready .ranking-layout,
html.v2-layout-ready .event-layout,
html.v2-layout-ready .model-layout,
html.v2-layout-ready .operations-layout,
html.v2-layout-ready .arbitrage-layout {
  gap: var(--ui-gap);
}

html.v2-layout-ready .v2-region + .v2-region {
  margin-top: var(--ui-gap);
}

html.v2-layout-ready .v2-region-heading {
  min-height: 24px;
  margin-bottom: var(--ui-gap-compact);
}

html.v2-layout-ready .v2-region-heading span {
  font-size: var(--font-meta);
  font-weight: 700;
  line-height: 1.3;
}

/* The unified catalog is an audit directory, so all returned domains stay visible. */
html.v2-layout-ready #data .data-activity-section > .section-heading .view-actions {
  align-items: center;
  gap: 10px;
}

html.v2-layout-ready #data #dataActivityRefreshAt {
  color: var(--v2-muted);
  font-size: var(--font-assist);
  line-height: 1.35;
}

html.v2-layout-ready #data .data-activity-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--v2-line);
  border-bottom: 1px solid var(--v2-line);
  background: #f6f9fa;
}

html.v2-layout-ready #data .data-activity-summary > span {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--v2-line);
  color: var(--v2-muted);
  font-size: var(--font-assist);
  line-height: 1.35;
}

html.v2-layout-ready #data .data-activity-summary > span:last-child {
  border-right: 0;
}

html.v2-layout-ready #data .data-activity-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--v2-ink);
  font-size: var(--font-meta);
  font-weight: 650;
  line-height: 1.35;
}

html.v2-layout-ready #data .data-activity-table-heading {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--v2-line);
  background: #eef4f6;
}

html.v2-layout-ready #data .data-activity-table-heading strong {
  font-size: var(--font-meta);
  font-weight: 650;
}

html.v2-layout-ready #data .data-activity-table-heading span {
  color: var(--v2-muted);
  font-size: var(--font-assist);
}

html.v2-layout-ready #data .data-activity-section .data-activity-scroll,
html.v2-layout-ready #data .data-activity-section .data-activity-event-scroll {
  height: auto;
  overflow: auto;
  scrollbar-gutter: stable;
}

html.v2-layout-ready #data .data-activity-section .data-activity-scroll {
  max-height: 574px;
}

html.v2-layout-ready #data .data-activity-section .data-activity-event-scroll {
  max-height: 473px;
}

html.v2-layout-ready #data .data-activity-scroll,
html.v2-layout-ready #data .data-activity-event-scroll,
html.v2-layout-ready #data .data-catalog-scroll {
  overscroll-behavior: contain;
}

html.v2-layout-ready #data .data-activity-scroll thead th,
html.v2-layout-ready #data .data-activity-event-scroll thead th,
html.v2-layout-ready #data .data-catalog-scroll thead th {
  position: sticky;
  z-index: 2;
  top: 0;
}

html.v2-layout-ready #data .data-activity-event-scroll table {
  min-width: 780px;
}

html.v2-layout-ready #data .data-activity-section table {
  min-width: 1040px;
  table-layout: fixed;
}

html.v2-layout-ready #data .data-activity-section th:nth-child(1) { width: 24%; }
html.v2-layout-ready #data .data-activity-section th:nth-child(2) { width: 12%; }
html.v2-layout-ready #data .data-activity-section th:nth-child(3),
html.v2-layout-ready #data .data-activity-section th:nth-child(4),
html.v2-layout-ready #data .data-activity-section th:nth-child(5) { width: 12%; }
html.v2-layout-ready #data .data-activity-section th:nth-child(6) { width: 10%; }
html.v2-layout-ready #data .data-activity-section th:nth-child(7),
html.v2-layout-ready #data .data-activity-section th:nth-child(8) { width: 9%; }

html.v2-layout-ready #data .data-activity-section td:first-child,
html.v2-layout-ready #data .data-activity-section td:first-child strong,
html.v2-layout-ready #data .data-activity-section td:first-child small {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #data .data-activity-section td:first-child strong,
html.v2-layout-ready #data .data-activity-section td:first-child small {
  display: block;
}

html.v2-layout-ready #data .data-activity-section tbody tr.is-updating {
  background: #eaf7f2;
}

html.v2-layout-ready #data .data-activity-section tbody tr.is-recent {
  background: #f3f8f8;
}

html.v2-layout-ready #data .data-activity-section tbody tr.is-delayed,
html.v2-layout-ready #data .data-activity-section tbody tr.is-missing {
  background: #fff0f1;
}

html.v2-layout-ready #data .data-activity-delta {
  color: #007965;
  font-weight: 650;
  white-space: nowrap;
}

html.v2-layout-ready #data .data-activity-decrease {
  color: #b4232c;
  font-weight: 650;
  white-space: nowrap;
}

html.v2-layout-ready #data .data-activity-zero {
  color: var(--v2-muted);
  white-space: nowrap;
}

html.v2-layout-ready #data .v2-detail-grid > .table-section:has(#dataCatalogBody) {
  height: auto !important;
  min-height: 0;
}

html.v2-layout-ready #data .v2-detail-grid > .table-section:has(#dataCatalogBody) > .table-scroll {
  height: auto;
  max-height: 513px;
  overflow: auto;
  scrollbar-gutter: stable;
}

html.v2-layout-ready #data .data-activity-scroll tbody tr {
  height: 54px;
}

html.v2-layout-ready #data .data-activity-event-scroll tbody tr {
  height: 44px;
}

html.v2-layout-ready #data .data-catalog-scroll tbody tr {
  height: 48px;
}

@media (max-width: 500px) {
  html.v2-layout-ready #validation .replay-depth-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  html.v2-layout-ready #validation #replayDepthAuditBadge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
  }
}

/* Software qualification is one six-row evidence list, even though two data sources feed it. */
html.v2-layout-ready #governance .gate-list,
html.v2-layout-ready #governance .governance-qualification-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  border: 0;
}

html.v2-layout-ready #governance .governance-qualification-summary {
  border-top: 1px solid var(--v2-line);
}

html.v2-layout-ready #governance .gate-list > div,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
  min-height: 65px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  gap: 3px 6px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html.v2-layout-ready #governance .gate-list > div::before {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

html.v2-layout-ready #governance .gate-list > div > .qualification-row-copy {
  min-width: 0;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
}

html.v2-layout-ready #governance .gate-list > div > .qualification-row-copy > strong,
html.v2-layout-ready #governance .gate-list > div > .qualification-row-copy > small {
  display: block;
  margin: 0;
}

html.v2-layout-ready #governance .gate-list > div > .qualification-row-copy > strong,
html.v2-layout-ready #governance .gate-list > div > .qualification-row-result {
  font-size: var(--font-meta);
  font-weight: 500;
  line-height: 1.35;
}

html.v2-layout-ready #governance .gate-list > div > .qualification-row-copy > small {
  margin-top: 3px;
  color: var(--v2-muted);
  font-size: var(--font-assist);
  line-height: 1.45;
}

html.v2-layout-ready #governance .gate-list > div > .qualification-row-result {
  min-width: 0;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  color: var(--qualification-ink);
  white-space: nowrap;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > span {
  grid-column: 1;
  grid-row: 1;
  font-size: var(--font-meta);
  font-weight: 500;
  line-height: 1.35;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > strong {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-size: var(--font-meta);
  font-weight: 500;
  line-height: 1.35;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > small {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: var(--font-assist);
  line-height: 1.45;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > strong.qualification-state::before {
  position: static;
  left: auto;
  top: auto;
  transform: none;
}

html.v2-layout-ready #overview > .overview-summary-row .gate-bar strong.qualification-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  overflow: visible;
  white-space: normal;
  line-height: 1.25;
}

html.v2-layout-ready #overview > .overview-summary-row .gate-bar strong.qualification-state::before {
  min-height: 20px;
  padding: 0 5px;
  font-size: 11px;
}

html.v2-layout-ready #overview > .overview-summary-row .gate-bar span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 11px;
  line-height: 1.3;
}

/* Embedded decision bands are structural rows, not independent floating panels. */
html.v2-layout-ready #decision .decision-judgment-panel > .decision-no-trade-section {
  box-shadow: none;
}

/* Give long audited task states enough room without reducing the shared type scale. */
@media (min-width: 1181px) {
  html.v2-layout-ready #operations .operations-layout,
  html.v2-layout-ready #operations > .v2-detail-grid {
    grid-template-columns: minmax(620px, 1.15fr) minmax(480px, .85fr);
  }

  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(1) { width: 24%; }
  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(2) { width: 15%; }
  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(3) { width: 23%; }
  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(4) { width: 31%; }
  html.v2-layout-ready #operations .operations-layout > .table-section th:nth-child(5) { width: 7%; }

  html.v2-layout-ready #operations > .v2-detail-grid > .recovery-control-panel .recovery-state-grid > div {
    min-height: 56px;
    padding: 6px 8px;
  }

  html.v2-layout-ready #operations > .v2-detail-grid > .recovery-control-panel .recovery-state-grid strong {
    margin-top: 3px;
  }

  html.v2-layout-ready #operations > .v2-detail-grid > .recovery-control-panel .recovery-action-row {
    margin-top: 8px;
  }

  html.v2-layout-ready #operations > .v2-detail-grid > .recovery-control-panel .detail-note {
    margin-top: 8px;
    padding: 7px 10px;
  }
}

html.v2-layout-ready #models .model-layout td:nth-child(4) .status-badge,
html.v2-layout-ready #models .model-layout td:nth-child(5) .status-badge {
  gap: 3px;
  overflow: visible;
}

html.v2-layout-ready #models .model-layout td:nth-child(4) .qualification-state::before,
html.v2-layout-ready #models .model-layout td:nth-child(5) .qualification-state::before {
  min-height: 20px;
  padding: 0 4px;
  font-size: 11px;
}

/* Keep the model registry, authorization gates, and adaptive queue on one visual baseline. */
@media (min-width: 1181px) {
  html.v2-layout-ready #models .model-layout {
    height: auto;
    min-height: 0;
    align-items: stretch;
  }

  html.v2-layout-ready #models .model-layout > .table-section,
  html.v2-layout-ready #models .model-layout > .detail-panel {
    height: auto;
    min-height: 0;
  }

  html.v2-layout-ready #models .model-layout > .table-section > .table-scroll {
    height: var(--v2-model-registry-scroll-height, 395px);
    min-height: var(--v2-model-registry-scroll-height, 395px);
    max-height: var(--v2-model-registry-scroll-height, 395px);
    flex: 0 0 var(--v2-model-registry-scroll-height, 395px);
    overflow: auto;
    scrollbar-gutter: stable;
  }

  html.v2-layout-ready #models .model-layout > .table-section > .table-scroll > table {
    height: auto;
  }

  html.v2-layout-ready #models .model-layout > .table-section > .table-scroll thead {
    position: sticky;
    z-index: 2;
    top: 0;
  }

  html.v2-layout-ready #models .model-training-section:has(.training-queue-disclosure[open]) {
    height: var(--v2-model-queue-height, 340px);
    max-height: none;
    overflow: hidden;
  }

  html.v2-layout-ready #models .training-queue-disclosure[open] {
    min-height: 0;
    height: calc(44px + var(--v2-model-queue-scroll-height, 191px));
    flex: 0 0 auto;
    display: block;
    overflow: hidden;
  }

  html.v2-layout-ready #models .training-queue-disclosure[open] > summary {
    flex: 0 0 auto;
  }

  html.v2-layout-ready #models .training-queue-disclosure[open] > .training-queue-scroll {
    height: var(--v2-model-queue-scroll-height, 191px);
    min-height: var(--v2-model-queue-scroll-height, 191px);
    max-height: var(--v2-model-queue-scroll-height, 191px);
    overflow: auto;
    scrollbar-gutter: stable;
  }

  html.v2-layout-ready #automation .automation-layout,
  html.v2-layout-ready #automation .v2-automation-detail {
    grid-template-columns: minmax(620px, 1.15fr) minmax(480px, .85fr);
  }

  html.v2-layout-ready #automation .v2-automation-detail > .table-section {
    grid-column: auto;
    grid-row: auto;
  }

  html.v2-layout-ready #governance .governance-recovery-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready #governance .governance-recovery-layout > .tool-panel {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (min-width: 721px) {
  html.v2-layout-ready #orders .order-layout,
  html.v2-layout-ready #orders #simulation .simulation-layout,
  html.v2-layout-ready #ranking .ranking-layout,
  html.v2-layout-ready #positions > .v2-position-workspace {
    align-items: stretch;
  }

  html.v2-layout-ready #orders .order-layout > .order-ticket,
  html.v2-layout-ready #orders .order-layout > .order-book-panel,
  html.v2-layout-ready #orders #simulation .simulation-layout > .simulation-account-panel,
  html.v2-layout-ready #orders #simulation .simulation-layout > .simulation-equity-panel,
  html.v2-layout-ready #ranking .ranking-layout > .ranking-table,
  html.v2-layout-ready #ranking .ranking-layout > #rankingDetail,
  html.v2-layout-ready #positions > .v2-position-workspace > .positions-ledger-table,
  html.v2-layout-ready #positions > .v2-position-workspace > #positionDetail {
    height: 100%;
    align-self: stretch;
  }

  html.v2-layout-ready #positions #positionDetail {
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
  }

  html.v2-layout-ready #positions #positionDetail > .tool-panel:only-child {
    min-height: 0;
    height: auto;
    align-self: stretch;
  }
}

@media (min-width: 1181px) and (max-width: 1423px) {
  html.v2-layout-ready #arbitrage .arbitrage-auto-controls {
    grid-template-columns: 95px 95px repeat(4, minmax(110px, .7fr)) minmax(220px, 1.35fr) minmax(120px, auto);
  }
}

@media (min-width: 1361px) {
  html.v2-layout-ready,
  html.v2-layout-ready body,
  html.v2-layout-ready .app-shell {
    min-width: 100%;
  }
}

/* Responsive desktop safety: page bands resize; wide data tables scroll inside their own panel. */
@media (min-width: 721px) and (max-width: 1366px) {
  html.v2-layout-ready #overview > .overview-summary-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: auto;
    overflow: visible;
  }

  html.v2-layout-ready #overview > .overview-summary-row .metric-card,
  html.v2-layout-ready #overview > .overview-summary-row .gate-bar > div {
    min-height: 72px;
    height: auto;
  }

  html.v2-layout-ready #overview > .overview-summary-row .metric-card > small,
  html.v2-layout-ready #overview > .overview-summary-row .metric-card > strong,
  html.v2-layout-ready #overview > .overview-summary-row .gate-bar strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 721px) and (max-width: 1360px) {
  html.v2-layout-ready .app-shell {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  html.v2-layout-ready .brand {
    justify-content: center;
    padding-inline: 0;
  }

  html.v2-layout-ready .brand-copy,
  html.v2-layout-ready .nav-button > span,
  html.v2-layout-ready .sidebar-footer > div,
  html.v2-layout-ready .nav-group-label {
    display: none;
  }

  html.v2-layout-ready .primary-nav {
    padding-inline: 7px;
  }

  html.v2-layout-ready .nav-button {
    justify-content: center;
    padding-inline: 7px;
  }

  html.v2-layout-ready .sidebar-footer {
    justify-content: center;
    padding-inline: 8px;
  }
}

@media (min-width: 721px) and (max-width: 1360px) {
  html.v2-layout-ready .topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-inline: 10px;
  }

  html.v2-layout-ready .topbar > .global-controls {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  html.v2-layout-ready .v2-command-side {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }
}

/* Final responsive contract: the desktop command bar stays on one row from
   1041px upward, while its secondary actions collapse to familiar icons. */
@media (min-width: 1041px) and (max-width: 1361px) {
  html.v2-layout-ready .topbar {
    min-height: 82px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 8px;
    padding: 10px;
  }

  html.v2-layout-ready .topbar > .global-controls {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }

  html.v2-layout-ready .global-controls {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 6px;
  }

  html.v2-layout-ready .contract-switcher {
    min-width: 0;
    grid-template-columns: minmax(0, .9fr) minmax(0, .82fr) minmax(0, 1.08fr);
    gap: 6px;
  }

  html.v2-layout-ready .contract-switcher > label,
  html.v2-layout-ready .environment-control,
  html.v2-layout-ready .environment-control select {
    min-width: 0;
  }

  html.v2-layout-ready .v2-command-side {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: auto;
    justify-self: end;
    justify-content: flex-end;
    gap: 5px;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote {
    width: 176px;
    min-width: 176px;
    max-width: 176px;
    padding-inline: 8px;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote > span,
  html.v2-layout-ready .v2-command-side .global-latest-quote > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.v2-layout-ready .v2-command-side .broker-login-shortcut,
  html.v2-layout-ready .v2-command-side .user-button,
  html.v2-layout-ready .v2-command-side .danger-button,
  html.v2-layout-ready .v2-command-side .icon-button {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding-inline: 0;
    justify-content: center;
  }

  html.v2-layout-ready .v2-command-side .broker-login-shortcut > span,
  html.v2-layout-ready .v2-command-side .danger-button > span,
  html.v2-layout-ready .v2-command-side .user-button-copy {
    display: none;
  }
}

/* The spread operator strip is a two-row control surface inside its narrow
   workbench column; every command remains visible without horizontal escape. */
@media (min-width: 721px) {
  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip > .operator-control-actions {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip > .operator-control-actions button {
    width: 100%;
    min-width: 0;
  }

  html.v2-layout-ready #arbitrage > .v2-arbitrage-ranking-workspace {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto auto !important;
    align-items: center;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .v2-region-heading {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-ranking-kind-control {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-layout {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control {
    height: 36px;
    max-height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 11px;
    border: 0;
    background: transparent;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .segmented-control {
    order: 4;
    flex: 0 0 auto;
    margin-left: 0;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .arbitrage-search {
    order: 1;
    width: clamp(150px, 16vw, 240px);
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .arbitrage-readiness-filter {
    order: 2;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .arbitrage-visible-filter {
    order: 3;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control input,
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control select,
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control button,
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control .compact-switch {
    height: 30px;
    min-height: 30px;
  }
}

@media (max-width: 720px) {
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control {
    height: auto;
    max-height: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }

  html.v2-layout-ready #models .training-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html.v2-layout-ready #models .training-row > div,
  html.v2-layout-ready #models .training-row > progress {
    grid-column: 1 / -1;
    width: 100%;
  }

  html.v2-layout-ready #models #trainingStatusBadge {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 1041px) and (max-width: 1361px) {
  html.v2-layout-ready .v2-command-side .global-latest-quote {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
  }

  html.v2-layout-ready .v2-command-side .user-button {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    padding-inline: 6px;
  }

  html.v2-layout-ready .v2-command-side .user-avatar { display: none; }

  html.v2-layout-ready .v2-command-side .user-button-copy {
    min-width: 0;
    display: block;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy strong {
    max-width: 60px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy small { display: none; }
}

@media (min-width: 721px) {
  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-layout {
    align-items: stretch !important;
  }

  html.v2-layout-ready #arbitrage .arbitrage-candidate-section,
  html.v2-layout-ready #arbitrage #arbitrageDetail {
    height: auto;
    align-self: stretch !important;
  }

  html.v2-layout-ready #arbitrage .arbitrage-candidate-section {
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #arbitrage .arbitrage-candidate-section > .arbitrage-table-scroll {
    min-height: 0;
    max-height: none !important;
    flex: 1 1 auto;
    overflow: auto;
  }
}

@media (min-width: 721px) and (max-width: 1040px) {
  html.v2-layout-ready,
  html.v2-layout-ready body,
  html.v2-layout-ready .app-shell,
  html.v2-layout-ready .main-shell,
  html.v2-layout-ready main,
  html.v2-layout-ready .view,
  html.v2-layout-ready .v2-region {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  html.v2-layout-ready .app-shell {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  html.v2-layout-ready .topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-inline: 10px;
  }

  html.v2-layout-ready .topbar > .global-controls {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  html.v2-layout-ready .global-controls {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 138px);
    gap: 6px;
  }

  html.v2-layout-ready .contract-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  html.v2-layout-ready .contract-switcher .product-search-label {
    grid-column: 1 / -1;
  }

  html.v2-layout-ready .v2-command-side {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 5px;
  }

  html.v2-layout-ready .v2-command-side .broker-login-shortcut,
  html.v2-layout-ready .v2-command-side .danger-button,
  html.v2-layout-ready .v2-command-side .icon-button {
    width: 36px;
    min-width: 36px;
    padding-inline: 0;
    justify-content: center;
  }

  html.v2-layout-ready .v2-command-side .broker-login-shortcut span,
  html.v2-layout-ready .v2-command-side .danger-button span {
    display: none;
  }

  html.v2-layout-ready .v2-command-side .user-button {
    width: auto;
    min-width: 88px;
    max-width: 116px;
    padding-inline: 5px 8px;
    justify-content: flex-start;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy {
    min-width: 0;
    display: block;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy strong {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy small {
    display: none;
  }

  html.v2-layout-ready .dashboard-grid,
  html.v2-layout-ready .decision-grid,
  html.v2-layout-ready .position-detail-grid,
  html.v2-layout-ready .risk-layout,
  html.v2-layout-ready .data-layout,
  html.v2-layout-ready .operations-layout,
  html.v2-layout-ready .simulation-layout,
  html.v2-layout-ready .validation-layout,
  html.v2-layout-ready .cost-layout,
  html.v2-layout-ready .order-layout,
  html.v2-layout-ready .ranking-layout,
  html.v2-layout-ready .event-layout,
  html.v2-layout-ready .model-layout,
  html.v2-layout-ready .automation-layout,
  html.v2-layout-ready .governance-layout,
  html.v2-layout-ready .arbitrage-layout,
  html.v2-layout-ready .exact-curve-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready .table-scroll,
  html.v2-layout-ready .fundamental-domain-table,
  html.v2-layout-ready .training-queue-scroll {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (min-width: 721px) and (max-width: 900px) {
  html.v2-layout-ready #overview > .overview-summary-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  html.v2-layout-ready #automation .compact-switch {
    flex: 0 0 auto;
    min-width: 124px;
  }
}

@media (max-width: 720px) {
  :root {
    --ui-page-title: 20px;
    --ui-section-title: 15px;
    --font-control: 13px;
  }

  html.v2-layout-ready .primary-button,
  html.v2-layout-ready .secondary-button,
  html.v2-layout-ready .danger-button,
  html.v2-layout-ready .danger-outline-button,
  html.v2-layout-ready .button-block,
  html.v2-layout-ready .segmented-control button {
    min-height: 36px;
  }

  html.v2-layout-ready #data .data-activity-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready #data .data-activity-summary > span:nth-child(even) {
    border-right: 0;
  }

  html.v2-layout-ready #data .data-activity-summary > span:last-child {
    grid-column: 1 / -1;
  }

  html.v2-layout-ready #governance .gate-list > div,
  html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #governance .gate-list > div::before,
  html.v2-layout-ready #governance .gate-list > div > .qualification-row-copy,
  html.v2-layout-ready #governance .gate-list > div > .qualification-row-result {
    grid-column: 1;
    justify-self: start;
  }

  html.v2-layout-ready #governance .gate-list > div > .qualification-row-copy { grid-row: 1; }
  html.v2-layout-ready #governance .gate-list > div::before { grid-row: 2; }
  html.v2-layout-ready #governance .gate-list > div > .qualification-row-result { grid-row: 3; }

  html.v2-layout-ready #governance .governance-qualification-summary .metric-card > span,
  html.v2-layout-ready #governance .governance-qualification-summary .metric-card > strong,
  html.v2-layout-ready #governance .governance-qualification-summary .metric-card > small {
    grid-column: 1;
    justify-self: start;
  }

  html.v2-layout-ready #governance .governance-qualification-summary .metric-card > span { grid-row: 1; }
  html.v2-layout-ready #governance .governance-qualification-summary .metric-card > strong { grid-row: 2; }
  html.v2-layout-ready #governance .governance-qualification-summary .metric-card > small { grid-row: 3; }
}

/* Price-spread engine: one execution console above one candidate workspace. */
html.v2-layout-ready #arbitrage > .v2-arbitrage-auto-workspace > .arbitrage-auto-workbench {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-top: 3px solid var(--v2-blue);
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-auto-heading {
  background: #edf3f4;
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip {
  width: 100%;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  border-radius: 0;
  background: #f8fafb;
  box-shadow: none;
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-auto-controls {
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-capability-section {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-capability-section > .section-heading {
  margin: 0;
  padding: 9px 12px;
  background: #f2f6f7;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-workspace {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

html.v2-layout-ready #arbitrage .arbitrage-capability-item,
html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(2n),
html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(4n) {
  border-right: 1px solid var(--v2-line);
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(n) {
  grid-column: auto;
  grid-row: auto;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(4n) {
  border-right: 0;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(n + 9) {
  border-bottom: 0;
}

/* Keep the last evidence card vertically balanced in the 4x3 capability matrix. */
html.v2-layout-ready #arbitrage .arbitrage-capability-item[data-capability-id="spread_forward_same_hash"] {
  grid-template-rows: auto auto;
  align-content: center;
  row-gap: 6px;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-item[data-capability-id="spread_forward_same_hash"] > .arbitrage-capability-icon {
  grid-column: 1;
  grid-row: 1;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-item[data-capability-id="spread_forward_same_hash"] > .arbitrage-capability-copy {
  grid-column: 2;
  grid-row: 1;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-item[data-capability-id="spread_forward_same_hash"] > .status-badge {
  grid-column: 2;
  grid-row: 2;
  margin-top: 0;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries {
  grid-column: 1;
  grid-row: auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(2, auto);
  border-top: 1px solid var(--v2-line);
  border-left: 0;
  background: #f8fafb;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries > section {
  min-height: 0;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: minmax(150px, .18fr) minmax(0, 1fr);
  align-items: start;
  gap: 10px 14px;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries ul {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 14px;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics {
  width: 100%;
  margin: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics .metric-card {
  min-height: 76px;
}

html.v2-layout-ready #arbitrage .arbitrage-layout {
  grid-template-columns: minmax(0, 1.58fr) minmax(380px, .72fr);
  align-items: stretch;
}

html.v2-layout-ready #arbitrage .arbitrage-candidate-section {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
}

html.v2-layout-ready #arbitrage #arbitrageDetail {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
}

html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-order-lock > button {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (min-width: 721px) {
  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .v2-region-heading {
    grid-column: 1;
    grid-row: 1;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-ranking-kind-control {
    grid-column: 2;
    grid-row: 1;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-layout {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 1180px) and (min-width: 721px) {
  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html.v2-layout-ready #arbitrage .arbitrage-capability-matrix,
  html.v2-layout-ready #arbitrage .arbitrage-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #arbitrage .arbitrage-capability-matrix {
    grid-template-rows: none;
  }

  html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries,
  html.v2-layout-ready #arbitrage .arbitrage-candidate-section,
  html.v2-layout-ready #arbitrage #arbitrageDetail {
    grid-column: 1;
    grid-row: auto;
  }

  html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries {
    border-top: 1px solid var(--v2-line);
    border-left: 0;
  }

  html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries > section,
  html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries ul {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #arbitrage .arbitrage-capability-item,
  html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(n),
  html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(2n),
  html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(3n),
  html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(4n),
  html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(n + 10) {
    grid-column: 1;
    grid-row: auto;
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #arbitrage .arbitrage-capability-item:last-child {
    border-bottom: 0;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics {
    margin-bottom: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics .metric-card:last-child {
    grid-column: 1 / -1;
  }
}

/* Position ledger uses the same six-column rhythm as its metric strip. */
@media (min-width: 721px) {
  html.v2-layout-ready #positions > .v2-position-workspace {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 0;
  }

  html.v2-layout-ready #positions > .v2-position-workspace > .v2-region-heading {
    grid-column: 1 / -1;
  }

  html.v2-layout-ready #positions > .v2-position-workspace > .positions-ledger-table {
    grid-column: 1 / span 4;
  }

  html.v2-layout-ready #positions > .v2-position-workspace > #positionDetail {
    grid-column: 5 / span 2;
    scrollbar-gutter: auto;
  }

  html.v2-layout-ready #positions #positionDetail > .tool-panel.position-empty-card:only-child {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: max-content;
    align-self: start;
    overflow: visible;
  }

  html.v2-layout-ready #positions #positionDetail .position-empty-overview {
    min-height: 0;
  }
}

/* Model registry and authorization gate follow the four-card metric grid. */
@media (min-width: 1181px) {
  html.v2-layout-ready #models .model-layout {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 8px;
  }

  html.v2-layout-ready #models .model-layout > .table-section {
    grid-column: 1 / span 3;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel {
    grid-column: 4;
  }
}

/* Validation stages use badges and connectors only; no underline below each item. */
html.v2-layout-ready #validation .validation-stage-strip > .stage-item.qualification-state {
  border-bottom: 0;
}

/* Keep the complete empty-position audit card visible at high desktop zoom. */
@media (min-width: 721px) and (max-height: 760px) {
  html.v2-layout-ready #positions #positionDetail > .tool-panel.position-empty-card:only-child {
    padding: 8px 10px;
  }

  html.v2-layout-ready #positions .position-empty-card > .panel-heading {
    flex: 0 0 auto;
    min-height: 0;
    margin-bottom: 3px;
    padding-bottom: 4px;
  }

  html.v2-layout-ready #positions .position-empty-overview {
    min-height: 42px;
    flex: 0 0 42px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    place-content: center stretch;
    justify-items: start;
    column-gap: 8px;
    row-gap: 1px;
    padding: 3px 6px;
    border-top: 1px solid var(--v2-line);
    text-align: left;
  }

  html.v2-layout-ready #positions .position-empty-overview > svg {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    width: 22px;
    height: 22px;
  }

  html.v2-layout-ready #positions .position-empty-overview > strong {
    grid-column: 2;
    grid-row: 1;
    font-size: 14px;
    line-height: 1.2;
  }

  html.v2-layout-ready #positions .position-empty-overview > span {
    grid-column: 2;
    grid-row: 2;
    font-size: 12px;
    line-height: 1.2;
  }

  html.v2-layout-ready #positions .position-empty-facts {
    flex: 0 0 auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  html.v2-layout-ready #positions .position-empty-facts > div {
    padding: 4px 5px;
  }

  html.v2-layout-ready #positions .position-empty-facts dt {
    font-size: 11px;
    line-height: 1.2;
  }

  html.v2-layout-ready #positions .position-empty-facts dd {
    margin-top: 1px;
    font-size: 13px;
    line-height: 1.2;
  }

  html.v2-layout-ready #positions .position-empty-card > .detail-note {
    flex: 0 0 auto;
    margin-top: 4px;
    padding: 5px 7px;
    line-height: 1.3;
  }
}

/* Keep the trading ticket/book divider aligned with the account/equity divider. */
@media (min-width: 721px) {
  html.v2-layout-ready #orders .order-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
}

/* 2026-08 spread workstation: compact decision-first hierarchy without dead space. */
html.v2-layout-ready #overview > .overview-summary-row {
  grid-template-columns: minmax(0, 1fr) minmax(230px, auto) !important;
  gap: 10px;
}

html.v2-layout-ready #overview > .overview-summary-row .metric-card {
  min-height: 58px;
  padding-top: 7px;
  padding-bottom: 7px;
}

html.v2-layout-ready #overview > .overview-summary-row .metric-card > small {
  display: none;
}

html.v2-layout-ready #overview .overview-qualification-summary {
  min-width: 0;
  min-height: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 12px;
}

html.v2-layout-ready #overview .overview-qualification-main {
  min-width: 0;
  min-height: 0 !important;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 !important;
  border: 0 !important;
}

html.v2-layout-ready #overview .overview-qualification-main > span,
html.v2-layout-ready #overview .overview-qualification-main > strong,
html.v2-layout-ready #overview .overview-qualification-main > small {
  display: block;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #overview .overview-qualification-main > strong {
  margin-top: 0;
  font-size: 14px;
  white-space: nowrap;
}

html.v2-layout-ready #overview .overview-qualification-main > small {
  display: none;
}

html.v2-layout-ready #overview .overview-qualification-details {
  display: none !important;
}

html.v2-layout-ready #overview .overview-qualification-details > summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--v2-line-strong);
  border-radius: 3px;
  background: #fff;
  color: var(--v2-ink);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}

html.v2-layout-ready #overview .overview-qualification-details > summary::-webkit-details-marker,
html.v2-layout-ready #arbitrage details > summary::-webkit-details-marker {
  display: none;
}

html.v2-layout-ready #overview .overview-qualification-details[open] > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: 390px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--v2-line-strong);
  background: #fff;
  box-shadow: var(--shadow);
}

html.v2-layout-ready #overview .overview-qualification-details[open] > div > span {
  min-width: 0;
  padding: 9px;
  border-right: 1px solid var(--v2-line);
}

html.v2-layout-ready #overview .overview-qualification-details[open] > div > span:last-child { border-right: 0; }
html.v2-layout-ready #overview .overview-qualification-details small,
html.v2-layout-ready #overview .overview-qualification-details strong { display: block; overflow-wrap: anywhere; }
html.v2-layout-ready #overview .overview-qualification-details small { color: var(--v2-muted); font-size: 11px; }
html.v2-layout-ready #overview .overview-qualification-details strong { margin-top: 3px; font-size: 12px; white-space: normal; word-break: break-all; }
html.v2-layout-ready #overview .overview-qualification-summary > button {
  min-width: 56px;
  min-height: 32px;
  margin: 0 !important;
  padding: 0 10px;
  white-space: nowrap;
}

html.v2-layout-ready #overview #liveCandidateMetric.qualification-state::before {
  display: none;
}

html.v2-layout-ready #marketChart.is-empty-chart,
html.v2-layout-ready #decisionChart.is-empty-chart {
  height: 260px;
}

/* Empty/loading states stay compact; populated tables keep their scroll workspaces. */
html.v2-layout-ready #orders .v2-trade-summary > .trade-execution-command {
  grid-column: 1 / -1;
  width: 100%;
}

html.v2-layout-ready #automation .automation-layout {
  align-items: start;
}

html.v2-layout-ready #automation .automation-layout > .tool-panel {
  height: auto;
  align-self: start;
}

html.v2-layout-ready #ranking:has(#rankingBody .empty-state),
html.v2-layout-ready #events:has(.timeline-panel > .empty-table-state),
html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) {
  height: auto;
  min-height: 0;
  overflow: visible;
}

html.v2-layout-ready #ranking:has(#rankingBody .empty-state) > .v2-primary-workspace,
html.v2-layout-ready #ranking:has(#rankingBody .empty-state) .ranking-layout,
html.v2-layout-ready #events:has(.timeline-panel > .empty-table-state) .event-layout,
html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) > .v2-position-workspace {
  min-height: 0;
  height: auto;
  flex: 0 0 auto;
  align-items: start;
  overflow: visible;
}

html.v2-layout-ready #ranking:has(#rankingBody .empty-state) .ranking-table,
html.v2-layout-ready #ranking:has(#rankingBody .empty-state) #rankingDetail,
html.v2-layout-ready #events:has(.timeline-panel > .empty-table-state) .timeline-panel,
html.v2-layout-ready #events:has(.timeline-panel > .empty-table-state) .event-risk-panel,
html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table,
html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) #positionDetail,
html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card {
  min-height: 0;
  height: auto;
  align-self: start;
  overflow: visible;
}

html.v2-layout-ready #ranking:has(#rankingBody .empty-state) .ranking-table > .table-scroll,
html.v2-layout-ready #events:has(.timeline-panel > .empty-table-state) .timeline-panel,
html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table > .table-scroll {
  min-height: 150px;
  max-height: 220px;
  flex: 0 0 auto;
}

html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table table {
  height: auto;
}

html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-overview {
  min-height: 92px;
  flex: 0 0 auto;
}

html.v2-layout-ready #arbitrage > .arbitrage-flow-strip {
  margin-bottom: 10px;
}

html.v2-layout-ready #arbitrage > .arbitrage-flow-strip > div {
  min-height: 58px;
  padding: 8px 10px;
}

html.v2-layout-ready #arbitrage > .v2-arbitrage-control-workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(350px, .65fr);
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace > .arbitrage-auto-workbench,
html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace > .arbitrage-auto-gate {
  width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
  border: 1px solid var(--v2-line-strong);
  border-top: 3px solid var(--v2-blue);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .arbitrage-auto-heading {
  min-height: 58px;
  padding: 9px 11px;
  background: #edf3f4;
}

html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip {
  min-height: 0;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  border-radius: 0;
  box-shadow: none;
}

html.v2-layout-ready #arbitrage .operator-control-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

html.v2-layout-ready #arbitrage .operator-control-actions button {
  min-height: 32px;
  padding-inline: 8px;
  font-size: 12px;
}

html.v2-layout-ready #arbitrage .arbitrage-auto-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 7px;
  padding: 9px 10px;
  border: 0 !important;
}

html.v2-layout-ready #arbitrage .arbitrage-auto-controls > label,
html.v2-layout-ready #arbitrage .arbitrage-scope-control {
  min-width: 0;
}

html.v2-layout-ready #arbitrage .arbitrage-scope-control { grid-column: span 2; }
html.v2-layout-ready #arbitrage .arbitrage-auto-controls > .primary-button { grid-column: span 2; }

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace > .arbitrage-auto-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-self: start;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-auto-gate-status {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding: 10px;
  border-right: 0;
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-auto-gate-status > span {
  min-height: 30px;
  border-right: 0;
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics .metric-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: center;
  column-gap: 7px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--v2-line);
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics .metric-card > span,
html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics .metric-card > strong {
  grid-row: 1;
  align-self: center;
  margin: 0;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics .metric-card > span {
  grid-column: 1;
  font-size: 11px;
  line-height: 1.25;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics .metric-card > strong {
  grid-column: 2;
  font-size: 14px;
  line-height: 1.2;
  text-align: right;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics .metric-card > small {
  display: none;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics .metric-card:nth-child(2n) { border-right: 0; }
html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics .metric-card:nth-last-child(-n + 2) { border-bottom: 0; }

html.v2-layout-ready #arbitrage .arbitrage-runtime-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--v2-line);
}

html.v2-layout-ready #arbitrage .arbitrage-runtime-checks > div {
  min-width: 0;
  padding: 8px 9px;
  border-right: 1px solid var(--v2-line);
}

html.v2-layout-ready #arbitrage .arbitrage-runtime-checks > div:last-child { border-right: 0; }
html.v2-layout-ready #arbitrage .arbitrage-runtime-checks span,
html.v2-layout-ready #arbitrage .arbitrage-runtime-checks strong { display: block; overflow-wrap: anywhere; }
html.v2-layout-ready #arbitrage .arbitrage-runtime-checks span { color: var(--v2-muted); font-size: 11px; }
html.v2-layout-ready #arbitrage .arbitrage-runtime-checks strong { margin-top: 3px; font-size: 13px; }

html.v2-layout-ready #arbitrage > .v2-arbitrage-ranking-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto auto !important;
  gap: 0;
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .v2-region-heading,
html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics,
html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-ranking-kind-control,
html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-layout {
  grid-column: 1 !important;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .v2-region-heading { grid-row: 1 !important; padding: 8px 11px; }
html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics { grid-row: 2 !important; margin: 0; gap: 0; border-top: 1px solid var(--v2-line); border-bottom: 1px solid var(--v2-line); }
html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-ranking-kind-control { grid-row: 3 !important; }
html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-layout { grid-row: 4 !important; }

html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics .metric-card {
  min-height: 68px;
  border: 0;
  border-right: 1px solid var(--v2-line);
  border-radius: 0;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics .metric-card:last-child { border-right: 0; }

html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(210px, 1fr) minmax(180px, auto) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--v2-line);
  background: #f7f9fa;
}

html.v2-layout-ready #arbitrage .arbitrage-search {
  min-width: 0;
  position: relative;
  display: block;
}

html.v2-layout-ready #arbitrage .arbitrage-search svg {
  position: absolute;
  z-index: 1;
  left: 9px;
  top: 50%;
  width: 15px;
  height: 15px;
  color: var(--v2-muted);
  transform: translateY(-50%);
}

html.v2-layout-ready #arbitrage .arbitrage-search input { width: 100%; padding-left: 31px; }
html.v2-layout-ready #arbitrage .arbitrage-readiness-filter { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; color: var(--v2-muted); font-size: 12px; }
html.v2-layout-ready #arbitrage .arbitrage-readiness-filter select { min-width: 0; width: 100%; }
html.v2-layout-ready #arbitrage .arbitrage-visible-filter { min-width: 126px; min-height: 34px; }

html.v2-layout-ready #arbitrage .arbitrage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, .65fr) !important;
  align-items: start !important;
  gap: 10px;
  margin: 0;
  padding: 10px;
}

html.v2-layout-ready #arbitrage .arbitrage-candidate-section,
html.v2-layout-ready #arbitrage #arbitrageDetail {
  grid-row: 1 !important;
  min-width: 0;
  height: auto !important;
  max-height: none !important;
  align-self: start !important;
}

html.v2-layout-ready #arbitrage .arbitrage-candidate-section { grid-column: 1 !important; contain: none !important; }
html.v2-layout-ready #arbitrage #arbitrageDetail { grid-column: 2 !important; position: sticky; top: 8px; overflow: visible; }
html.v2-layout-ready #arbitrage .arbitrage-table-scroll { flex: 0 1 auto; max-height: 760px; overflow: auto; }
html.v2-layout-ready #arbitrage .arbitrage-table-scroll table { min-width: 920px; }
html.v2-layout-ready #arbitrage .arbitrage-table-scroll td { vertical-align: top; }
html.v2-layout-ready #arbitrage .arbitrage-table-scroll td > strong,
html.v2-layout-ready #arbitrage .arbitrage-table-scroll td > small,
html.v2-layout-ready #arbitrage .arbitrage-table-scroll td > .status-badge { display: block; width: max-content; max-width: 100%; }

html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-score-summary {
  grid-template-columns: 88px 96px minmax(0, 1fr);
}

html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-score-summary > div,
html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-score-summary > div:last-child {
  grid-column: auto;
  min-height: 74px;
  border-top: 0;
  border-right: 1px solid var(--v2-line);
}

html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-score-summary > div:last-child { border-right: 0; }
html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-score-summary > div:last-child strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-legs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-leg {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  border-right: 1px solid var(--v2-line);
  border-bottom: 0;
}

html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-leg:last-child { border-right: 0; }
html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-leg > .status-badge { justify-self: start; }

html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-leg dl {
  grid-template-columns: minmax(0, 1fr);
}

html.v2-layout-ready #arbitrage .arbitrage-z-gauge {
  padding: 9px 10px;
  border-top: 1px solid var(--v2-line);
  border-bottom: 1px solid var(--v2-line);
  background: #f8fafb;
}

html.v2-layout-ready #arbitrage .arbitrage-z-gauge > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
html.v2-layout-ready #arbitrage .arbitrage-z-gauge > div:first-child span { color: var(--v2-muted); font-size: 12px; }
html.v2-layout-ready #arbitrage .arbitrage-z-gauge > div:first-child strong { font-size: 13px; }
html.v2-layout-ready #arbitrage .arbitrage-z-track { position: relative; height: 10px; margin: 9px 5px 5px; background: linear-gradient(90deg, #f4c5c8 0 7%, #f8e7ca 7% 21%, #dceae6 21% 79%, #f8e7ca 79% 93%, #f4c5c8 93% 100%); }
html.v2-layout-ready #arbitrage .arbitrage-z-track > span { position: absolute; top: -3px; bottom: -3px; width: 1px; background: #8ba0aa; }
html.v2-layout-ready #arbitrage .arbitrage-z-loss-left { left: 7%; }
html.v2-layout-ready #arbitrage .arbitrage-z-entry-left { left: 21%; }
html.v2-layout-ready #arbitrage .arbitrage-z-mean { left: 50%; }
html.v2-layout-ready #arbitrage .arbitrage-z-entry-right { left: 79%; }
html.v2-layout-ready #arbitrage .arbitrage-z-loss-right { left: 93%; }
html.v2-layout-ready #arbitrage .arbitrage-z-track > i { position: absolute; left: var(--z-position); top: 50%; width: 12px; height: 18px; border: 2px solid #fff; border-radius: 2px; background: var(--v2-blue); box-shadow: 0 0 0 1px #1d607f; transform: translate(-50%, -50%); }
html.v2-layout-ready #arbitrage .arbitrage-z-labels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); color: var(--v2-muted); font-size: 11px; text-align: center; }

html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details {
  margin-top: 9px;
  border: 1px solid var(--v2-line);
  background: #fff;
}

html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details > summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  color: var(--v2-ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details > summary::after { content: "+"; color: var(--v2-blue); font-size: 16px; }
html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details[open] > summary { border-bottom: 1px solid var(--v2-line); }
html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details[open] > summary::after { content: "−"; }
html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details .arbitrage-diagnostics,
html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details .arbitrage-entry-grid,
html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details .arbitrage-leg-actions { margin: 8px; }

html.v2-layout-ready #arbitrage > .v2-arbitrage-ledger-workspace {
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
}

html.v2-layout-ready #arbitrage .v2-arbitrage-ledger-workspace > .v2-region-heading { padding: 8px 11px; }
html.v2-layout-ready #arbitrage .v2-arbitrage-ledger-workspace > .arbitrage-execution-ledger { margin: 0; border: 0; border-top: 1px solid var(--v2-line); }

html.v2-layout-ready #arbitrage > .v2-arbitrage-assurance-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-section,
html.v2-layout-ready #arbitrage .arbitrage-method-section {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--v2-line-strong);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-section > summary,
html.v2-layout-ready #arbitrage .arbitrage-method-section > summary {
  min-height: 58px;
  margin: 0;
  padding: 8px 11px;
  cursor: pointer;
  list-style: none;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-section > summary::after,
html.v2-layout-ready #arbitrage .arbitrage-method-section > summary::after {
  content: "+";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  border: 1px solid var(--v2-line-strong);
  border-radius: 3px;
  color: var(--v2-blue);
  font-size: 16px;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-section[open] > summary::after,
html.v2-layout-ready #arbitrage .arbitrage-method-section[open] > summary::after { content: "−"; }
html.v2-layout-ready #arbitrage .arbitrage-capability-section > summary > .status-badge,
html.v2-layout-ready #arbitrage .arbitrage-method-section > summary > .status-badge { margin-left: auto; }
html.v2-layout-ready #arbitrage .arbitrage-capability-section[open] .arbitrage-capability-workspace,
html.v2-layout-ready #arbitrage .arbitrage-method-section[open] .arbitrage-boundaries { border-top: 1px solid var(--v2-line); }

@media (max-width: 1180px) {
  html.v2-layout-ready #overview > .overview-summary-row,
  html.v2-layout-ready #arbitrage > .v2-arbitrage-control-workspace,
  html.v2-layout-ready #arbitrage .arbitrage-layout,
  html.v2-layout-ready #arbitrage > .v2-arbitrage-assurance-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html.v2-layout-ready #arbitrage #arbitrageDetail { grid-column: 1 !important; grid-row: 2 !important; position: static; }
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control { grid-template-columns: auto minmax(180px, 1fr) minmax(170px, auto); }
  html.v2-layout-ready #arbitrage .arbitrage-visible-filter { grid-column: 1 / -1; width: max-content; }
}

@media (max-width: 720px) {
  :root { --chart-price-height: 380px; --chart-range-height: 230px; }
  html.v2-layout-ready #overview .overview-qualification-summary { grid-template-columns: minmax(0, 1fr) auto !important; }
  html.v2-layout-ready #overview .overview-qualification-summary > button { grid-column: 1 / -1; width: 100%; }
  html.v2-layout-ready #overview .overview-qualification-details[open] > div { position: fixed; left: 12px; right: 12px; top: auto; width: auto; }
  html.v2-layout-ready #arbitrage .arbitrage-auto-controls { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html.v2-layout-ready #arbitrage .arbitrage-scope-control,
  html.v2-layout-ready #arbitrage .arbitrage-auto-controls > .primary-button { grid-column: 1 / -1; }
  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics .metric-card:nth-child(2n) { border-right: 0; }
  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics .metric-card:last-child { grid-column: 1 / -1; border-top: 1px solid var(--v2-line); }
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control { grid-template-columns: minmax(0, 1fr); }
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > * { width: 100%; }
  html.v2-layout-ready #arbitrage .arbitrage-readiness-filter { grid-template-columns: 42px minmax(0, 1fr); }
  html.v2-layout-ready #arbitrage .arbitrage-visible-filter { grid-column: 1; width: 100%; }
  html.v2-layout-ready #arbitrage .arbitrage-layout { padding: 7px; }
  html.v2-layout-ready #arbitrage .arbitrage-z-labels { font-size: 11px; }
  html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-score-summary,
  html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-legs { grid-template-columns: minmax(0, 1fr); }
  html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-score-summary > div { min-height: 0; border-right: 0; border-bottom: 1px solid var(--v2-line); }
html.v2-layout-ready #arbitrage #arbitrageDetail .arbitrage-leg { border-right: 0; border-bottom: 1px solid var(--v2-line); }
}

/* Final status contract: one small, high-contrast symbol and a readable label. */
html.v2-layout-ready .qualification-state {
  --status-marker: #a52736;
  --status-marker-fill: #fde7ea;
  min-width: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--v2-ink);
  white-space: normal;
}

html.v2-layout-ready .qualification-state::before {
  content: "×";
  display: inline-grid;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-right: 6px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 50%;
  background: var(--status-marker-fill);
  color: var(--status-marker);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

html.v2-layout-ready .qualification-state:empty::after {
  content: attr(data-qualification-label);
  color: var(--v2-ink);
  font-size: var(--ui-status);
  font-weight: 550;
  line-height: 1.25;
}

html.v2-layout-ready [data-qualification-state="passed"] {
  --status-marker: #08734f;
  --status-marker-fill: #dff4e9;
}
html.v2-layout-ready [data-qualification-state="passed"]::before { content: "✓"; }

html.v2-layout-ready [data-qualification-state="pending"] {
  --status-marker: #926000;
  --status-marker-fill: #fff1cf;
}
html.v2-layout-ready [data-qualification-state="pending"]::before { content: "…"; font-size: 17px; }

html.v2-layout-ready [data-qualification-state="below-standard"],
html.v2-layout-ready [data-qualification-state="incomplete"],
html.v2-layout-ready [data-qualification-state="missing"] {
  --status-marker: #a52736;
  --status-marker-fill: #fde7ea;
}

html.v2-layout-ready [data-qualification-state="not-applicable"] {
  --status-marker: #5c6d75;
  --status-marker-fill: #e9eef0;
}
html.v2-layout-ready [data-qualification-state="not-applicable"]::before { content: "—"; font-size: 14px; }
html.v2-layout-ready .stage-item.qualification-state {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

html.v2-layout-ready .qualification-state > svg,
html.v2-layout-ready .gate-list > .gate-pass:not(.qualification-state) > svg,
html.v2-layout-ready .gate-list > .gate-fail:not(.qualification-state) > svg,
html.v2-layout-ready .gate-list > .gate-pending:not(.qualification-state) > svg,
html.v2-layout-ready .check-pass > svg,
html.v2-layout-ready .check-fail > svg,
html.v2-layout-ready .check-pending > svg {
  display: none !important;
}

/* Static gate/check rows use the same symbols even before a live refresh. */
html.v2-layout-ready .gate-list > .gate-pass:not(.qualification-state)::before,
html.v2-layout-ready .check-pass::before {
  content: "✓";
  color: #08734f;
  background: #dff4e9;
}
html.v2-layout-ready .gate-list > .gate-pending:not(.qualification-state)::before,
html.v2-layout-ready .check-pending::before {
  content: "…";
  color: #926000;
  background: #fff1cf;
  font-size: 17px;
}
html.v2-layout-ready .gate-list > .gate-fail:not(.qualification-state)::before,
html.v2-layout-ready .check-fail::before {
  content: "×";
  color: #a52736;
  background: #fde7ea;
}
html.v2-layout-ready .gate-list > .gate-pass:not(.qualification-state)::before,
html.v2-layout-ready .gate-list > .gate-pending:not(.qualification-state)::before,
html.v2-layout-ready .gate-list > .gate-fail:not(.qualification-state)::before,
html.v2-layout-ready .check-pass::before,
html.v2-layout-ready .check-pending::before,
html.v2-layout-ready .check-fail::before {
  display: inline-grid;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-right: 2px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

/* Ordinary status badges use the same marker language without a second frame. */
html.v2-layout-ready .status-badge:not(.qualification-state) {
  min-height: 20px;
  gap: 5px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--v2-ink);
  font-size: var(--ui-status);
  font-weight: 600;
  white-space: nowrap;
}
html.v2-layout-ready .status-badge:not(.qualification-state)::before {
  display: inline-grid;
  width: 18px;
  height: 18px;
  min-width: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
html.v2-layout-ready .status-badge.status-good:not(.qualification-state)::before {
  content: "✓";
  color: #08734f;
  background: #dff4e9;
}
html.v2-layout-ready .status-badge.status-warn:not(.qualification-state)::before {
  content: "…";
  color: #926000;
  background: #fff1cf;
  font-size: 16px;
}
html.v2-layout-ready .status-badge.status-blocked:not(.qualification-state)::before {
  content: "×";
  color: #a52736;
  background: #fde7ea;
}
html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state)::before {
  content: "—";
  color: #5c6d75;
  background: #e9eef0;
  font-size: 13px;
}

html.v2-layout-ready .status-dot {
  display: inline-grid;
  width: 18px;
  height: 18px;
  min-width: 18px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
html.v2-layout-ready .status-dot::before { content: "—"; color: #5c6d75; }
html.v2-layout-ready .status-dot.status-good { background: #dff4e9; }
html.v2-layout-ready .status-dot.status-good::before { content: "✓"; color: #08734f; }
html.v2-layout-ready .status-dot.status-warn { background: #fff1cf; }
html.v2-layout-ready .status-dot.status-warn::before { content: "…"; color: #926000; font-size: 15px; }
html.v2-layout-ready .status-dot.status-bad,
html.v2-layout-ready .status-dot.status-blocked { background: #fde7ea; }
html.v2-layout-ready .status-dot.status-bad::before,
html.v2-layout-ready .status-dot.status-blocked::before { content: "×"; color: #a52736; }

/* Overview alignment: keep the decision rail flush with the market workspace. */
@media (min-width: 721px) {
  html.v2-layout-ready #overview .dashboard-grid {
    align-items: stretch !important;
  }

  html.v2-layout-ready #overview .market-panel {
    align-self: stretch;
    min-height: 0;
  }

  html.v2-layout-ready #overview .dashboard-side-column {
    min-height: 100%;
    height: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #overview .trade-plan-panel {
    min-height: 0;
    flex: 1 1 auto !important;
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #overview .trade-plan-panel > .panel-actions {
    margin-top: auto;
  }

  /* The three fundamental columns share one stable row height without spacer gaps. */
  html.v2-layout-ready #overview .fundamental-intelligence-grid {
    align-items: stretch;
  }

  html.v2-layout-ready #overview .fundamental-core-column,
  html.v2-layout-ready #overview .fundamental-driver-column {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    gap: 8px;
  }

  html.v2-layout-ready #overview .fundamental-metrics,
  html.v2-layout-ready #overview .fundamental-driver-list {
    min-height: 0;
    margin-top: 0;
    align-self: stretch;
    grid-auto-rows: minmax(58px, 1fr);
  }

  html.v2-layout-ready #overview .fundamental-metrics > div {
    min-height: 0;
  }

  html.v2-layout-ready #overview .overview-event-column {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
  }

  html.v2-layout-ready #overview .overview-event-list {
    min-height: 0;
    height: 100%;
    max-height: none;
    grid-auto-rows: minmax(72px, 1fr);
    overflow-y: auto;
  }
}

/* Stable compact-desktop composition: aligned controls and clear chart hierarchy. */
@media (min-width: 1041px) and (max-width: 1360px) {
  html.v2-layout-ready .topbar {
    min-height: 82px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 10px;
    padding: 10px 12px;
  }

  html.v2-layout-ready .topbar > .global-controls {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  html.v2-layout-ready .global-controls {
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 8px;
  }

  html.v2-layout-ready .contract-switcher {
    grid-template-columns: minmax(150px, .9fr) minmax(150px, .9fr) minmax(185px, 1.15fr);
    gap: 7px;
  }

  html.v2-layout-ready .v2-command-side {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
    justify-self: end;
    justify-content: flex-end;
    gap: 7px;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote {
    min-width: 142px;
    padding-right: 8px;
  }

  html.v2-layout-ready .v2-command-side #globalLastPrice { font-size: 20px; }
  html.v2-layout-ready .v2-command-side .top-actions { gap: 5px; }
  html.v2-layout-ready .v2-command-side .user-button-copy { display: none; }

  html.v2-layout-ready .system-ribbon {
    height: 42px;
    min-height: 42px;
    grid-template-columns: minmax(190px, 1.2fr) minmax(210px, 1fr) minmax(190px, 1fr) minmax(118px, .62fr) minmax(108px, .58fr);
    padding-inline: 10px;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner {
    padding-right: 10px;
    overflow: hidden;
  }

  html.v2-layout-ready .system-ribbon #environmentTitle {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.v2-layout-ready .system-ribbon #environmentDescription { display: none; }

  html.v2-layout-ready .system-ribbon .top-status-item {
    min-height: 42px;
    padding: 0 9px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    align-content: center;
    gap: 6px;
  }

  html.v2-layout-ready .system-ribbon .top-status-item > span,
  html.v2-layout-ready .system-ribbon .top-status-item > strong {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
  }

  html.v2-layout-ready #overview .overview-quote-grid {
    grid-template-columns: minmax(104px, 1.15fr) repeat(9, minmax(78px, 1fr));
  }

  html.v2-layout-ready #overview .overview-quote-grid > span:nth-child(5) {
    border-right: 1px solid #cbd9d5;
  }

  html.v2-layout-ready #overview .overview-market-subcharts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready #overview .overview-market-subchart:first-child {
    grid-column: 1 / -1;
  }

  html.v2-layout-ready #overview .overview-market-subchart:last-child {
    grid-column: auto;
  }
}

/* Keep the desktop overview columns on one shared row baseline.  This rule
   intentionally comes last so older compact-layout overrides cannot pull the
   decision rail back to its content height. */
@media (min-width: 721px) {
  html.v2-layout-ready #overview .dashboard-grid {
    align-items: stretch !important;
  }

  html.v2-layout-ready #overview .market-panel,
  html.v2-layout-ready #overview .dashboard-side-column {
    align-self: stretch !important;
    min-height: 0;
  }

  html.v2-layout-ready #overview .dashboard-side-column {
    height: 100% !important;
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #overview .trade-plan-panel {
    min-height: 0;
    flex: 1 1 auto !important;
  }

  /* Prevent sparse fundamental data from creating a bottom-only island. */
  html.v2-layout-ready #overview .fundamental-core-column,
  html.v2-layout-ready #overview .fundamental-driver-column {
    min-height: 0;
  }

  /* Share the same header/body baselines across all three fundamental columns. */
  html.v2-layout-ready #overview .fundamental-intelligence-grid {
    grid-template-rows: max-content minmax(0, 1fr);
    align-items: stretch;
  }

  html.v2-layout-ready #overview .fundamental-core-column,
  html.v2-layout-ready #overview .fundamental-driver-column,
  html.v2-layout-ready #overview .overview-event-column {
    grid-row: 1 / -1;
    display: grid;
    grid-template-rows: subgrid;
    align-content: stretch;
    gap: 8px;
  }

  html.v2-layout-ready #overview .fundamental-metrics,
  html.v2-layout-ready #overview .fundamental-driver-list {
    margin-top: 0 !important;
  }

  html.v2-layout-ready #overview .overview-event-list {
    margin-top: 0 !important;
    height: min(293px, 100%) !important;
    max-height: 293px !important;
    align-self: start;
    overflow-y: auto;
  }

  html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
    border-bottom: 0;
  }
}

/* Layout closure r30. Keep this block last so page-specific legacy breakpoints
   cannot change the shared desktop composition after it has been resolved. */
@media (min-width: 1041px) and (max-width: 1361px) {
  html.v2-layout-ready .topbar {
    min-height: 82px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 8px;
    padding: 10px;
  }

  html.v2-layout-ready .topbar > .global-controls {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }

  html.v2-layout-ready .global-controls {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 6px;
  }

  html.v2-layout-ready .contract-switcher {
    min-width: 0;
    grid-template-columns: minmax(0, .9fr) minmax(0, .82fr) minmax(0, 1.08fr);
    gap: 6px;
  }

  html.v2-layout-ready .contract-switcher > label,
  html.v2-layout-ready .environment-control,
  html.v2-layout-ready .environment-control select {
    min-width: 0;
  }

  html.v2-layout-ready .v2-command-side {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: auto;
    justify-self: end;
    justify-content: flex-end;
    gap: 5px;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote {
    width: 176px;
    min-width: 176px;
    max-width: 176px;
    padding-inline: 8px;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote > span,
  html.v2-layout-ready .v2-command-side .global-latest-quote > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.v2-layout-ready .v2-command-side .broker-login-shortcut,
  html.v2-layout-ready .v2-command-side .user-button,
  html.v2-layout-ready .v2-command-side .danger-button,
  html.v2-layout-ready .v2-command-side .icon-button {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding-inline: 0;
    justify-content: center;
  }

  html.v2-layout-ready .v2-command-side .broker-login-shortcut > span,
  html.v2-layout-ready .v2-command-side .danger-button > span,
  html.v2-layout-ready .v2-command-side .user-button-copy {
    display: none;
  }
}

@media (min-width: 721px) {
  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip > .operator-control-actions {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip > .operator-control-actions button {
    width: 100%;
    min-width: 0;
  }

  html.v2-layout-ready #arbitrage > .v2-arbitrage-ranking-workspace {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto auto !important;
    align-items: center;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .v2-region-heading {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-ranking-kind-control {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-layout {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control {
    height: 36px;
    max-height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 11px;
    border: 0;
    background: transparent;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .segmented-control {
    order: 4;
    flex: 0 0 auto;
    margin-left: 0;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .arbitrage-search {
    order: 1;
    width: clamp(150px, 16vw, 240px);
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .arbitrage-readiness-filter { order: 2; }
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .arbitrage-visible-filter { order: 3; }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control input,
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control select,
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control button,
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control .compact-switch {
    height: 30px;
    min-height: 30px;
  }
}

@media (max-width: 720px) {
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control {
    height: auto;
    max-height: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }

  html.v2-layout-ready #models .training-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html.v2-layout-ready #models .training-row > div,
  html.v2-layout-ready #models .training-row > progress {
    grid-column: 1 / -1;
    width: 100%;
  }

  html.v2-layout-ready #models #trainingStatusBadge {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}


/* Source: v2-layout-closure.css */
/* Measured layout closure. Loaded after every legacy and page-specific sheet. */

@media (min-width: 1041px) and (max-width: 1361px) {
  html.v2-layout-ready .topbar {
    min-height: 82px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 8px;
    padding: 10px;
  }

  html.v2-layout-ready .topbar > .global-controls {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }

  html.v2-layout-ready .global-controls {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 6px;
  }

  html.v2-layout-ready .contract-switcher {
    min-width: 0;
    grid-template-columns: minmax(0, .9fr) minmax(0, .82fr) minmax(0, 1.08fr);
    gap: 6px;
  }

  html.v2-layout-ready .contract-switcher > label,
  html.v2-layout-ready .environment-control,
  html.v2-layout-ready .environment-control select {
    min-width: 0;
  }

  html.v2-layout-ready .v2-command-side {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: auto;
    justify-self: end;
    justify-content: flex-end;
    gap: 5px;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    min-height: 44px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    gap: 2px;
    padding-inline: 8px;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote > strong {
    min-width: 0;
    max-width: 100%;
    margin-top: 0;
    overflow: visible;
    white-space: nowrap;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote #globalChangeSummary {
    overflow: visible;
    text-overflow: clip;
  }

  html.v2-layout-ready .v2-command-side .broker-login-shortcut,
  html.v2-layout-ready .v2-command-side .danger-button,
  html.v2-layout-ready .v2-command-side .icon-button {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding-inline: 0;
    justify-content: center;
  }

  html.v2-layout-ready .v2-command-side .broker-login-shortcut > span,
  html.v2-layout-ready .v2-command-side .danger-button > span {
    display: none;
  }

  html.v2-layout-ready .v2-command-side .user-button {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    padding-inline: 6px;
  }

  html.v2-layout-ready .v2-command-side .user-avatar { display: none; }

  html.v2-layout-ready .v2-command-side .user-button-copy {
    min-width: 0;
    display: block !important;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy strong {
    max-width: 60px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy small { display: none; }
}

@media (min-width: 721px) {
  html.v2-layout-ready #arbitrage .arbitrage-capability-workspace {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row;
  }

  html.v2-layout-ready #arbitrage .arbitrage-capability-matrix {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
  }

  html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries {
    width: auto;
    min-width: 0;
    max-width: none;
    grid-column: 1 !important;
    grid-row: auto !important;
    justify-self: stretch;
    overflow: hidden;
  }

  html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries > section,
  html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries ul,
  html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries li {
    min-width: 0;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip > .operator-control-actions {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip > .operator-control-actions button {
    width: 100%;
    min-width: 0;
  }

  html.v2-layout-ready #arbitrage > .v2-arbitrage-ranking-workspace {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto auto !important;
    align-items: center;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .v2-region-heading {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-ranking-kind-control {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-metrics {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace > .arbitrage-layout {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control {
    height: 36px;
    max-height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 11px;
    border: 0;
    background: transparent;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .segmented-control {
    order: 4;
    flex: 0 0 auto;
    margin-left: 0;
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .arbitrage-search {
    order: 1;
    width: clamp(150px, 16vw, 240px);
  }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .arbitrage-readiness-filter { order: 2; }
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control > .arbitrage-visible-filter { order: 3; }

  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control input,
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control select,
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control button,
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control .compact-switch {
    height: 30px;
    min-height: 30px;
  }

  html.v2-layout-ready #arbitrage .arbitrage-layout {
    height: auto;
    align-items: stretch !important;
    padding: 0;
  }

  html.v2-layout-ready #arbitrage .arbitrage-candidate-section,
  html.v2-layout-ready #arbitrage #arbitrageDetail {
    min-height: 0;
    height: auto;
    max-height: none;
    align-self: stretch !important;
  }

  html.v2-layout-ready #arbitrage .arbitrage-candidate-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.v2-layout-ready #arbitrage .arbitrage-candidate-section > .arbitrage-table-scroll {
    min-height: 0;
    height: 0;
    max-height: none !important;
    flex: 1 1 0;
    overflow: auto;
  }

  html.v2-layout-ready #arbitrage #arbitrageDetail { overflow: visible; }
}

@media (max-width: 720px) {
  html.v2-layout-ready #arbitrage .arbitrage-ranking-kind-control {
    height: auto;
    max-height: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }

  html.v2-layout-ready #models .training-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html.v2-layout-ready #models .training-row > div,
  html.v2-layout-ready #models .training-row > progress {
    grid-column: 1 / -1;
    width: 100%;
  }

  html.v2-layout-ready #models #trainingStatusBadge {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Fixed overview workbench on desktop. Data changes stay inside each region
   so loading, empty quotes, and populated snapshots cannot reflow the page. */
@media (min-width: 1181px) {
  html.v2-layout-ready #overview .dashboard-grid {
    grid-template-rows: 1149px;
    align-items: stretch !important;
  }

  html.v2-layout-ready #overview .market-panel {
    height: 1149px;
    min-height: 1149px;
    max-height: 1149px;
    overflow: hidden;
  }

  html.v2-layout-ready #overview .market-timeframe-row {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    overflow: hidden;
  }

  html.v2-layout-ready #overview .intraday-signal-strip {
    height: 78px;
    min-height: 78px;
    max-height: 78px;
    overflow: hidden;
  }

  html.v2-layout-ready #overview #marketChart {
    height: 420px !important;
    min-height: 420px !important;
    max-height: 420px !important;
  }

  html.v2-layout-ready #overview .overview-market-subcharts {
    height: 391px;
    min-height: 391px;
    max-height: 391px;
    grid-template-rows: 391px;
  }

  html.v2-layout-ready #overview .overview-market-subchart {
    height: 391px;
    min-height: 391px;
    max-height: 391px;
    overflow: hidden;
  }

  html.v2-layout-ready #overview .overview-timeframe-matrix {
    height: 123px;
    min-height: 123px;
    max-height: 123px;
    overflow: hidden;
  }

  html.v2-layout-ready #overview .overview-timeframe-grid {
    height: 78px;
    min-height: 78px;
    max-height: 78px;
  }

  html.v2-layout-ready #overview .dashboard-side-column {
    height: 1149px !important;
    min-height: 1149px;
    max-height: 1149px;
    display: grid;
    grid-template-rows: 791px 346px;
    gap: 12px;
    align-self: stretch !important;
  }

  html.v2-layout-ready #overview .overview-depth-panel {
    height: 791px;
    min-height: 791px;
    max-height: 791px;
    overflow: hidden;
  }

  html.v2-layout-ready #overview .overview-order-book {
    height: 444px;
    min-height: 444px;
    max-height: 444px;
    flex: 0 0 444px;
    overflow: hidden;
  }

  html.v2-layout-ready #overview .overview-book-stats {
    height: 161px;
    min-height: 161px;
    max-height: 161px;
    overflow: hidden;
  }

  html.v2-layout-ready #overview .overview-contract-specs {
    height: 53px;
    min-height: 53px;
    max-height: 53px;
    overflow: hidden;
  }

  html.v2-layout-ready #overview .trade-plan-panel {
    height: 346px;
    min-height: 346px;
    max-height: 346px;
    overflow: hidden;
    flex: 0 0 346px !important;
  }

  /* Keep the fixed workbench and the report below it in separate paint
     layers so a long action row cannot cover the report header on scroll or
     browser zoom. */
  html.v2-layout-ready #overview .v2-overview-workspace {
    position: relative;
    z-index: 0;
    overflow: visible;
  }

  html.v2-layout-ready #overview .fundamental-report-panel {
    position: relative;
    z-index: 1;
    isolation: isolate;
    margin-top: 16px;
    scroll-margin-top: 88px;
  }

  /* Match the annotated fundamental layout: the three columns start directly
     below the summary band instead of inheriting the legacy 10px offset. */
  html.v2-layout-ready #overview .fundamental-intelligence-grid {
    margin-top: 0 !important;
  }

  /* Keep the decision actions inside the fixed right rail even when the
     blocker contains the full multi-gate explanation. The explanation scrolls
     within its own bounded region; the two actions remain permanently usable. */
  html.v2-layout-ready #overview .trade-plan-panel {
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #overview .trade-plan-panel > .panel-heading {
    flex: 0 0 42px;
    min-height: 42px;
    margin-bottom: 8px;
  }

  html.v2-layout-ready #overview .trade-plan-panel > .plan-list {
    flex: 0 0 132px;
    min-height: 132px;
    grid-auto-rows: 44px;
  }

  html.v2-layout-ready #overview .trade-plan-panel > .plan-list > div {
    min-height: 0;
    padding: 5px 7px;
  }

  html.v2-layout-ready #overview .trade-plan-panel > .plan-list dd {
    line-height: 1.2;
  }

  html.v2-layout-ready #overview .trade-plan-panel > .plan-blocker {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 72px;
    margin-top: 8px;
    padding: 7px 8px;
    overflow-y: auto;
    line-height: 1.35;
  }

  html.v2-layout-ready #overview .trade-plan-panel > .panel-actions {
    flex: 0 0 36px;
    min-height: 36px;
    margin-top: 8px !important;
  }
}

/* At mid-desktop widths the six-period matrix is three columns by two rows.
   Give both rows a real layout track so the latest-bar explanation remains
   visible instead of painting underneath the next report. */
@media (min-width: 1181px) and (max-width: 1360px) {
  html.v2-layout-ready #overview .dashboard-grid {
    grid-template-rows: 1325px;
  }

  html.v2-layout-ready #overview .market-panel {
    height: 1325px;
    min-height: 1325px;
    max-height: 1325px;
  }

  html.v2-layout-ready #overview .overview-timeframe-matrix {
    height: 278px;
    min-height: 278px;
    max-height: 278px;
  }

  html.v2-layout-ready #overview .overview-timeframe-grid {
    height: 208px;
    min-height: 208px;
    max-height: 208px;
  }

  html.v2-layout-ready #overview .overview-timeframe-grid > article {
    height: 104px;
    min-height: 104px;
    max-height: 104px;
  }

  html.v2-layout-ready #overview .dashboard-side-column {
    height: 1325px !important;
    min-height: 1325px;
    max-height: 1325px;
    grid-template-rows: 967px 346px;
  }

  html.v2-layout-ready #overview .overview-depth-panel {
    height: 967px;
    min-height: 967px;
    max-height: 967px;
  }
}

/* Keep the overview market state readable on the dark instrument banner.
   The shared status language intentionally removes badge framing, so the
   banner needs its own contrast and width guard to prevent the state copy
   from blending into the background or being squeezed out by long symbols. */
html.v2-layout-ready #overview .overview-instrument-heading .status-badge {
  min-width: 178px;
  max-width: none;
  justify-self: end;
  overflow: visible;
  text-align: right;
  white-space: nowrap;
  color: #edf7f4 !important;
}

html.v2-layout-ready #overview .overview-instrument-heading .status-badge::before {
  flex: 0 0 18px;
}

@media (min-width: 1181px) and (max-width: 1600px) {
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) > .v2-position-workspace {
    align-items: stretch;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table,
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) #positionDetail,
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card {
    min-height: 380px;
    height: 380px;
    align-self: stretch;
    overflow: hidden;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table > .table-scroll {
    min-height: 0;
    height: 100%;
    max-height: none;
    flex: 1 1 0;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table table,
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table tbody tr {
    height: 100%;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table .empty-state {
    vertical-align: middle;
    color: var(--v2-muted);
  }
}

/* The event workbench uses one compact command row and ends on the same
   viewport baseline as the persistent navigation rail. */
@media (min-width: 721px) {
  html.v2-layout-ready #events > .event-execution-policy {
    height: 32px;
    min-height: 32px;
    margin-block: 4px;
  }

  html.v2-layout-ready #events > .event-execution-policy > div {
    min-height: 32px;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  html.v2-layout-ready #events > .event-execution-policy > div > small { display: none; }
  html.v2-layout-ready #events > .event-execution-policy > div > span,
  html.v2-layout-ready #events > .event-execution-policy > div > strong {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }
}

@media (min-width: 721px) and (max-width: 1180px) and (max-height: 760px) {
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) #positionDetail {
    overflow-y: auto;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-overview {
    min-height: 42px;
    height: 42px;
    flex: 0 0 42px;
  }
}

@media (max-width: 720px) {
  html.v2-layout-ready #overview .overview-instrument-heading .status-badge {
    min-width: 0;
    justify-self: start;
    text-align: left;
  }
}

/* Wide operations workspace. Large desktop monitors should expose more
   information, not stretch narrow forms and leave unrelated empty columns. */
@media (min-width: 1601px) {
  html.v2-layout-ready #automation .automation-layout {
    grid-template-columns: minmax(0, 1.52fr) minmax(440px, .72fr);
    align-items: stretch;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel {
    height: 100%;
    align-self: stretch;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-content: start;
    column-gap: 10px;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child > .panel-heading,
  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child > .automation-actions,
  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child > .form-grid {
    grid-column: 1 / -1;
  }

  html.v2-layout-ready #automation .automation-layout .form-grid.two-columns {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px 10px;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child > .detail-note {
    grid-column: 1;
    min-height: 38px;
    margin: 0;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child > .button-block {
    grid-column: 2;
    min-height: 38px;
    margin: 0;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:nth-child(2) {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:nth-child(2) > .source-list {
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    align-content: stretch;
  }

  html.v2-layout-ready #automation .v2-automation-execution {
    grid-template-columns: minmax(0, 1fr);
  }

  html.v2-layout-ready #automation .v2-automation-execution > .v2-region-heading,
  html.v2-layout-ready #automation .v2-automation-execution > .automation-execution-grid {
    grid-column: 1 / -1;
    width: 100%;
  }

  html.v2-layout-ready #automation .automation-execution-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  }

  html.v2-layout-ready #automation .automation-execution-grid > .table-section {
    min-height: 210px;
    height: 210px;
    display: flex;
    flex-direction: column;
  }

  html.v2-layout-ready #automation .automation-execution-grid .table-scroll {
    min-height: 0;
    height: 0;
    flex: 1 1 0;
  }

  html.v2-layout-ready #automation .automation-execution-grid table:has(.empty-state),
  html.v2-layout-ready #automation .automation-execution-grid table:has(.empty-state) tbody tr {
    height: 100%;
  }

  html.v2-layout-ready #automation .automation-execution-grid .empty-state {
    vertical-align: middle;
  }

  html.v2-layout-ready #arbitrage > .v2-arbitrage-control-workspace {
    grid-template-columns: minmax(0, 1.48fr) minmax(470px, .62fr);
    align-items: stretch;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace > .arbitrage-auto-workbench,
  html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace > .arbitrage-auto-gate {
    height: 100%;
    align-self: stretch;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip {
    grid-template-columns: minmax(260px, 1fr) auto minmax(500px, auto);
    align-items: center;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip > .operator-control-actions {
    grid-column: 3;
    width: auto;
    grid-template-columns: repeat(5, minmax(96px, 1fr));
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench > .operator-control-strip .operator-control-copy small {
    max-width: 390px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-controls {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    align-items: end;
  }

  html.v2-layout-ready #arbitrage .arbitrage-scope-control {
    grid-column: span 4;
  }

  html.v2-layout-ready #arbitrage .arbitrage-auto-controls > .primary-button {
    grid-column: span 2;
    width: 100%;
    align-self: end;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace > .arbitrage-auto-gate {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics {
    height: 100%;
    align-content: stretch;
  }

  html.v2-layout-ready #arbitrage .v2-arbitrage-control-workspace .arbitrage-evidence-metrics .metric-card {
    min-height: 0;
    height: 100%;
    align-content: center;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) > .v2-position-workspace {
    grid-template-rows: auto 150px 180px;
    row-gap: 10px;
    align-items: stretch;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 150px;
    height: 150px;
    align-self: stretch;
    overflow: hidden;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) #positionDetail,
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card {
    grid-column: 1 / -1;
    min-height: 180px;
    height: 180px;
    align-self: stretch;
    overflow: hidden;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) #positionDetail {
    grid-row: 3;
    grid-template-rows: minmax(0, 1fr);
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table > .table-scroll {
    min-height: 0;
    height: 100%;
    max-height: none;
    flex: 1 1 0;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table table,
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table tbody tr {
    height: 100%;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .positions-ledger-table .empty-state {
    vertical-align: middle;
    color: var(--v2-muted);
    font-size: 13px;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card {
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(340px, .9fr) minmax(0, 1.3fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    column-gap: 10px;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card > .panel-heading {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 0;
    margin-bottom: 0;
    padding-bottom: 7px;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-overview {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    height: 100%;
    padding: 8px;
    border: 1px solid var(--v2-line);
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-facts {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    height: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-facts > div {
    padding: 4px 8px;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-facts dt {
    line-height: 1.2;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-facts dd {
    margin-top: 1px;
    line-height: 1.2;
  }

  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card > .detail-note {
    grid-column: 3;
    grid-row: 2;
    min-height: 0;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    align-self: stretch;
  }
}
/* Remote mode keeps the desktop layout intact while making host mutations inert. */
body.remote-read-only :is(
  #sessionBrokerLoginButton,
  #brokerLoginButton,
  #orderBrokerLoginButton,
  #settingsBrokerLoginButton,
  #connectBrokerButton,
  #disconnectBrokerButton,
  #inviteUserButton,
  #savePaperEquity,
  #saveSettings,
  #createPlatformRecordButton,
  #savePlatformRecordButton,
  #runReplayButton,
  #runQualificationButton,
  #refreshPlatformIntegrationButton,
  #requestReleaseApprovalButton,
  #revokeAuthorizationButton,
  #killSwitchButton,
  #mobileEmergencyStop,
  #confirmKillSwitch,
  #cancelAllShadowButton,
  #manualTakeoverButton,
  #reconcileButton,
  #releaseHaltButton,
  #confirmReleaseHalt,
  #saveAutomationConfig,
  #saveArbitrageAutomation,
  #positionsCancelOpenButton,
  #positionsCloseAllButton,
  #positionsReconcileButton,
  #positionsTakeoverButton,
  #positionsReleaseButton,
  #arbitrageCancelOpenButton,
  #arbitrageFlattenButton,
  #arbitrageReconcileButton,
  #arbitrageTakeoverButton,
  #arbitrageReleaseButton,
  #confirmLegacySpreadAttestation,
  [data-manual-spread-order],
  [data-position-action],
  [data-approval-request],
  [data-create-approval-role],
  [data-combination-reconcile],
  [data-combination-release],
  [data-combination-takeover]
) {
  pointer-events: none !important;
  opacity: 0.48 !important;
}
