/* Source: v6-institutional-unification.css */
/*
 * Zhongqi Zhiyan / V6 institutional unification
 * Final visual contract for typography, color, density and responsive shell.
 * Existing IDs, data bindings and application behavior remain unchanged.
 */

:root {
  --bg: #edf2f4;
  --surface: #ffffff;
  --surface-soft: #f6f9fa;
  --surface-strong: #e7eef0;
  --ink: #102b35;
  --text: #102b35;
  --muted: #627680;
  --line: #cbd8dd;
  --line-strong: #a9bcc3;
  --nav: #0b2630;
  --nav-hover: #133841;
  --green: #087f6d;
  --green-soft: #e4f3ef;
  --red: #c43242;
  --red-soft: #fbe8eb;
  --amber: #9a681c;
  --amber-soft: #fbf0dd;
  --blue: #126b8d;
  --blue-soft: #e7f1f5;
  --price-up: #c43242;
  --price-up-soft: #fbe8eb;
  --price-down: #067a57;
  --price-down-soft: #e3f3ed;
  --shadow: 0 5px 16px rgba(9, 36, 46, .065);

  --v3-canvas: #edf2f4;
  --v3-surface: #ffffff;
  --v3-surface-soft: #f6f9fa;
  --v3-surface-tint: #edf5f5;
  --v3-ink: #102b35;
  --v3-ink-strong: #092630;
  --v3-muted: #627680;
  --v3-muted-light: #83949b;
  --v3-line: #cbd8dd;
  --v3-line-soft: #e0e8eb;
  --v3-line-strong: #a9bcc3;
  --v3-sidebar: #0b2630;
  --v3-sidebar-deep: #071e27;
  --v3-sidebar-line: #284650;
  --v3-teal: #087f6d;
  --v3-teal-bright: #29c5a5;
  --v3-teal-soft: #e4f3ef;
  --v3-blue: #126b8d;
  --v3-blue-soft: #e7f1f5;
  --v3-copper: #9a681c;
  --v3-copper-soft: #fbf0dd;
  --v3-up: #c43242;
  --v3-up-soft: #fbe8eb;
  --v3-down: #067a57;
  --v3-down-soft: #e3f3ed;
  --v3-danger: #b52539;
  --v3-shadow: 0 5px 16px rgba(9, 36, 46, .065);
  --v3-shadow-soft: 0 1px 4px rgba(9, 36, 46, .055);

  --font-assist: 12px;
  --font-meta: 13px;
  --font-body: 14px;
  --font-control: 14px;
  --font-section: 14px;
  --font-panel: 16px;
  --font-page: 22px;
  --font-metric: 20px;
  --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;
}

html.v2-layout-ready,
html.v2-layout-ready body {
  background: var(--v3-canvas);
  color: var(--v3-ink);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: var(--font-body);
  line-height: 1.45;
  letter-spacing: 0;
}

html.v2-layout-ready *,
html.v2-layout-ready *::before,
html.v2-layout-ready *::after {
  letter-spacing: 0;
}

html.v2-layout-ready button,
html.v2-layout-ready input,
html.v2-layout-ready select,
html.v2-layout-ready textarea {
  font-family: inherit;
  font-size: var(--font-control);
}

html.v2-layout-ready small,
html.v2-layout-ready .control-label,
html.v2-layout-ready .panel-heading p,
html.v2-layout-ready .section-heading p,
html.v2-layout-ready .dialog-heading p {
  font-size: var(--font-assist);
  line-height: 1.45;
}

html.v2-layout-ready code,
html.v2-layout-ready time,
html.v2-layout-ready #globalLastPrice,
html.v2-layout-ready #marketLastPrice,
html.v2-layout-ready #marketChangeValue,
html.v2-layout-ready #marketChangePct,
html.v2-layout-ready .global-latest-quote strong,
html.v2-layout-ready .market-quote-strip strong,
html.v2-layout-ready .metric-card > strong,
html.v2-layout-ready .trade-account-strip strong,
html.v2-layout-ready .health-strip strong,
html.v2-layout-ready .ranking-summary-strip strong,
html.v2-layout-ready .last-price strong,
html.v2-layout-ready .book-row strong {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
  font-variant-numeric: tabular-nums lining-nums;
}

/* Stable graphite navigation rail. */
html.v2-layout-ready .app-shell {
  grid-template-columns: 216px minmax(0, 1fr);
}

html.v2-layout-ready .sidebar {
  background: var(--v3-sidebar);
  border-right-color: var(--v3-sidebar-line);
  box-shadow: 5px 0 18px rgba(4, 24, 32, .1);
  scrollbar-color: #496773 transparent;
}

html.v2-layout-ready .brand {
  min-height: 70px;
  height: 70px;
  flex-basis: 70px;
  gap: 10px;
  padding-inline: 14px;
  background: var(--v3-sidebar-deep);
}

html.v2-layout-ready .brand .brand-mark {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border: 1px solid #37616c;
  box-shadow: none;
}

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

html.v2-layout-ready .brand-copy span {
  margin-top: 2px;
  color: #92abb3;
  font-size: 11px;
}

html.v2-layout-ready .primary-nav {
  gap: 1px;
  padding: 8px 7px 10px;
}

html.v2-layout-ready .nav-group-label {
  padding: 10px 10px 4px;
  color: #77929b;
  font-size: 11px;
  font-weight: 600;
}

html.v2-layout-ready .nav-button {
  min-height: 38px;
  margin-inline: 2px;
  padding-inline: 11px;
  gap: 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 3px;
  color: #b8c9ce;
  font-size: 14px;
  font-weight: 500;
}

html.v2-layout-ready .nav-button:hover {
  background: #123641;
  border-color: #45636b;
  color: #f3f8f7;
}

html.v2-layout-ready .nav-button.is-active {
  background: #12413f;
  border-color: var(--v3-teal-bright);
  color: #ffffff;
  box-shadow: none;
}

html.v2-layout-ready .nav-button svg {
  width: 17px;
  height: 17px;
  color: #81a9b2;
}

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

html.v2-layout-ready .sidebar-footer {
  margin: auto 8px 9px;
  padding: 10px;
  border: 1px solid #31535d;
  border-top: 2px solid var(--v3-copper);
  background: #102f39;
  box-shadow: none;
}

html.v2-layout-ready .sidebar-footer strong { font-size: 12px; }
html.v2-layout-ready .sidebar-footer span { font-size: 11px; line-height: 1.35; }

/* Header is a compact command bar followed by a system state tape. */
html.v2-layout-ready .topbar {
  min-height: 82px;
  padding: 9px 14px;
  background: #fbfcfd;
  border-bottom-color: var(--v3-line);
  box-shadow: 0 1px 4px rgba(9, 36, 46, .05);
}

html.v2-layout-ready .contract-switcher label,
html.v2-layout-ready .environment-control label,
html.v2-layout-ready .top-status-item > span {
  color: var(--v3-muted);
  font-size: 12px;
  font-weight: 600;
}

html.v2-layout-ready .contract-switcher label small {
  color: var(--v3-blue);
  font-size: 12px;
}

html.v2-layout-ready input,
html.v2-layout-ready select,
html.v2-layout-ready textarea,
html.v2-layout-ready .product-search-field {
  min-height: 36px;
  border-color: var(--v3-line-strong);
  border-radius: 3px;
  background: #ffffff;
  color: var(--v3-ink-strong);
  box-shadow: none;
}

html.v2-layout-ready .top-actions { gap: 7px; }

html.v2-layout-ready .icon-button,
html.v2-layout-ready .user-button,
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 {
  min-height: 36px;
  border-radius: 3px;
  box-shadow: none;
}

html.v2-layout-ready .icon-button {
  width: 36px;
  height: 36px;
}

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

html.v2-layout-ready .secondary-button,
html.v2-layout-ready .user-button,
html.v2-layout-ready .icon-button {
  border-color: var(--v3-line-strong);
  background: #ffffff;
}

html.v2-layout-ready .top-status {
  min-height: 40px;
  padding-inline: 14px;
  border-color: var(--v3-line);
  background: #edf3f5;
}

html.v2-layout-ready .top-status-item {
  min-width: 0;
  border-right-color: var(--v3-line);
}

html.v2-layout-ready .top-status-item > strong {
  color: var(--v3-ink-strong);
  font-size: 13px;
  font-weight: 600;
}

html.v2-layout-ready .global-latest-quote {
  border-left: 3px solid var(--v3-teal);
  background: #e7f1f2;
  box-shadow: none;
}

html.v2-layout-ready .environment-banner {
  min-height: 34px;
  padding-inline: 14px;
  border-bottom-color: #bdd0d5;
  background: #e8f1f3;
  color: #375f69;
  font-size: 12px;
}

/* Consistent page hierarchy and density across all workspaces. */
html.v2-layout-ready .view {
  padding: 14px;
  background: var(--v3-canvas);
}

html.v2-layout-ready .view > .page-heading {
  min-height: 68px;
  margin: -14px -14px 0;
  padding: 10px 14px;
  gap: 14px;
  background: #f9fbfc;
  border-bottom: 1px solid var(--v3-line);
  box-shadow: none;
}

html.v2-layout-ready .page-heading::before {
  min-width: 108px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #9fc1c5;
  border-left: 3px solid var(--v3-teal);
  border-radius: 3px;
  background: #eaf3f3;
  color: #0a665c;
  box-shadow: none;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

html.v2-layout-ready .page-heading h1 {
  color: var(--v3-ink-strong);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0 !important;
}

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

html.v2-layout-ready .view-actions,
html.v2-layout-ready .section-actions,
html.v2-layout-ready .panel-actions { gap: 8px; }

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

html.v2-layout-ready .tool-panel,
html.v2-layout-ready .detail-panel,
html.v2-layout-ready .table-section,
html.v2-layout-ready .timeline-panel,
html.v2-layout-ready .log-panel,
html.v2-layout-ready .forward-progress-panel {
  min-width: 0;
  border: 1px solid var(--v3-line);
  border-radius: 4px;
  background: var(--v3-surface);
  box-shadow: var(--v3-shadow-soft);
}

html.v2-layout-ready .panel-heading,
html.v2-layout-ready .section-heading,
html.v2-layout-ready .dialog-heading {
  min-height: 48px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--v3-line-soft);
  background: #f8fafb;
}

html.v2-layout-ready .panel-heading h2,
html.v2-layout-ready .section-heading h2,
html.v2-layout-ready .dialog-heading h2 {
  color: var(--v3-ink-strong);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0 !important;
}

html.v2-layout-ready h3 {
  color: var(--v3-ink-strong);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

html.v2-layout-ready .heading-with-icon > svg,
html.v2-layout-ready .overview-heading-icon,
html.v2-layout-ready .quant-system-summary-mark {
  color: var(--v3-teal);
}

html.v2-layout-ready .metric-strip,
html.v2-layout-ready .ranking-summary-strip,
html.v2-layout-ready .health-strip,
html.v2-layout-ready .trade-account-strip {
  border-color: var(--v3-line);
  border-radius: 4px;
  background: var(--v3-surface);
  box-shadow: var(--v3-shadow-soft);
}

html.v2-layout-ready .metric-card,
html.v2-layout-ready .metric-strip > .metric-card,
html.v2-layout-ready .ranking-summary-strip > div,
html.v2-layout-ready .health-strip > div,
html.v2-layout-ready .trade-account-strip > div {
  border-color: var(--v3-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 2px 0 var(--v3-blue);
}

html.v2-layout-ready .metric-card > span,
html.v2-layout-ready .metric-card > small {
  color: var(--v3-muted);
  font-size: 12px;
  line-height: 1.4;
}

html.v2-layout-ready .metric-card > strong {
  color: var(--v3-ink-strong);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.25;
}

html.v2-layout-ready #governance .gate-list > div,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
  min-height: 65px;
  height: 65px;
  border-radius: 0 !important;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card > strong {
  font-size: 13px !important;
}

/* Signature contract tape: graphite identity, neutral quote cells, explicit market color. */
html.v2-layout-ready #overview .overview-market-banner {
  min-height: 88px;
  overflow: hidden;
  border: 1px solid #41666d;
  border-top: 3px solid var(--v3-teal-bright);
  border-radius: 4px;
  background: #123d46;
  color: #effafa;
  box-shadow: var(--v3-shadow);
}

html.v2-layout-ready #overview .overview-instrument-heading {
  min-height: 88px;
  padding: 12px 14px;
  border-right-color: #456a71;
  background: #123d46;
}

html.v2-layout-ready #overview .overview-instrument-heading h2 {
  color: #f4fbfa;
  font-size: 19px;
  font-weight: 700;
}

html.v2-layout-ready #overview .overview-instrument-heading p {
  color: #afcbd0;
  font-size: 12px;
}

html.v2-layout-ready #overview .overview-heading-icon {
  background: #1d5357;
  color: #77e3ca;
  box-shadow: none;
}

html.v2-layout-ready #overview .overview-quote-grid {
  background: #f4f8f8;
}

html.v2-layout-ready #overview .overview-quote-grid > span {
  min-height: 88px;
  padding: 9px 10px;
  border-color: var(--v3-line);
  color: var(--v3-muted);
  font-size: 12px;
}

html.v2-layout-ready #overview .overview-quote-grid strong {
  color: var(--v3-ink-strong);
  font-size: 14px;
  font-weight: 650;
}

html.v2-layout-ready #overview .overview-primary-quote {
  background: #e8f1f2;
  box-shadow: inset 0 -2px 0 var(--v3-blue);
}

html.v2-layout-ready #overview .overview-primary-quote strong {
  color: var(--v3-ink-strong);
  font-size: 26px;
  font-weight: 700;
}

html.v2-layout-ready #overview .dashboard-grid {
  gap: 14px;
}

html.v2-layout-ready #overview .market-panel { border-top: 2px solid var(--v3-blue); }
html.v2-layout-ready #overview .overview-depth-panel { border-top: 2px solid var(--v3-teal); }
html.v2-layout-ready #overview .trade-plan-panel { border-top: 2px solid var(--v3-copper); }

/* Data tables and bounded operational feeds. */
html.v2-layout-ready table {
  width: 100%;
  border-color: var(--v3-line);
  font-variant-numeric: tabular-nums lining-nums;
}

html.v2-layout-ready table thead th {
  height: 32px;
  padding: 7px 9px;
  border-color: var(--v3-line);
  background: #e9f0f2;
  color: #45616b;
  font-size: 12px !important;
  font-weight: 650;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
}

html.v2-layout-ready table tbody td {
  min-height: 35px;
  padding: 8px 9px;
  border-color: var(--v3-line-soft);
  color: var(--v3-ink);
  font-size: 13px !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
}

html.v2-layout-ready table tbody tr:nth-child(even) td { background: #fbfcfc; }
html.v2-layout-ready table tbody tr:hover td { background: #eef6f5; }

html.v2-layout-ready .table-scroll,
html.v2-layout-ready .log-stream,
html.v2-layout-ready .event-list,
html.v2-layout-ready .queue-list {
  scrollbar-color: #91a8b0 #e5edef;
  scrollbar-width: thin;
}

/* One state grammar throughout the application. */
html.v2-layout-ready .status-badge,
html.v2-layout-ready .direction-chip,
html.v2-layout-ready .qualification-state {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 3px !important;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
}

html.v2-layout-ready .status-badge:not(.qualification-state),
html.v2-layout-ready .status-badge.qualification-state {
  border-radius: 3px !important;
}

html.v2-layout-ready .status-badge.status-good:not(.qualification-state) {
  border-color: #84bca9 !important;
  background: var(--v3-down-soft) !important;
  color: #056044 !important;
}

html.v2-layout-ready .status-badge.status-warn:not(.qualification-state) {
  border-color: #d4af68 !important;
  background: var(--v3-copper-soft) !important;
  color: #74500f !important;
}

html.v2-layout-ready .status-badge.status-blocked:not(.qualification-state) {
  border-color: #d68d98 !important;
  background: var(--v3-up-soft) !important;
  color: #8a2031 !important;
}

html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state) {
  border-color: #8db7c7 !important;
  background: var(--v3-blue-soft) !important;
  color: #0b5874 !important;
}

html.v2-layout-ready .value-positive,
html.v2-layout-ready .price-up,
html.v2-layout-ready [data-direction="long"] { color: var(--v3-up) !important; }

html.v2-layout-ready .value-negative,
html.v2-layout-ready .price-down,
html.v2-layout-ready [data-direction="short"] { color: var(--v3-down) !important; }

html.v2-layout-ready .segmented-control {
  min-height: 36px;
  border-color: var(--v3-line-strong);
  border-radius: 3px;
  background: #ffffff;
}

html.v2-layout-ready .segmented-control button {
  min-height: 34px;
  padding-inline: 12px;
  border-radius: 0;
  color: var(--v3-muted);
  font-size: 13px;
}

html.v2-layout-ready .segmented-control button.is-selected {
  background: var(--v3-blue);
  color: #ffffff;
}

html.v2-layout-ready .detail-note,
html.v2-layout-ready .source-list > div,
html.v2-layout-ready .gate-list > div,
html.v2-layout-ready .strategy-card,
html.v2-layout-ready .switch-row,
html.v2-layout-ready .security-summary,
html.v2-layout-ready .update-row,
html.v2-layout-ready .intraday-signal-strip > div,
html.v2-layout-ready .fundamental-summary {
  border-color: var(--v3-line);
  border-radius: 3px;
  background: var(--v3-surface-soft);
  box-shadow: none;
}

html.v2-layout-ready :focus-visible {
  outline: 2px solid var(--v3-teal-bright);
  outline-offset: 2px;
}

/* Intentional compact rail on narrow desktop instead of clipped navigation text. */
@media (min-width: 721px) and (max-width: 1360px) {
  html.v2-layout-ready .app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  html.v2-layout-ready .sidebar {
    overflow-x: hidden;
  }

  html.v2-layout-ready .brand {
    width: 100%;
    max-width: none;
    justify-content: center;
    padding-inline: 0;
  }

  html.v2-layout-ready .brand-copy,
  html.v2-layout-ready .nav-group-label,
  html.v2-layout-ready .nav-button > span,
  html.v2-layout-ready .sidebar-footer > div {
    display: none;
  }

  html.v2-layout-ready .primary-nav {
    gap: 3px;
    padding-inline: 7px;
  }

  html.v2-layout-ready .nav-button {
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    justify-content: center;
    margin-inline: 0;
    padding: 0;
    border-left-width: 3px;
  }

  html.v2-layout-ready .nav-button svg {
    width: 18px;
    height: 18px;
  }

  html.v2-layout-ready .sidebar-footer {
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
  }

  html.v2-layout-ready .sidebar-footer .status-dot { margin: 0; }

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

@media (min-width: 1361px) {
  html.v2-layout-ready .contract-switcher {
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(170px, 1.2fr);
  }
}

@media (min-width: 1101px) {
  html.v2-layout-ready #overview .dashboard-grid {
    grid-template-columns: minmax(0, 1.72fr) minmax(360px, .78fr);
  }
}

@media (max-width: 720px) {
  html.v2-layout-ready .view { padding: 10px; }

  html.v2-layout-ready .view > .page-heading {
    min-height: auto;
    margin: -10px -10px 0;
    padding: 10px;
    align-items: flex-start;
  }

  html.v2-layout-ready .page-heading::before { display: none; }
  html.v2-layout-ready .page-heading h1 { font-size: 20px; }
  html.v2-layout-ready .page-heading p { font-size: 12px; }

  html.v2-layout-ready .panel-heading,
  html.v2-layout-ready .section-heading { padding-inline: 10px; }

  html.v2-layout-ready #overview .overview-market-banner,
  html.v2-layout-ready .tool-panel,
  html.v2-layout-ready .detail-panel,
  html.v2-layout-ready .table-section { border-radius: 3px; }

  html.v2-layout-ready .segmented-control button { padding-inline: 10px; }
}

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


/* Source: v7-quantlab-dark-reference.css */
/*
 * Zhongqi Zhiyan / V7 QuantLab dark reference layer
 * A restrained navy workstation for institutional quantitative research.
 * This layer is intentionally visual-only: IDs, bindings and behavior stay untouched.
 */

:root {
  --bg: #061525;
  --surface: #0a1d31;
  --surface-soft: #0c2136;
  --surface-strong: #0f2942;
  --ink: #dce9f3;
  --text: #dce9f3;
  --muted: #7f96ac;
  --line: #173650;
  --line-strong: #26506d;
  --nav: #06182b;
  --nav-hover: #0d2a46;
  --green: #26c98f;
  --green-soft: rgba(38, 201, 143, .13);
  --red: #e05263;
  --red-soft: rgba(224, 82, 99, .14);
  --amber: #f0a632;
  --amber-soft: rgba(240, 166, 50, .14);
  --blue: #1877d2;
  --blue-soft: rgba(24, 119, 210, .16);
  --price-up: #e05263;
  --price-up-soft: rgba(224, 82, 99, .14);
  --price-down: #26c98f;
  --price-down-soft: rgba(38, 201, 143, .13);
  --purple: #8d6ae8;
  --teal: #20c5ae;
  --canvas: #061525;
  --shadow: 0 10px 24px rgba(0, 0, 0, .22);

  /* One readable type scale for the complete terminal. */
  --font-assist: 12px;
  --font-meta: 13px;
  --font-body: 14px;
  --font-section: 15px;
  --font-panel: 16px;
  --font-page: 22px;

  --v3-canvas: #061525;
  --v3-surface: #0a1d31;
  --v3-surface-soft: #0c2136;
  --v3-surface-tint: #0d2942;
  --v3-ink: #dce9f3;
  --v3-ink-strong: #f1f7fb;
  --v3-muted: #7f96ac;
  --v3-muted-light: #9aafc0;
  --v3-line: #173650;
  --v3-line-soft: #122d46;
  --v3-line-strong: #26506d;
  --v3-sidebar: #06182b;
  --v3-sidebar-deep: #041321;
  --v3-sidebar-line: #173650;
  --v3-teal: #20c5ae;
  --v3-teal-bright: #44e1c4;
  --v3-teal-soft: rgba(32, 197, 174, .14);
  --v3-blue: #1877d2;
  --v3-blue-soft: rgba(24, 119, 210, .16);
  --v3-copper: #f0a632;
  --v3-copper-soft: rgba(240, 166, 50, .14);
  --v3-up: #e05263;
  --v3-up-soft: rgba(224, 82, 99, .14);
  --v3-down: #26c98f;
  --v3-down-soft: rgba(38, 201, 143, .13);
  --v3-danger: #f06473;
  --v3-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  --v3-shadow-soft: 0 4px 12px rgba(0, 0, 0, .16);
}

html.v2-layout-ready,
html.v2-layout-ready body {
  background: var(--canvas) !important;
  color: var(--ink) !important;
  color-scheme: dark;
}

html.v2-layout-ready body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: var(--font-body);
  line-height: 1.5;
}

html.v2-layout-ready ::selection { background: rgba(24, 119, 210, .46); color: #fff; }
html.v2-layout-ready * { border-color: var(--line); }
html.v2-layout-ready svg { color: currentColor; }

/* Shell and navigation */
html.v2-layout-ready .app-shell { grid-template-columns: 224px minmax(0, 1fr); background: var(--canvas); }
html.v2-layout-ready .sidebar {
  background: linear-gradient(180deg, #06182b 0%, #041321 100%) !important;
  border-right: 1px solid var(--line-strong) !important;
  box-shadow: 8px 0 22px rgba(0, 0, 0, .24);
}
html.v2-layout-ready .brand {
  min-height: 70px; height: 70px; flex-basis: 70px; padding-inline: 14px;
  background: #041321 !important; border-bottom: 1px solid var(--line) !important;
}
html.v2-layout-ready .brand .brand-mark { border: 1px solid #2b6b93; box-shadow: 0 0 16px rgba(24, 119, 210, .22); }
html.v2-layout-ready .brand-copy strong { color: #f1f7fb; font-size: 17px; font-weight: 650; }
html.v2-layout-ready .brand-copy span { color: #7f96ac; font-size: 11px; }
html.v2-layout-ready .primary-nav { padding: 8px 7px 10px; gap: 2px; }
html.v2-layout-ready .nav-group-label { color: #66839b; font-size: 11px; letter-spacing: .04em; }
html.v2-layout-ready .nav-button {
  min-height: 38px; margin-inline: 2px; padding-inline: 11px; gap: 10px;
  border: 1px solid transparent !important; border-left: 3px solid transparent !important;
  border-radius: 3px; color: #aac0d1; font-size: 14px; font-weight: 500;
}
html.v2-layout-ready .nav-button:hover { background: #0b2944 !important; color: #eaf5ff; border-color: #183f5c !important; }
html.v2-layout-ready .nav-button.is-active {
  background: linear-gradient(90deg, #145aa5 0%, #0e3e74 100%) !important;
  border-color: #2687e6 !important; border-left-color: #4cd6ff !important;
  color: #fff; box-shadow: 0 4px 12px rgba(9, 98, 188, .24);
}
html.v2-layout-ready .nav-button svg { width: 17px; height: 17px; color: #7fa6c0; }
html.v2-layout-ready .nav-button.is-active svg { color: #74ddff; }
html.v2-layout-ready .sidebar-footer {
  margin: auto 8px 9px; padding: 10px; border: 1px solid #1d4862 !important;
  border-top: 2px solid var(--amber) !important; border-radius: 3px; background: #0a2238 !important;
}
html.v2-layout-ready .sidebar-footer strong { color: #dce9f3; font-size: 12px; }
html.v2-layout-ready .sidebar-footer span { color: #8198aa; font-size: 11px; }

/* Command bar and environment tape */
html.v2-layout-ready .main-shell { background: var(--canvas) !important; }
html.v2-layout-ready .topbar {
  min-height: 82px; padding: 9px 14px; background: #071a2c !important;
  border-bottom: 1px solid var(--line-strong) !important; box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
html.v2-layout-ready .contract-switcher label,
html.v2-layout-ready .environment-control label,
html.v2-layout-ready .top-status-item > span { color: var(--muted) !important; font-size: 12px; font-weight: 600; }
html.v2-layout-ready .contract-switcher label small { color: #57b7ef; }
html.v2-layout-ready input,
html.v2-layout-ready select,
html.v2-layout-ready textarea,
html.v2-layout-ready .product-search-field {
  border-color: var(--line-strong) !important; border-radius: 3px; background: #0a2035 !important; color: var(--ink) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
}
html.v2-layout-ready input::placeholder,
html.v2-layout-ready textarea::placeholder { color: #58728a; }
html.v2-layout-ready input:focus,
html.v2-layout-ready select:focus,
html.v2-layout-ready textarea:focus { border-color: #2687e6 !important; box-shadow: 0 0 0 2px rgba(24, 119, 210, .22); }
html.v2-layout-ready .top-status { min-height: 40px; padding-inline: 14px; background: #0a2035 !important; border-color: var(--line) !important; }
html.v2-layout-ready .top-status-item { border-right-color: var(--line) !important; }
html.v2-layout-ready .top-status-item > strong { color: #dce9f3; font-size: 13px; font-weight: 600; }
html.v2-layout-ready .system-ribbon .top-status-item > span {
  color: #7f96ac !important;
  font-size: 12px !important;
}
html.v2-layout-ready .system-ribbon .top-status-item > strong,
html.v2-layout-ready .system-ribbon .top-status-item > strong > span,
html.v2-layout-ready .system-ribbon #marketConnection,
html.v2-layout-ready .system-ribbon #tradingDay,
html.v2-layout-ready .system-ribbon #marketClock,
html.v2-layout-ready .system-ribbon #accountAvailable,
html.v2-layout-ready .system-ribbon #accountPnl {
  color: #dce9f3 !important;
  font-size: 13px !important;
}
html.v2-layout-ready .global-latest-quote { border-left: 3px solid var(--teal) !important; background: #0d2c43 !important; }
html.v2-layout-ready .global-latest-quote b,
html.v2-layout-ready .global-latest-quote em { color: #61ddc8; }
html.v2-layout-ready .environment-banner {
  min-height: 34px; padding-inline: 14px; border-bottom-color: #1f4a61 !important;
  background: #0d2c43 !important; color: #9ec5d8 !important; font-size: 12px;
}
html.v2-layout-ready .environment-paper { background: #0c2f43 !important; color: #8fd4e6 !important; }
html.v2-layout-ready .environment-live { background: #3a1c2b !important; color: #ffb3bd !important; border-bottom-color: #8b3c4b !important; }
html.v2-layout-ready .halt-banner { background: #3d2025 !important; color: #ffbdc2 !important; border-color: #8b3c4b !important; }

/* Page hierarchy and work canvas */
html.v2-layout-ready .view { padding: 14px; background: var(--canvas) !important; }
html.v2-layout-ready .view > .page-heading {
  min-height: 68px; margin: -14px -14px 0; padding: 10px 14px; gap: 14px;
  background: #071a2c !important; border-bottom: 1px solid var(--line-strong) !important; box-shadow: none;
}
html.v2-layout-ready .page-heading::before {
  min-width: 108px; min-height: 40px; padding: 0 11px; border: 1px solid #245b82 !important;
  border-left: 3px solid var(--teal) !important; border-radius: 3px; background: #0d2c44 !important;
  color: #8edbcf !important; box-shadow: none;
}
html.v2-layout-ready .page-heading h1 { color: #f1f7fb !important; font-size: 22px; font-weight: 700; }
html.v2-layout-ready .page-heading p { color: var(--muted) !important; font-size: 13px; }
html.v2-layout-ready .view-actions,
html.v2-layout-ready .section-actions,
html.v2-layout-ready .panel-actions { gap: 8px; }
html.v2-layout-ready .view > .page-heading + * { margin-top: 12px; }

/* Primary panels, sections and data surfaces */
html.v2-layout-ready .tool-panel,
html.v2-layout-ready .detail-panel,
html.v2-layout-ready .table-section,
html.v2-layout-ready .timeline-panel,
html.v2-layout-ready .log-panel,
html.v2-layout-ready .forward-progress-panel,
html.v2-layout-ready .market-panel,
html.v2-layout-ready .overview-depth-panel,
html.v2-layout-ready .trade-plan-panel,
html.v2-layout-ready .analysis-panel,
html.v2-layout-ready .chart-panel {
  min-width: 0; border: 1px solid var(--line) !important; border-radius: 4px !important;
  background: var(--surface) !important; box-shadow: var(--v3-shadow-soft);
}
html.v2-layout-ready .panel-heading,
html.v2-layout-ready .section-heading,
html.v2-layout-ready .dialog-heading {
  min-height: 48px; padding: 9px 12px; border-bottom: 1px solid var(--line) !important;
  background: #0d243b !important;
}
html.v2-layout-ready .panel-heading h2,
html.v2-layout-ready .section-heading h2,
html.v2-layout-ready .dialog-heading h2 { color: #eaf4fb !important; font-size: 16px; font-weight: 650; }
html.v2-layout-ready .panel-heading p,
html.v2-layout-ready .section-heading p,
html.v2-layout-ready .dialog-heading p { color: var(--muted) !important; }
html.v2-layout-ready h3,
html.v2-layout-ready .overview-subheading h3,
html.v2-layout-ready .fundamental-evidence-title { color: #dce9f3 !important; }
html.v2-layout-ready .heading-with-icon > svg,
html.v2-layout-ready .overview-heading-icon,
html.v2-layout-ready .quant-system-summary-mark { color: var(--teal) !important; }
html.v2-layout-ready .metric-strip,
html.v2-layout-ready .ranking-summary-strip,
html.v2-layout-ready .health-strip,
html.v2-layout-ready .trade-account-strip,
html.v2-layout-ready .metric-card {
  border-color: var(--line) !important; border-radius: 4px !important; background: var(--surface) !important; box-shadow: var(--v3-shadow-soft);
}
html.v2-layout-ready .metric-card,
html.v2-layout-ready .metric-strip > .metric-card,
html.v2-layout-ready .ranking-summary-strip > div,
html.v2-layout-ready .health-strip > div,
html.v2-layout-ready .trade-account-strip > div { border-color: var(--line) !important; background: #0b2136 !important; box-shadow: inset 0 2px 0 rgba(24, 119, 210, .78); }
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 .health-strip span,
html.v2-layout-ready .trade-account-strip span { color: var(--muted) !important; }
html.v2-layout-ready .metric-card > strong,
html.v2-layout-ready .ranking-summary-strip strong,
html.v2-layout-ready .health-strip strong,
html.v2-layout-ready .trade-account-strip strong { color: #e8f4fb !important; }

/* Contract tape: the strongest recurring identity element. */
html.v2-layout-ready #overview .overview-market-banner {
  min-height: 88px; overflow: hidden; border: 1px solid #235d78 !important; border-top: 3px solid #35d6be !important;
  border-radius: 4px; background: linear-gradient(110deg, #0e3450 0%, #0a263d 52%, #0b2035 100%) !important; color: #effaff; box-shadow: var(--v3-shadow);
}
html.v2-layout-ready #overview .overview-instrument-heading { min-height: 88px; padding: 12px 14px; border-right-color: #23516b !important; background: rgba(10, 36, 58, .42) !important; }
html.v2-layout-ready #overview .overview-instrument-heading h2 { color: #f1f7fb !important; font-size: 19px; }
html.v2-layout-ready #overview .overview-instrument-heading p { color: #9fc2d5 !important; }
html.v2-layout-ready #overview .overview-heading-icon { background: #124560 !important; color: #71e4ce !important; box-shadow: none; }
html.v2-layout-ready #overview .overview-quote-grid { background: #081e32 !important; }
html.v2-layout-ready #overview .overview-quote-grid > span { min-height: 88px; padding: 9px 10px; border-color: #1b4762 !important; color: #87a2b6 !important; }
html.v2-layout-ready #overview .overview-quote-grid strong { color: #dce9f3 !important; font-size: 14px; }
html.v2-layout-ready #overview .overview-primary-quote { background: #0d2d47 !important; box-shadow: inset 0 -2px 0 #1b80d0; }
html.v2-layout-ready #overview .overview-primary-quote strong { color: #f4fbff !important; font-size: 26px; }
html.v2-layout-ready #overview .dashboard-grid { gap: 14px; }
html.v2-layout-ready #overview .market-panel { border-top: 2px solid var(--blue) !important; }
html.v2-layout-ready #overview .overview-depth-panel { border-top: 2px solid var(--teal) !important; }
html.v2-layout-ready #overview .trade-plan-panel { border-top: 2px solid var(--amber) !important; }

/* Tables read like terminal data, with disciplined zebra and hover states. */
html.v2-layout-ready table { width: 100%; border-color: var(--line) !important; font-variant-numeric: tabular-nums lining-nums; }
html.v2-layout-ready table thead { background: #0d2942 !important; }
html.v2-layout-ready table thead th {
  height: 32px; padding: 7px 9px; border-color: var(--line) !important; background: #0d2942 !important;
  color: #8ca9bd !important; font-size: 12px !important; font-weight: 650; line-height: 1.3 !important;
}
html.v2-layout-ready table tbody td { min-height: 35px; padding: 8px 9px; border-color: #14324c !important; color: #c6d7e3 !important; font-size: 13px !important; line-height: 1.4 !important; }
html.v2-layout-ready table tbody tr:nth-child(even) td { background: rgba(15, 42, 66, .5) !important; }
html.v2-layout-ready table tbody tr:hover td { background: rgba(24, 119, 210, .17) !important; }
html.v2-layout-ready .table-scroll,
html.v2-layout-ready .log-stream,
html.v2-layout-ready .event-list,
html.v2-layout-ready .queue-list { scrollbar-color: #2b6586 #091b2d; scrollbar-width: thin; }
html.v2-layout-ready .empty-state,
html.v2-layout-ready .empty-table-state { color: #66839a !important; }

/* Status and market direction semantics */
html.v2-layout-ready .status-badge,
html.v2-layout-ready .direction-chip,
html.v2-layout-ready .qualification-state {
  min-height: 26px; padding: 4px 8px; border-radius: 3px !important; font-size: 12px !important; font-weight: 600; line-height: 1.3 !important;
}
html.v2-layout-ready .status-badge.status-good:not(.qualification-state) { border-color: rgba(38, 201, 143, .46) !important; background: var(--green-soft) !important; color: #5ee0b4 !important; }
html.v2-layout-ready .status-badge.status-warn:not(.qualification-state) { border-color: rgba(240, 166, 50, .5) !important; background: var(--amber-soft) !important; color: #ffc76a !important; }
html.v2-layout-ready .status-badge.status-blocked:not(.qualification-state) { border-color: rgba(224, 82, 99, .54) !important; background: var(--red-soft) !important; color: #ff9aa6 !important; }
html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state) { border-color: rgba(24, 119, 210, .58) !important; background: var(--blue-soft) !important; color: #78bcf1 !important; }
html.v2-layout-ready .qualification-state {
  border: 1px solid #315a74 !important;
  background: #0d2942 !important;
  color: #dce9f3 !important;
}
html.v2-layout-ready .status-badge.status-good.qualification-state { border-color: rgba(38, 201, 143, .46) !important; background: var(--green-soft) !important; color: #5ee0b4 !important; }
html.v2-layout-ready .status-badge.status-warn.qualification-state { border-color: rgba(240, 166, 50, .5) !important; background: var(--amber-soft) !important; color: #ffc76a !important; }
html.v2-layout-ready .status-badge.status-blocked.qualification-state { border-color: rgba(224, 82, 99, .54) !important; background: var(--red-soft) !important; color: #ff9aa6 !important; }
html.v2-layout-ready .status-badge.status-neutral.qualification-state { border-color: rgba(24, 119, 210, .58) !important; background: var(--blue-soft) !important; color: #78bcf1 !important; }
html.v2-layout-ready .value-positive,
html.v2-layout-ready .price-up,
html.v2-layout-ready [data-direction="long"] { color: var(--price-up) !important; }
html.v2-layout-ready .value-negative,
html.v2-layout-ready .price-down,
html.v2-layout-ready [data-direction="short"] { color: var(--price-down) !important; }
html.v2-layout-ready .status-value-good { color: #58dab0 !important; }
html.v2-layout-ready .status-value-bad { color: #f07d8b !important; }
html.v2-layout-ready .status-value-warn { color: #ffc467 !important; }
html.v2-layout-ready .status-dot.status-good { background: var(--green) !important; box-shadow: 0 0 8px rgba(38, 201, 143, .55); }
html.v2-layout-ready .status-dot.status-bad { background: var(--red) !important; box-shadow: 0 0 8px rgba(224, 82, 99, .48); }
html.v2-layout-ready .status-dot.status-warn { background: var(--amber) !important; box-shadow: 0 0 8px rgba(240, 166, 50, .42); }

/* Controls and focus */
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 .icon-button,
html.v2-layout-ready .user-button {
  min-height: 36px; border-radius: 3px; box-shadow: none;
}
html.v2-layout-ready .primary-button { border-color: #2687e6 !important; background: #1674cc !important; color: #fff !important; }
html.v2-layout-ready .primary-button:hover { background: #2185e4 !important; }
html.v2-layout-ready .secondary-button,
html.v2-layout-ready .icon-button,
html.v2-layout-ready .user-button { border-color: var(--line-strong) !important; background: #0a2035 !important; color: #c9d9e5 !important; }
html.v2-layout-ready .secondary-button:hover,
html.v2-layout-ready .icon-button:hover,
html.v2-layout-ready .user-button:hover { background: #0e2b45 !important; border-color: #2d6484 !important; }
html.v2-layout-ready .danger-button { border-color: #9b3f4c !important; background: #7f2d3b !important; color: #fff !important; }
html.v2-layout-ready .danger-outline-button { border-color: #a34652 !important; background: rgba(102, 28, 40, .35) !important; color: #ff9aa6 !important; }
html.v2-layout-ready .danger-outline-button:hover { background: rgba(160, 43, 59, .4) !important; }
html.v2-layout-ready .text-button { color: #61baf2 !important; }
html.v2-layout-ready .text-button:hover { background: rgba(24, 119, 210, .16) !important; }
html.v2-layout-ready .segmented-control { min-height: 36px; border-color: var(--line-strong) !important; border-radius: 3px; background: #081b2e !important; }
html.v2-layout-ready .segmented-control button { min-height: 34px; padding-inline: 12px; color: #8ca5b8 !important; }
html.v2-layout-ready .segmented-control button.is-selected { background: #176ec2 !important; color: #fff !important; }
html.v2-layout-ready :focus-visible { outline: 2px solid #42d9ff !important; outline-offset: 2px; }

/* Internal evidence, chart and operational blocks */
html.v2-layout-ready .detail-note,
html.v2-layout-ready .source-list > div,
html.v2-layout-ready .gate-list > div,
html.v2-layout-ready .strategy-card,
html.v2-layout-ready .switch-row,
html.v2-layout-ready .security-summary,
html.v2-layout-ready .update-row,
html.v2-layout-ready .intraday-signal-strip > div,
html.v2-layout-ready .fundamental-summary,
html.v2-layout-ready .overview-timeframe-card,
html.v2-layout-ready .overview-event-list > *,
html.v2-layout-ready .plan-blocker,
html.v2-layout-ready .order-book,
html.v2-layout-ready .book-metrics > div,
html.v2-layout-ready .trade-plan-grid > div,
html.v2-layout-ready .trade-plan-block,
html.v2-layout-ready .risk-callout,
html.v2-layout-ready .auth-notice,
html.v2-layout-ready .broker-session-status,
html.v2-layout-ready .reconcile-progress {
  border-color: var(--line) !important; border-radius: 3px !important; background: #0b2238 !important; color: var(--ink) !important; box-shadow: none;
}
html.v2-layout-ready .overview-timeframe-card:hover,
html.v2-layout-ready .overview-event-list > *:hover { background: #0f2b46 !important; }
html.v2-layout-ready .overview-timeframe-card strong,
html.v2-layout-ready .trade-plan-grid strong,
html.v2-layout-ready .book-metrics strong { color: #e3f0f7 !important; }
html.v2-layout-ready .overview-timeframe-card span,
html.v2-layout-ready .overview-event-list small,
html.v2-layout-ready .book-metrics span,
html.v2-layout-ready .trade-plan-grid dt { color: var(--muted) !important; }
html.v2-layout-ready .overview-chart,
html.v2-layout-ready .market-chart,
html.v2-layout-ready .chart-wrap,
html.v2-layout-ready canvas { background: #081b2d !important; }
html.v2-layout-ready .overview-subchart,
html.v2-layout-ready .market-subchart,
html.v2-layout-ready .fundamental-evidence,
html.v2-layout-ready .overview-evidence-wall,
html.v2-layout-ready .overview-opportunity-panel { border-color: var(--line) !important; }
html.v2-layout-ready .overview-subchart-stats > span,
html.v2-layout-ready .market-quote-strip > span,
html.v2-layout-ready .level-row span,
html.v2-layout-ready .fundamental-score-grid > div,
html.v2-layout-ready .fundamental-metrics > div { background: #0b2238 !important; color: var(--muted) !important; border-color: var(--line) !important; }
html.v2-layout-ready .overview-subchart-stats strong,
html.v2-layout-ready .market-quote-strip strong,
html.v2-layout-ready .level-row strong,
html.v2-layout-ready .fundamental-metrics dd { color: #dce9f3 !important; }
html.v2-layout-ready .quant-system-summary { border-color: #215572 !important; background: linear-gradient(90deg, #0c2d45, #0a2035) !important; color: #dce9f3 !important; }
html.v2-layout-ready .quant-system-summary-copy span:last-child { color: #9bb6c8 !important; }
html.v2-layout-ready .order-book .book-row,
html.v2-layout-ready .order-book .book-row.is-unavailable,
html.v2-layout-ready .order-book .last-price {
  border-color: var(--line) !important;
  background: #0a2035 !important;
  color: #9bb3c5 !important;
}
html.v2-layout-ready .order-book .book-row:nth-child(even) { background: #0b243a !important; }
html.v2-layout-ready .order-book .book-row:hover { background: #0e2d47 !important; }
html.v2-layout-ready .order-book .book-row.ask:not(.is-unavailable) { box-shadow: inset 3px 0 0 rgba(224, 82, 99, .78); }
html.v2-layout-ready .order-book .book-row.bid:not(.is-unavailable) { box-shadow: inset 3px 0 0 rgba(38, 201, 143, .78); }
html.v2-layout-ready .order-book .last-price { background: #0d2942 !important; }
html.v2-layout-ready .heading-with-icon > svg,
html.v2-layout-ready .panel-heading > svg,
html.v2-layout-ready .section-heading > svg {
  background: #0e3149 !important;
  color: var(--teal) !important;
}

/* High-specificity legacy surfaces that otherwise remain light. */
html.v2-layout-ready .analysis-inputs,
html.v2-layout-ready .direction-summary,
html.v2-layout-ready .direction-main,
html.v2-layout-ready .trade-environment-workbench,
html.v2-layout-ready .v2-generated-chart,
html.v2-layout-ready .plan-list,
html.v2-layout-ready .settings-nav,
html.v2-layout-ready .quant-platform-tape,
html.v2-layout-ready .quant-system-heading,
html.v2-layout-ready .quant-pipeline-grid {
  border-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}
html.v2-layout-ready .analysis-inputs label,
html.v2-layout-ready .direction-summary span,
html.v2-layout-ready .direction-main span,
html.v2-layout-ready .trade-environment-workbench span,
html.v2-layout-ready .v2-generated-chart span,
html.v2-layout-ready .plan-list dt { color: var(--muted) !important; }
html.v2-layout-ready .direction-summary strong,
html.v2-layout-ready .direction-main strong,
html.v2-layout-ready .trade-environment-workbench strong,
html.v2-layout-ready .v2-generated-chart strong,
html.v2-layout-ready .plan-list dd { color: #e7f3fa !important; }
html.v2-layout-ready .decision-final-outcome,
html.v2-layout-ready .decision-final-outcome.is-waiting {
  border-color: rgba(240, 166, 50, .52) !important;
  background: linear-gradient(135deg, rgba(240, 166, 50, .14), rgba(10, 29, 49, .94)) !important;
  color: #e9f1f6 !important;
}
html.v2-layout-ready .decision-final-outcome h2,
html.v2-layout-ready .decision-final-outcome strong { color: #ffc05a !important; }
html.v2-layout-ready .decision-final-outcome p,
html.v2-layout-ready .decision-final-outcome span,
html.v2-layout-ready .decision-final-outcome small { color: #a9bdca !important; }
html.v2-layout-ready .v2-generated-chart { border: 1px solid var(--line) !important; border-radius: 3px; }
html.v2-layout-ready .v2-generated-chart canvas,
html.v2-layout-ready .v2-generated-chart svg { background: #081b2d !important; }
html.v2-layout-ready .settings-nav button {
  border-color: var(--line) !important;
  background: #0a1d31 !important;
  color: #8da7ba !important;
}
html.v2-layout-ready .settings-nav button:hover { background: #0e2b45 !important; color: #dce9f3 !important; }
html.v2-layout-ready .settings-nav button.is-active { background: #0d3854 !important; color: #70dbc8 !important; box-shadow: inset 3px 0 0 var(--teal); }
html.v2-layout-ready .quant-pipeline-node,
html.v2-layout-ready .quant-pipeline-node.is-ready,
html.v2-layout-ready .quant-pipeline-node.is-pending,
html.v2-layout-ready .quant-pipeline-node.is-blocked {
  border-color: var(--line) !important;
  background: #0b2238 !important;
  color: #dce9f3 !important;
}
html.v2-layout-ready .quant-pipeline-node:hover { background: #0e2d47 !important; }
html.v2-layout-ready .reconciliation-step-index {
  border-color: #315d76 !important;
  background: #0d2942 !important;
  color: #dce9f3 !important;
}

/* Full-page legacy modules found during the view-by-view audit. */
html.v2-layout-ready .overview-timeframe-matrix,
html.v2-layout-ready .fundamental-driver-column,
html.v2-layout-ready .fundamental-core-column,
html.v2-layout-ready .overview-event-column,
html.v2-layout-ready .decision-report-catalog,
html.v2-layout-ready .trend-report-detail-grid > section,
html.v2-layout-ready .trend-chain-list,
html.v2-layout-ready .trend-capability-list,
html.v2-layout-ready .trend-limit-list,
html.v2-layout-ready .decision-report-card,
html.v2-layout-ready .analysis-data-limited,
html.v2-layout-ready .arbitrage-auto-workbench,
html.v2-layout-ready .arbitrage-capability-section,
html.v2-layout-ready .arbitrage-auto-gate,
html.v2-layout-ready .operator-control-strip,
html.v2-layout-ready .arbitrage-capability-boundaries,
html.v2-layout-ready .arbitrage-auto-gate-status,
html.v2-layout-ready .qualification-legend,
html.v2-layout-ready .data-activity-summary,
html.v2-layout-ready .billing-account-band {
  border-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}
html.v2-layout-ready .overview-timeframe-matrix,
html.v2-layout-ready .fundamental-driver-column,
html.v2-layout-ready .fundamental-core-column,
html.v2-layout-ready .overview-event-column { border-radius: 3px; }
html.v2-layout-ready .decision-report-catalog-grid,
html.v2-layout-ready .decision-analysis-data-grid,
html.v2-layout-ready .market-latency-strip {
  border-color: var(--line) !important;
  background: var(--line) !important;
}
html.v2-layout-ready .decision-report-catalog-grid > *,
html.v2-layout-ready .decision-analysis-data-grid > *,
html.v2-layout-ready .market-latency-item {
  border-color: var(--line) !important;
  background: #0b2238 !important;
  color: var(--ink) !important;
}
html.v2-layout-ready .trend-report-block > h3,
html.v2-layout-ready .trend-report-detail-grid > section > h3,
html.v2-layout-ready .decision-report-catalog h3,
html.v2-layout-ready .decision-analysis-data-grid h3,
html.v2-layout-ready .arbitrage-auto-heading,
html.v2-layout-ready .data-activity-table-heading {
  border-color: var(--line) !important;
  background: #0d2942 !important;
  color: #e7f3fa !important;
}
html.v2-layout-ready .no-trade-grid,
html.v2-layout-ready .no-trade-grid > * {
  border-color: rgba(224, 82, 99, .35) !important;
  background: rgba(224, 82, 99, .1) !important;
  color: #f2a2ac !important;
}
html.v2-layout-ready .selectable-row.is-selected,
html.v2-layout-ready tr.is-recent { background: rgba(32, 197, 174, .1) !important; }
html.v2-layout-ready .selectable-row.is-selected td,
html.v2-layout-ready tr.is-recent td { background: rgba(32, 197, 174, .08) !important; }
html.v2-layout-ready .quant-system-summary-mark { background: #0e3b52 !important; color: #61dcc6 !important; }
html.v2-layout-ready .arbitrage-auto-heading { border-bottom: 1px solid var(--line) !important; }
html.v2-layout-ready .arbitrage-capability-section > summary,
html.v2-layout-ready #models details > summary,
html.v2-layout-ready .view#models details > summary {
  border-color: var(--line) !important;
  background: #0d2942 !important;
  color: #dce9f3 !important;
}
html.v2-layout-ready .qualification-legend { color: var(--muted) !important; }
html.v2-layout-ready .v2-stacked-bar { background: #102f48 !important; }
html.v2-layout-ready .data-activity-table-heading { color: #8faabd !important; }
html.v2-layout-ready .data-activity-summary strong,
html.v2-layout-ready .market-latency-item strong,
html.v2-layout-ready .billing-account-band strong { color: #e7f3fa !important; }
html.v2-layout-ready .data-activity-summary span,
html.v2-layout-ready .market-latency-item span,
html.v2-layout-ready .billing-account-band span { color: var(--muted) !important; }
html.v2-layout-ready .report-authority-badge {
  border-color: rgba(32, 197, 174, .46) !important;
  background: rgba(32, 197, 174, .12) !important;
  color: #65dbc6 !important;
}
html.v2-layout-ready #governance .gate-list > div,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
}

/* Preserve the prototype's geometry and accessibility contracts. */
html.v2-layout-ready .status-badge.status-good:not(.qualification-state) {
  border-color: #28795f !important;
  background: #0b3028 !important;
  color: #8bf1ca !important;
}
html.v2-layout-ready .status-badge.status-warn:not(.qualification-state) {
  border-color: #826321 !important;
  background: #34280f !important;
  color: #ffd27e !important;
}
html.v2-layout-ready .status-badge.status-blocked:not(.qualification-state) {
  border-color: #8b3d4a !important;
  background: #351923 !important;
  color: #ffabb4 !important;
}
html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state) {
  border-color: #2e6694 !important;
  background: #102a45 !important;
  color: #9bd4ff !important;
}
html.v2-layout-ready .status-badge { border-radius: 0 !important; }
html.v2-layout-ready .qualification-state,
html.v2-layout-ready .status-badge.qualification-state,
html.v2-layout-ready .status-badge.status-good.qualification-state,
html.v2-layout-ready .status-badge.status-warn.qualification-state,
html.v2-layout-ready .status-badge.status-blocked.qualification-state,
html.v2-layout-ready .status-badge.status-neutral.qualification-state {
  border-width: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html.v2-layout-ready .status-badge.status-good.qualification-state { color: #5ee0b4 !important; }
html.v2-layout-ready .status-badge.status-warn.qualification-state { color: #ffc76a !important; }
html.v2-layout-ready .status-badge.status-blocked.qualification-state { color: #ff9aa6 !important; }
html.v2-layout-ready .status-badge.status-neutral.qualification-state { color: #78bcf1 !important; }
html.v2-layout-ready #overview .overview-market-banner {
  background-color: rgb(23, 67, 74) !important;
  background-image: linear-gradient(110deg, rgba(7, 39, 55, .12), rgba(5, 28, 45, .72)) !important;
}
html.v2-layout-ready #overview #marketQuoteState.status-badge {
  border-left-color: #9fc2d5 !important;
}
html.v2-layout-ready #overview .overview-instrument-heading #marketQuoteState.status-badge.status-neutral:not(.qualification-state) {
  border-left-color: #9fc2d5 !important;
  background: #102f45 !important;
  color: #b7d8e9 !important;
}
html.v2-layout-ready #operations > .v2-detail-grid > .recovery-control-panel {
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}
html.v2-layout-ready #ranking.view {
  margin-bottom: 0 !important;
  padding-bottom: 10px;
  height: 100% !important;
  min-height: 100% !important;
}

@media (min-width: 1181px) and (max-width: 1600px) {
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr);
    grid-template-rows: 48px 76px minmax(0, 1fr);
    align-content: stretch;
    gap: 6px 8px;
    padding: 8px !important;
  }
  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; height: 48px; margin: 0; padding: 4px 8px;
  }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card > .panel-heading h2 { line-height: 1.1; }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card > .panel-heading p { font-size: 12px; line-height: 1.1; }
  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: 84px; padding: 6px;
  }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-overview > svg { width: 20px; height: 20px; }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-overview > strong { font-size: 14px; }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-overview > span { font-size: 12px; }
  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: 84px; 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: 2px 5px; }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-facts dt,
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-facts dd { line-height: 1.15; }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-facts dt { font-size: 12px; }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-facts dd { font-size: 12px; }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card > .detail-note {
    grid-column: 1 / -1; grid-row: 3; min-height: 0; height: 100%; margin: 0; padding: 7px 8px; align-self: stretch; font-size: 12px; line-height: 1.45;
  }
  html.v2-layout-ready #positions:has(#positionsBody > tr:only-child .empty-state) .position-empty-card > .detail-note svg { width: 16px; height: 16px; }
}

@media (min-width: 721px) {
  html.v2-layout-ready .main-shell > main { height: calc(100vh - 126px) !important; }
}

@media (min-width: 1000px) {
  html.v2-layout-ready #validation .cost-layout > * {
    height: 400px !important;
    max-height: 400px !important;
  }
}

/* Dialogs, overlays and notifications */
html.v2-layout-ready dialog { border: 1px solid var(--line-strong) !important; border-radius: 4px; background: #0a1d31 !important; color: var(--ink) !important; box-shadow: 0 18px 48px rgba(0, 0, 0, .48); }
html.v2-layout-ready dialog::backdrop { background: rgba(2, 11, 21, .72); }
html.v2-layout-ready dialog label { color: var(--muted) !important; }
html.v2-layout-ready .dialog-footer { border-top-color: var(--line) !important; }
html.v2-layout-ready .toast { border-color: var(--line-strong) !important; background: #0d2942 !important; color: #e7f3fa !important; box-shadow: 0 12px 28px rgba(0, 0, 0, .34); }

/* Make scrolling deliberate and keep text readable at every desktop width. */
html.v2-layout-ready .table-scroll { scrollbar-color: #2c6688 #071a2b; }
html.v2-layout-ready code,
html.v2-layout-ready time,
html.v2-layout-ready .metric-card > strong,
html.v2-layout-ready .last-price strong,
html.v2-layout-ready .book-row strong,
html.v2-layout-ready .global-latest-quote strong { font-family: "Cascadia Mono", "SFMono-Regular", Consolas, "Microsoft YaHei", monospace; font-variant-numeric: tabular-nums lining-nums; }

@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-group-label,
  html.v2-layout-ready .nav-button span,
  html.v2-layout-ready .sidebar-footer > div { display: none !important; }
  html.v2-layout-ready .nav-button { justify-content: center; padding: 0; }
  html.v2-layout-ready .sidebar-footer { min-height: 42px; display: grid; place-items: center; padding: 0; }
  html.v2-layout-ready .sidebar-footer .status-dot { margin: 0; }
}

@media (max-width: 720px) {
  html.v2-layout-ready .view { padding: 10px; }
  html.v2-layout-ready .view > .page-heading { min-height: auto; margin: -10px -10px 0; padding: 10px; }
  html.v2-layout-ready .page-heading::before { display: none; }
  html.v2-layout-ready .page-heading h1 { font-size: 20px; }
  html.v2-layout-ready .panel-heading,
  html.v2-layout-ready .section-heading { padding-inline: 10px; }
  html.v2-layout-ready #overview .overview-market-banner,
  html.v2-layout-ready .tool-panel,
  html.v2-layout-ready .detail-panel,
  html.v2-layout-ready .table-section { border-radius: 3px !important; }
  html.v2-layout-ready .segmented-control button { padding-inline: 10px; }
  html.v2-layout-ready #arbitrage .arbitrage-page-heading::before { display: flex !important; }
  html.v2-layout-ready #arbitrage .arbitrage-page-heading > .view-actions {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    margin-inline: 0 !important;
    align-self: flex-start !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
}

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

html.v2-layout-ready .status-badge:not(.qualification-state) {
  border-radius: 0 !important;
}

/* V8 readability and interaction closure. */
html.v2-layout-ready .brand-copy span,
html.v2-layout-ready .nav-group-label,
html.v2-layout-ready .sidebar-footer span,
html.v2-layout-ready .sidebar-footer strong,
html.v2-layout-ready .topbar label,
html.v2-layout-ready .control-label,
html.v2-layout-ready .environment-banner,
html.v2-layout-ready .view small,
html.v2-layout-ready .view dt,
html.v2-layout-ready .view .timestamp,
html.v2-layout-ready .view .eyebrow,
html.v2-layout-ready .view .event-timestamps,
html.v2-layout-ready .view .event-keywords,
html.v2-layout-ready .view .fundamental-source,
html.v2-layout-ready .view .market-panel-controls label,
html.v2-layout-ready .view .market-timeframe-row > span,
html.v2-layout-ready .view .market-subchart span,
html.v2-layout-ready .view .data-latency-panel .market-latency-item > span,
html.v2-layout-ready .view .data-latency-panel .market-latency-item > small,
html.v2-layout-ready #models .model-registry-identity > small,
html.v2-layout-ready #models .model-registry-timeframe > small,
html.v2-layout-ready #models .model-registry-boundary > small,
html.v2-layout-ready #arbitrage .arbitrage-z-labels {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready .nav-group-label {
  letter-spacing: 0;
}

html.v2-layout-ready input,
html.v2-layout-ready select,
html.v2-layout-ready textarea {
  min-height: 38px;
  font-size: 14px !important;
  caret-color: #71e4ce;
}

html.v2-layout-ready select option,
html.v2-layout-ready select optgroup,
html.v2-layout-ready datalist,
html.v2-layout-ready datalist option {
  background-color: #0a2035 !important;
  color: #dce9f3 !important;
  font-size: 14px !important;
  color-scheme: dark;
}

html.v2-layout-ready select option:checked,
html.v2-layout-ready select option:hover,
html.v2-layout-ready select option:focus {
  background-color: #176ec2 !important;
  color: #ffffff !important;
}

html.v2-layout-ready input:hover,
html.v2-layout-ready select:hover,
html.v2-layout-ready textarea:hover {
  border-color: #376e91 !important;
  background-color: #0d2942 !important;
  color: #f1f7fb !important;
}

html.v2-layout-ready input:disabled,
html.v2-layout-ready select:disabled,
html.v2-layout-ready textarea:disabled,
html.v2-layout-ready input[readonly],
html.v2-layout-ready textarea[readonly] {
  border-color: #1d405b !important;
  background-color: #081a2c !important;
  color: #7690a4 !important;
  opacity: 1;
}

html.v2-layout-ready input:-webkit-autofill,
html.v2-layout-ready input:-webkit-autofill:hover,
html.v2-layout-ready input:-webkit-autofill:focus {
  -webkit-text-fill-color: #dce9f3;
  caret-color: #71e4ce;
  box-shadow: 0 0 0 1000px #0a2035 inset !important;
}

html.v2-layout-ready .segmented-control button:hover:not(.is-selected),
html.v2-layout-ready .quick-price-row button:hover,
html.v2-layout-ready details > summary:hover,
html.v2-layout-ready .settings-nav button:hover,
html.v2-layout-ready .quant-pipeline-node:hover {
  border-color: #376e91 !important;
  background: #0e2b45 !important;
  color: #eaf4fb !important;
}

html.v2-layout-ready table tbody tr:hover,
html.v2-layout-ready .selectable-row:hover {
  background: #0e2b45 !important;
  color: #eaf4fb !important;
}

html.v2-layout-ready table tbody tr:hover td,
html.v2-layout-ready .selectable-row:hover td {
  background: rgba(24, 119, 210, .17) !important;
  color: #eaf4fb !important;
}

html.v2-layout-ready .empty-state,
html.v2-layout-ready .empty-table-state {
  color: #7f96ac !important;
}

html.v2-layout-ready .primary-button:hover,
html.v2-layout-ready .secondary-button:hover,
html.v2-layout-ready .danger-button:hover,
html.v2-layout-ready .danger-outline-button:hover,
html.v2-layout-ready .text-button:hover,
html.v2-layout-ready .icon-button:hover,
html.v2-layout-ready .user-button:hover,
html.v2-layout-ready .nav-button:hover {
  color: #f4fbff !important;
}

/* Contract Intelligence: outcome, execution, analysis, then evidence. */
html.v2-layout-ready #decision .decision-final-layer > .panel-heading,
html.v2-layout-ready #decision .decision-execution-layer > .panel-heading,
html.v2-layout-ready #decision .decision-analysis-layer > .panel-heading {
  border-color: var(--line) !important;
  background: #0d243b !important;
}

html.v2-layout-ready #decision .decision-final-layer > .panel-heading h2,
html.v2-layout-ready #decision .decision-execution-layer > .panel-heading h2,
html.v2-layout-ready #decision .decision-analysis-layer > .panel-heading h2,
html.v2-layout-ready #decision .decision-layer-heading h2 {
  color: #eef7fc !important;
}

html.v2-layout-ready #decision .decision-final-layer > .direction-summary,
html.v2-layout-ready #decision .decision-analysis-layer .rationale-column,
html.v2-layout-ready #decision .decision-analysis-layer .trend-scenario-grid > article {
  border-color: var(--line) !important;
  background: #0b2238 !important;
  color: var(--ink) !important;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection {
  border-color: var(--line) !important;
  background: var(--surface) !important;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading,
html.v2-layout-ready #decision .decision-execution-layer .execution-trigger-section > .execution-subsection-heading,
html.v2-layout-ready #decision .decision-execution-layer .execution-strategy-section > .execution-subsection-heading,
html.v2-layout-ready #decision .decision-execution-layer .execution-risk-section > .execution-subsection-heading,
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 {
  min-height: 52px;
  border-color: var(--line) !important;
  background: #0d2942 !important;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading > span {
  color: #67dcca !important;
  font-size: 13px !important;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading h3 {
  color: #eef7fc !important;
  font-size: 15px !important;
}

html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading p {
  color: var(--muted) !important;
  font-size: 13px !important;
  line-height: 1.45;
}

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 .scenario-levels,
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,
html.v2-layout-ready #decision .decision-execution-layer .exit-rule-list {
  border-color: var(--line) !important;
  background: var(--line) !important;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step,
html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip > div,
html.v2-layout-ready #decision .decision-execution-layer .trigger-side,
html.v2-layout-ready #decision .decision-execution-layer .scenario-levels > div,
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,
html.v2-layout-ready #decision .decision-execution-layer .exit-rule-list > span {
  border-color: var(--line) !important;
  background: #0b2238 !important;
  color: var(--ink) !important;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > span,
html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip span,
html.v2-layout-ready #decision .decision-execution-layer .trigger-side > span,
html.v2-layout-ready #decision .decision-execution-layer .trigger-side > small,
html.v2-layout-ready #decision .decision-execution-layer .scenario-levels dt,
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: #8fa8bb !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > small,
html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip small {
  color: #7f96ac !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > strong,
html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip strong,
html.v2-layout-ready #decision .decision-execution-layer .scenario-levels dd,
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,
html.v2-layout-ready #decision .decision-execution-layer .exit-rule-list > span {
  color: #dce9f3 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

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 {
  color: #ef7380 !important;
}

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 {
  color: #49d7a2 !important;
}

html.v2-layout-ready #decision .decision-execution-layer .trigger-side > small {
  color: #8fa8bb !important;
}

html.v2-layout-ready #decision .decision-analysis-layer .rationale-column > ul > li,
html.v2-layout-ready #decision .decision-analysis-data-grid > div,
html.v2-layout-ready #decision .decision-report-card,
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 .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 {
  border-color: var(--line) !important;
  background: #0b2238 !important;
  color: #cbdce7 !important;
}

html.v2-layout-ready #decision .decision-analysis-data-grid,
html.v2-layout-ready #decision .decision-report-catalog-grid {
  background: var(--line) !important;
}

html.v2-layout-ready #decision .decision-report-catalog {
  border-color: var(--line) !important;
  background: var(--surface) !important;
}

html.v2-layout-ready #decision .decision-report-catalog-heading h3,
html.v2-layout-ready #decision .decision-report-card strong,
html.v2-layout-ready #decision .decision-analysis-data-grid strong {
  color: #e7f3fa !important;
}

html.v2-layout-ready #decision .decision-report-catalog-heading p,
html.v2-layout-ready #decision .decision-report-card-label,
html.v2-layout-ready #decision .decision-report-card p,
html.v2-layout-ready #decision .decision-report-card small,
html.v2-layout-ready #decision .decision-analysis-data-grid span,
html.v2-layout-ready #decision .decision-analysis-data-grid small {
  color: #8fa8bb !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

html.v2-layout-ready #decision .decision-evidence-layer .trend-report-detail-grid > section > h3 {
  border-color: var(--line) !important;
  background: #0d2942 !important;
  color: #e7f3fa !important;
  font-size: 15px !important;
}

html.v2-layout-ready #decision .decision-final-outcome > small,
html.v2-layout-ready #decision .decision-final-judgment > span,
html.v2-layout-ready #decision .decision-final-judgment > small,
html.v2-layout-ready #decision .decision-report-authority > small,
html.v2-layout-ready #decision .report-authority-badge {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #decision .direction-main span,
html.v2-layout-ready #decision .direction-summary span {
  font-size: 12px !important;
}

html.v2-layout-ready #decision .decision-final-outcome > strong {
  line-height: 1.18 !important;
  overflow-wrap: anywhere;
}

/* Repeated data summaries use the same 12px metadata floor on every page. */
html.v2-layout-ready #overview .book-row em,
html.v2-layout-ready #overview #quantOverviewRuntimeDetail,
html.v2-layout-ready #arbitrage .arbitrage-runtime-checks span,
html.v2-layout-ready .v2-chart-heading span,
html.v2-layout-ready .v2-chart-row > span,
html.v2-layout-ready .v2-chart-row > strong,
html.v2-layout-ready .v2-chart-legend span,
html.v2-layout-ready .v2-chart-legend b,
html.v2-layout-ready .v2-gauge-row > span,
html.v2-layout-ready .v2-gauge-row > strong,
html.v2-layout-ready #positions .position-empty-overview > span,
html.v2-layout-ready #positions .position-empty-card > .detail-note,
html.v2-layout-ready #operations #reconciliationFlowSummary,
html.v2-layout-ready #operations .reconciliation-step-index,
html.v2-layout-ready #operations .quant-system-kicker,
html.v2-layout-ready #operations #quantSystemUpdatedAt,
html.v2-layout-ready #operations .quant-step-index,
html.v2-layout-ready #operations .quant-step-copy > span,
html.v2-layout-ready #operations .quant-platform-tape > span {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #overview .overview-quote-grid {
  grid-template-columns:
    minmax(118px, 1.18fr)
    repeat(5, minmax(72px, .82fr))
    minmax(116px, 1.15fr)
    minmax(88px, .9fr)
    minmax(98px, .95fr)
    minmax(112px, 1.1fr);
}

html.v2-layout-ready #overview .overview-quote-grid > span {
  min-width: 0;
  padding-inline: 8px;
}

html.v2-layout-ready #overview #marketHighLow,
html.v2-layout-ready #overview #marketLimitRange {
  font-size: 13px !important;
  white-space: nowrap;
}

html.v2-layout-ready #overview .market-timeframe-row {
  height: auto !important;
  min-height: 48px !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #overview .overview-market-subchart {
  height: 424px !important;
  min-height: 424px !important;
  max-height: 424px !important;
}

html.v2-layout-ready #overview .market-panel,
html.v2-layout-ready #overview .overview-market-subcharts,
html.v2-layout-ready #overview .overview-book-stats,
html.v2-layout-ready #overview .trade-plan-panel .plan-list {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #overview .overview-market-subcharts {
  min-height: 424px !important;
  align-items: stretch;
}

html.v2-layout-ready #overview .overview-book-stats {
  min-height: 218px !important;
}

html.v2-layout-ready #overview .trade-plan-panel .plan-list {
  min-height: 136px !important;
}

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

html.v2-layout-ready #validation .wf-row {
  height: 24px;
}

html.v2-layout-ready #validation .wf-row > span {
  top: 3px;
  font-size: 12px !important;
}

html.v2-layout-ready #validation .wf-row > i {
  top: 5px;
}

html.v2-layout-ready #models .model-training-section {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

html.v2-layout-ready #orders #orderBrokerState {
  font-size: 12px !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #data #marketLatencyStreamDetail {
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
}

html.v2-layout-ready #operations .quant-step-index {
  min-width: 24px;
}

html.v2-layout-ready,
html.v2-layout-ready body,
html.v2-layout-ready * {
  scrollbar-color: #326887 #071827;
}

html.v2-layout-ready ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html.v2-layout-ready ::-webkit-scrollbar-track,
html.v2-layout-ready ::-webkit-scrollbar-corner {
  background: #071827;
}

html.v2-layout-ready ::-webkit-scrollbar-thumb {
  border: 2px solid #071827;
  border-radius: 5px;
  background: #326887;
}

html.v2-layout-ready ::-webkit-scrollbar-thumb:hover {
  background: #4384a8;
}

@media (min-width: 1181px) {
  html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step {
    min-height: 96px;
  }

  html.v2-layout-ready #decision .decision-execution-layer .specialist-gate-strip > div {
    min-height: 124px;
  }
}

@media (min-width: 721px) and (max-width: 1360px) {
  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 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 1360px) and (min-width: 721px) {
  html.v2-layout-ready #overview .overview-quote-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  html.v2-layout-ready #overview .overview-market-subchart {
    height: 430px !important;
    min-height: 430px !important;
    max-height: 430px !important;
  }
}

@media (min-width: 721px) and (max-width: 1100px) {
  html.v2-layout-ready .view > .page-heading {
    height: auto !important;
    min-height: 104px;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  html.v2-layout-ready .view > .page-heading > div:first-child {
    min-width: 0;
    flex: 1 1 420px;
  }

  html.v2-layout-ready .view > .page-heading > .view-actions {
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
  }

  html.v2-layout-ready .view > .page-heading .status-badge {
    white-space: nowrap;
  }

  html.v2-layout-ready #ranking .ranking-summary-strip > div {
    height: auto !important;
    min-height: 88px;
    overflow: visible !important;
  }

  html.v2-layout-ready #automation .execution-stage-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  html.v2-layout-ready #automation .execution-stage-list li {
    min-height: 82px;
    border-bottom: 1px solid var(--line);
  }

  html.v2-layout-ready #automation .execution-stage-list li:nth-child(4n) {
    border-right: 0;
  }

  html.v2-layout-ready #automation .execution-stage-list li:nth-child(n+5) {
    border-bottom: 0;
  }

  html.v2-layout-ready #automation .execution-stage-list strong,
  html.v2-layout-ready #automation .execution-stage-list small {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.35;
  }
}

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

  html.v2-layout-ready #overview .overview-market-subchart {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

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

  html.v2-layout-ready #models .model-training-section {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }
}

@media (min-width: 1361px) {
  html.v2-layout-ready #overview .dashboard-grid {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    grid-template-rows: auto !important;
  }

  html.v2-layout-ready #overview .market-panel {
    min-height: max-content !important;
  }

  html.v2-layout-ready #overview .dashboard-side-column {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}


/* Source: v8-quant-research.css */
/* V8 quantitative research capability surface. Kept scoped to avoid changing trading layouts. */

html.v2-layout-ready .quant-research-section {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--teal);
  background: linear-gradient(135deg, rgba(13, 41, 66, .92), rgba(10, 29, 49, .96));
  box-shadow: var(--v3-shadow-soft);
}

html.v2-layout-ready .quant-research-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

html.v2-layout-ready .quant-research-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

html.v2-layout-ready .quant-research-heading h2 {
  margin: 0;
  color: var(--v3-ink-strong);
  font-size: 18px;
  line-height: 1.25;
}

html.v2-layout-ready .quant-research-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

html.v2-layout-ready .quant-research-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

html.v2-layout-ready .quant-research-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

html.v2-layout-ready .quant-research-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(6, 21, 37, .56);
}

html.v2-layout-ready .quant-research-summary span,
html.v2-layout-ready .quant-capability-facts span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

html.v2-layout-ready .quant-research-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--v3-ink-strong);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready .quant-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

html.v2-layout-ready .quant-capability-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  background: rgba(10, 29, 49, .82);
}

html.v2-layout-ready .quant-capability-card[data-state="ready"] { border-left-color: var(--green); }
html.v2-layout-ready .quant-capability-card[data-state="metadata_only"],
html.v2-layout-ready .quant-capability-card[data-state="awaiting_pit_panel"],
html.v2-layout-ready .quant-capability-card[data-state="degraded"] { border-left-color: var(--amber); }
html.v2-layout-ready .quant-capability-card[data-state="blocked"],
html.v2-layout-ready .quant-capability-card[data-state="unavailable"] { border-left-color: var(--red); }

html.v2-layout-ready .quant-capability-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

html.v2-layout-ready .quant-capability-card-header > .status-badge {
  flex: 0 0 auto;
  max-width: 100%;
}

html.v2-layout-ready .quant-capability-identity {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}

html.v2-layout-ready .quant-capability-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--teal);
  border: 1px solid rgba(32, 197, 174, .32);
  background: rgba(32, 197, 174, .1);
}

html.v2-layout-ready .quant-capability-identity strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--v3-ink-strong);
  font-size: 15px;
  line-height: 1.35;
}

html.v2-layout-ready .quant-capability-identity small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

html.v2-layout-ready .quant-capability-card > p {
  min-height: 2.8em;
  margin: 0;
  color: var(--v3-muted-light);
  font-size: 13px;
  line-height: 1.45;
}

html.v2-layout-ready .quant-capability-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

html.v2-layout-ready .quant-capability-facts > div {
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

html.v2-layout-ready .quant-capability-facts strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready .quant-capability-blocker {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  color: #ffc76a;
  font-size: 12px;
  line-height: 1.45;
}

html.v2-layout-ready .quant-capability-blocker svg { flex: 0 0 14px; margin-top: 2px; }

html.v2-layout-ready .quant-research-boundary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(32, 197, 174, .26);
  background: rgba(32, 197, 174, .07);
  color: var(--v3-muted-light);
  font-size: 12px;
  line-height: 1.5;
}

html.v2-layout-ready .quant-research-boundary svg { flex: 0 0 15px; margin-top: 2px; color: var(--teal); }

html.v2-layout-ready .quant-research-empty {
  grid-column: 1 / -1;
  padding: 24px 14px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

html.v2-layout-ready #models #modelRegistryBody .status-badge {
  font-size: 13px !important;
}

html.v2-layout-ready #models .training-queue-disclosure > summary {
  min-height: 40px;
  padding-block: 7px;
}

html.v2-layout-ready #models .model-training-section > .training-row {
  gap: 8px 12px;
  padding: 8px 12px;
}

@media (min-width: 1181px) {
  html.v2-layout-ready #models .model-training-section:has(.training-queue-disclosure[open]) {
    height: var(--v2-model-queue-height, auto) !important;
    max-height: var(--v2-model-queue-height, none) !important;
  }

  html.v2-layout-ready #models .model-training-section:has(.training-queue-disclosure:not([open])) {
    height: auto !important;
    max-height: none !important;
  }
}

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

@media (min-width: 1800px) {
  html.v2-layout-ready .quant-research-section {
    grid-template-columns: 330px minmax(0, 1fr);
    grid-template-areas:
      "heading summary"
      "heading capabilities"
      "boundary capabilities";
    align-items: start;
  }
  html.v2-layout-ready .quant-research-heading { grid-area: heading; flex-direction: column; }
  html.v2-layout-ready .quant-research-heading-actions { justify-content: flex-start; }
  html.v2-layout-ready .quant-research-summary { grid-area: summary; }
  html.v2-layout-ready .quant-capability-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  html.v2-layout-ready .quant-capability-grid { grid-area: capabilities; }
  html.v2-layout-ready .quant-capability-card { gap: 8px; padding: 10px; }
  html.v2-layout-ready .quant-capability-card > p { display: none; min-height: 0; }
  html.v2-layout-ready .quant-capability-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  html.v2-layout-ready .quant-capability-facts > div { padding-top: 5px; }
  html.v2-layout-ready .quant-research-boundary { grid-area: boundary; }
  html.v2-layout-ready #models .model-layout,
  html.v2-layout-ready #models .model-layout > .table-section,
  html.v2-layout-ready #models .model-layout > .detail-panel {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  html.v2-layout-ready .quant-research-heading { flex-direction: column; }
  html.v2-layout-ready .quant-research-heading-actions { justify-content: flex-start; }
  html.v2-layout-ready .quant-research-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.v2-layout-ready .quant-capability-grid { grid-template-columns: minmax(0, 1fr); }
}
