/* Source: v9-professional-refinement.css */
/*
 * Zhongqi Zhiyan / V9 professional refinement
 * Visual-only normalization for typography, contrast, spacing and interaction.
 */

:root {
  --zq-canvas: #061321;
  --zq-surface: #0a1d31;
  --zq-surface-raised: #0d243b;
  --zq-surface-hover: #12334f;
  --zq-surface-selected: #164d7d;
  --zq-line: #1c3d57;
  --zq-line-strong: #2b5876;
  --zq-text-primary: #f2f7fb;
  --zq-text-body: #d4e1eb;
  --zq-text-secondary: #a9bdcc;
  --zq-text-muted: #8fa7ba;
  --zq-link: #78bff0;
  --zq-blue: #2b8de0;
  --zq-teal: #4fc5ae;
  --zq-teal-muted: #78b8aa;
  --zq-amber: #e7b45f;
  --zq-up: #ff7585;
  --zq-down: #52d0a4;
  --zq-danger: #ee8794;

  --zq-font-assist: 13px;
  --zq-font-data: 14px;
  --zq-font-body: 14px;
  --zq-font-section: 15px;
  --zq-font-panel: 16px;
  --zq-font-page: 22px;

  --zq-space-1: 4px;
  --zq-space-2: 8px;
  --zq-space-3: 12px;
  --zq-space-panel: 14px;
  --zq-space-4: 16px;
  --zq-space-5: 24px;

  --font-assist: var(--zq-font-assist);
  --font-meta: var(--zq-font-data);
  --font-body: var(--zq-font-body);
  --muted: var(--zq-text-muted);
  --ink: var(--zq-text-body);
  --text: var(--zq-text-body);
  --line: var(--zq-line);
  --line-strong: var(--zq-line-strong);
  --v3-ink: var(--zq-text-body);
  --v3-ink-strong: var(--zq-text-primary);
  --v3-muted: var(--zq-text-muted);
  --v3-muted-light: var(--zq-text-secondary);
  --v3-line: var(--zq-line);
  --v3-line-strong: var(--zq-line-strong);
}

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

html.v2-layout-ready body {
  font-size: var(--zq-font-body);
  line-height: 1.5;
  letter-spacing: 0;
}

html.v2-layout-ready :where(button, input, select, textarea) {
  font-family: inherit;
  letter-spacing: 0;
}

/* Shell typography */
html.v2-layout-ready .brand-copy strong {
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready .brand-copy span,
html.v2-layout-ready .nav-group-label,
html.v2-layout-ready .sidebar-footer span {
  color: var(--zq-text-muted) !important;
  font-size: var(--zq-font-assist) !important;
  line-height: 1.4;
}

html.v2-layout-ready .sidebar-footer strong {
  color: var(--zq-text-body) !important;
  font-size: 13px !important;
  line-height: 1.4;
}

html.v2-layout-ready .nav-button {
  min-height: 40px;
  gap: 10px;
  color: #b7cad8 !important;
}

html.v2-layout-ready .nav-button svg {
  width: 17px;
  height: 17px;
  color: #86a8bf !important;
}

html.v2-layout-ready .nav-button:hover {
  color: var(--zq-text-primary) !important;
  background: #0d2d49 !important;
  border-color: #285472 !important;
}

html.v2-layout-ready .nav-button:hover svg,
html.v2-layout-ready .nav-button.is-active svg {
  color: #83d6f4 !important;
}

html.v2-layout-ready .contract-switcher label,
html.v2-layout-ready .environment-control label,
html.v2-layout-ready .top-status-item > span,
html.v2-layout-ready .system-ribbon .top-status-item > span {
  color: var(--zq-text-muted) !important;
  font-size: 13px !important;
  line-height: 1.4;
}

html.v2-layout-ready .top-status-item > strong,
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: var(--zq-text-body) !important;
  font-size: 14px !important;
  line-height: 1.4;
}

html.v2-layout-ready .environment-banner {
  color: var(--zq-text-secondary) !important;
  font-size: 13px !important;
  line-height: 1.4;
}

/* Page hierarchy */
html.v2-layout-ready .view {
  color: var(--zq-text-body) !important;
}

html.v2-layout-ready .view > .page-heading {
  gap: var(--zq-space-panel);
  padding: 11px var(--zq-space-panel);
}

html.v2-layout-ready .page-heading h1 {
  color: var(--zq-text-primary) !important;
  font-size: var(--zq-font-page) !important;
  line-height: 1.3;
}

html.v2-layout-ready .page-heading p {
  color: var(--zq-text-secondary) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready .view-actions,
html.v2-layout-ready .section-actions,
html.v2-layout-ready .panel-actions,
html.v2-layout-ready .quant-research-heading-actions {
  gap: var(--zq-space-2) !important;
}

html.v2-layout-ready .view > .page-heading + * {
  margin-top: var(--zq-space-panel) !important;
}

/* Panel surfaces and inherited text */
html.v2-layout-ready .view :where(
  .tool-panel,
  .detail-panel,
  .table-section,
  .timeline-panel,
  .log-panel,
  .forward-progress-panel,
  .market-panel,
  .overview-depth-panel,
  .trade-plan-panel,
  .analysis-panel,
  .chart-panel,
  .metric-card,
  .arbitrage-capability-item,
  .quant-capability-card,
  .reconciliation-step,
  .position-empty-card
) {
  color: var(--zq-text-body) !important;
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready .view :where(
  .tool-panel,
  .detail-panel,
  .table-section,
  .timeline-panel,
  .log-panel,
  .forward-progress-panel,
  .market-panel,
  .overview-depth-panel,
  .trade-plan-panel,
  .analysis-panel,
  .chart-panel
) {
  background: var(--zq-surface) !important;
}

html.v2-layout-ready .view :where(span, em) {
  color: inherit !important;
}

html.v2-layout-ready .view :where(strong, b, h2, h3, h4) {
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready .view :where(p, li, dd, dt, time) {
  color: var(--zq-text-body) !important;
  font-size: var(--zq-font-body);
  line-height: 1.5 !important;
}

html.v2-layout-ready .view small,
html.v2-layout-ready .view :where(
  .meta,
  .metadata,
  .metric-label,
  .detail-meta,
  .helper-text,
  .hint,
  .caption,
  .timestamp,
  .table-meta,
  .quant-system-kicker,
  .quant-step-index,
  .reconciliation-step-index
) {
  color: var(--zq-text-muted) !important;
  font-size: var(--zq-font-assist) !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready .view a {
  color: var(--zq-link) !important;
  text-underline-offset: 3px;
}

html.v2-layout-ready .view a:hover {
  color: #a4d8f7 !important;
}

/* Heading contract */
html.v2-layout-ready .panel-heading,
html.v2-layout-ready .section-heading,
html.v2-layout-ready .dialog-heading {
  height: auto !important;
  min-height: 52px !important;
  max-height: none !important;
  gap: var(--zq-space-3) !important;
  padding: 10px var(--zq-space-panel) !important;
  overflow: visible !important;
  background: var(--zq-surface-raised) !important;
  color: var(--zq-text-body) !important;
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready .panel-heading h2,
html.v2-layout-ready .section-heading h2,
html.v2-layout-ready .dialog-heading h2 {
  color: var(--zq-text-primary) !important;
  font-size: var(--zq-font-panel) !important;
  line-height: 1.35 !important;
}

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 .v2-region-heading > span {
  color: var(--zq-text-muted) !important;
  font-size: var(--zq-font-assist) !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready .v2-region-heading {
  min-height: 26px;
  gap: 10px !important;
  color: var(--zq-text-muted) !important;
}

html.v2-layout-ready .heading-with-icon,
html.v2-layout-ready .overview-subheading,
html.v2-layout-ready .quant-capability-identity,
html.v2-layout-ready .detail-note {
  gap: var(--zq-space-2) !important;
}

/* Unified page and module spacing */
html.v2-layout-ready :where(
  .dashboard-grid,
  .decision-grid,
  .ranking-layout,
  .event-layout,
  .simulation-layout,
  .automation-layout,
  .position-detail-grid,
  .risk-layout,
  .validation-layout,
  .data-layout,
  .model-layout,
  .operations-layout,
  .governance-layout,
  .arbitrage-layout,
  .v2-detail-grid
) {
  gap: var(--zq-space-panel) !important;
}

html.v2-layout-ready :where(
  .metric-strip,
  .ranking-summary-strip,
  .health-strip,
  .trade-account-strip,
  .quant-research-summary,
  .quant-capability-facts,
  .plan-list,
  .gate-list,
  .specialist-gate-strip
) {
  gap: var(--zq-space-2) !important;
}

html.v2-layout-ready :where(
  .tool-panel,
  .detail-panel,
  .market-panel,
  .overview-depth-panel,
  .trade-plan-panel,
  .analysis-panel,
  .chart-panel
) > :where(.panel-body, .detail-body, .content-body) {
  padding: var(--zq-space-panel) !important;
}

html.v2-layout-ready .detail-note {
  padding: 10px var(--zq-space-3) !important;
  color: var(--zq-text-secondary) !important;
  font-size: var(--zq-font-assist) !important;
  line-height: 1.5 !important;
}

html.v2-layout-ready #decision .decision-execution-layer > .detail-note.danger-note {
  background: #0b2238 !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 6px 8px !important;
  align-items: flex-start !important;
  overflow: visible !important;
}

html.v2-layout-ready #decision .decision-execution-layer > .detail-note.danger-note,
html.v2-layout-ready #decision .decision-execution-layer > .detail-note.danger-note > span {
  color: var(--zq-text-body) !important;
}

html.v2-layout-ready #decision .decision-execution-layer > .detail-note.danger-note > span {
  min-width: 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

html.v2-layout-ready #decision .decision-execution-layer > .detail-note.danger-note > svg {
  width: 15px !important;
  height: 15px !important;
  flex: 0 0 15px !important;
  margin-top: 1px !important;
  color: var(--zq-status-bad) !important;
}

/* A blocked overview plan remains readable as a normal audit note. The icon
   carries the blocking state; body copy and framing follow the shared panel
   palette so a long explanation is not rendered as a wall of red. */
html.v2-layout-ready #overview .trade-plan-panel .overview-plan-danger .plan-blocker-content,
html.v2-layout-ready #overview .trade-plan-panel .overview-plan-danger .plan-blocker-content > span {
  color: var(--zq-text-body) !important;
}

html.v2-layout-ready #overview .trade-plan-panel .overview-plan-danger .plan-blocker-content {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface) !important;
}

html.v2-layout-ready #overview .trade-plan-panel .overview-plan-danger .plan-blocker-content > svg {
  color: var(--zq-status-bad) !important;
}

/* Data typography */
html.v2-layout-ready table thead th {
  padding: 8px 10px !important;
  color: var(--zq-text-muted) !important;
  font-size: var(--zq-font-assist) !important;
  font-weight: 650;
  line-height: 1.4 !important;
}

html.v2-layout-ready table tbody td {
  padding: 8px 10px !important;
  color: var(--zq-text-body) !important;
  font-size: var(--zq-font-data) !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready table tbody td.empty-state {
  font-size: var(--zq-font-data) !important;
}

html.v2-layout-ready table tbody td :where(strong, b) {
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready .metric-card > :where(span, small),
html.v2-layout-ready .metric-strip > div > :where(span, small),
html.v2-layout-ready .ranking-summary-strip > div > :where(span, small),
html.v2-layout-ready .health-strip > div > :where(span, small),
html.v2-layout-ready .trade-account-strip > div > :where(span, small) {
  color: var(--zq-text-muted) !important;
  font-size: var(--zq-font-assist) !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready .metric-card > strong,
html.v2-layout-ready .metric-strip > div > strong,
html.v2-layout-ready .ranking-summary-strip > div > strong,
html.v2-layout-ready .health-strip > div > strong,
html.v2-layout-ready .trade-account-strip > div > strong {
  color: var(--zq-text-primary) !important;
  line-height: 1.2 !important;
}

html.v2-layout-ready :where(.direction-chip, .tag-chip, .evidence-chip, .data-chip) {
  font-size: var(--zq-font-assist) !important;
  line-height: 1.35 !important;
}

/* Controls */
html.v2-layout-ready :where(input, select, textarea) {
  min-height: 40px !important;
  padding: 8px 10px !important;
  border-color: var(--zq-line-strong) !important;
  background: #0a2035 !important;
  color: var(--zq-text-body) !important;
  font-size: var(--zq-font-body) !important;
  line-height: 1.4 !important;
  caret-color: #75d5c3;
}

html.v2-layout-ready select option,
html.v2-layout-ready select optgroup,
html.v2-layout-ready datalist option {
  background: #0a2035 !important;
  color: var(--zq-text-body) !important;
  font-size: var(--zq-font-body) !important;
}

html.v2-layout-ready select option:checked,
html.v2-layout-ready select option:hover,
html.v2-layout-ready select option:focus {
  background: #1d6098 !important;
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready :where(input, select, textarea):hover:not(:disabled) {
  border-color: #39779d !important;
  background: #0d2942 !important;
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready :where(input, select, textarea):focus-visible {
  border-color: #3b9ce9 !important;
  box-shadow: 0 0 0 2px rgba(43, 141, 224, .24) !important;
  outline: none;
}

html.v2-layout-ready :where(input, select, textarea):disabled,
html.v2-layout-ready :where(input, textarea)[readonly] {
  background: #081a2c !important;
  color: #7f98aa !important;
  border-color: #19384f !important;
  opacity: 1;
}

html.v2-layout-ready :where(
  .primary-button,
  .secondary-button,
  .danger-button,
  .danger-outline-button,
  .text-button,
  .user-button
) {
  min-height: 38px;
  padding: 7px var(--zq-space-3);
  gap: var(--zq-space-2) !important;
  font-size: var(--zq-font-body) !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready .small-command {
  min-height: 34px !important;
  padding: 6px 9px !important;
  font-size: var(--zq-font-body) !important;
}

html.v2-layout-ready .icon-button.small {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 7px !important;
}

html.v2-layout-ready .segmented-control button,
html.v2-layout-ready .quick-price-row button {
  min-height: 36px !important;
  padding: 7px 11px !important;
  font-size: var(--zq-font-body) !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready :where(button, a, summary, [role="button"], .selectable-row, table tbody tr) {
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

html.v2-layout-ready :where(
  .secondary-button,
  .text-button,
  .icon-button,
  .user-button,
  .segmented-control button,
  .quick-price-row button,
  .settings-nav button,
  details > summary
):hover:not(:disabled) {
  color: var(--zq-text-primary) !important;
  background: var(--zq-surface-hover) !important;
  border-color: #3a7297 !important;
}

html.v2-layout-ready :where(
  .secondary-button,
  .text-button,
  .icon-button,
  .user-button,
  .segmented-control button,
  .quick-price-row button,
  .settings-nav button,
  details > summary
):hover:not(:disabled) :where(span, strong, svg) {
  color: inherit !important;
}

html.v2-layout-ready .primary-button:hover:not(:disabled) {
  color: #fff !important;
  background: #2b91e5 !important;
  border-color: #55a8eb !important;
}

html.v2-layout-ready :where(.danger-button, .danger-outline-button):hover:not(:disabled) {
  color: #fff !important;
  background: #8d3342 !important;
  border-color: #c45e6d !important;
}

html.v2-layout-ready :where(.is-selected, .is-active)[role="button"],
html.v2-layout-ready .segmented-control button.is-selected,
html.v2-layout-ready .settings-nav button.is-active {
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready table tbody tr:hover td,
html.v2-layout-ready .selectable-row:hover {
  background: rgba(43, 141, 224, .15) !important;
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready table tbody tr:hover td :where(span, strong, small, a),
html.v2-layout-ready .selectable-row:hover :where(span, strong, small, a) {
  color: inherit !important;
}

/* Semantic values remain prominent. */
html.v2-layout-ready :where(
  .value-positive,
  .status-value-up,
  .price-up,
  .text-up
) {
  color: var(--zq-up) !important;
}

html.v2-layout-ready :where(
  .value-negative,
  .status-value-down,
  .price-down,
  .text-down
) {
  color: var(--zq-down) !important;
}

html.v2-layout-ready :where(.value-warning, .status-value-warn, .text-warning) {
  color: var(--zq-amber) !important;
}

/* Status grammar: readable, deliberately quieter than primary conclusions. */
html.v2-layout-ready .status-badge,
html.v2-layout-ready .qualification-state {
  min-height: 24px;
  gap: 6px !important;
  padding: 3px 7px !important;
  border-width: 1px !important;
  background: rgba(12, 34, 54, .66) !important;
  color: var(--zq-text-secondary) !important;
  font-size: var(--zq-font-assist) !important;
  font-weight: 550;
  line-height: 1.35 !important;
}

html.v2-layout-ready .status-badge::before,
html.v2-layout-ready .qualification-state::before {
  display: inline-grid !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  place-items: center;
  border: 1px solid currentColor !important;
  border-radius: 50% !important;
  background: rgba(112, 145, 165, .14) !important;
  color: inherit !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  opacity: .88;
}

html.v2-layout-ready :where(.status-good, [data-qualification-state="passed"]) {
  color: var(--zq-teal-muted) !important;
  border-color: rgba(93, 164, 148, .34) !important;
  background: rgba(37, 93, 82, .13) !important;
}

html.v2-layout-ready :where(.status-good, [data-qualification-state="passed"])::before {
  background: rgba(72, 135, 121, .18) !important;
  color: #8fc8bb !important;
}

html.v2-layout-ready :where(.status-warn, [data-qualification-state="pending"], [data-qualification-state="incomplete"]) {
  color: #d4aa68 !important;
  border-color: rgba(194, 143, 67, .34) !important;
  background: rgba(112, 76, 26, .13) !important;
}

html.v2-layout-ready :where(.status-blocked, .status-bad, [data-qualification-state="below-standard"], [data-qualification-state="missing"]) {
  color: #db8994 !important;
  border-color: rgba(196, 82, 98, .38) !important;
  background: rgba(113, 35, 47, .14) !important;
}

html.v2-layout-ready :where(.status-neutral, [data-qualification-state="not-applicable"]) {
  color: #93adbf !important;
  border-color: rgba(112, 151, 178, .32) !important;
  background: rgba(45, 76, 99, .14) !important;
}

/* Capability cards use quiet supporting accents. */
html.v2-layout-ready :where(.arbitrage-capability-icon, .quant-capability-icon) {
  color: #6e9bb9 !important;
  border-color: rgba(84, 132, 163, .32) !important;
  background: rgba(48, 92, 124, .13) !important;
}

html.v2-layout-ready .arbitrage-capability-copy > span,
html.v2-layout-ready .quant-research-kicker {
  color: #72a7cb !important;
  font-size: var(--zq-font-assist) !important;
  font-weight: 600;
  line-height: 1.4 !important;
}

html.v2-layout-ready .arbitrage-capability-copy > small,
html.v2-layout-ready .quant-capability-identity small,
html.v2-layout-ready .quant-capability-card > p,
html.v2-layout-ready .quant-capability-facts span {
  color: var(--zq-text-muted) !important;
  font-size: var(--zq-font-assist) !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready :where(.capability-ok, .analysis-data-ready) {
  color: var(--zq-teal-muted) !important;
  opacity: .82;
}

html.v2-layout-ready :where(.arbitrage-capability-item, .quant-capability-card) {
  gap: 10px !important;
  padding: 12px !important;
}

/* Icon system */
html.v2-layout-ready .lucide {
  stroke-width: 1.8;
}

html.v2-layout-ready :where(
  .primary-button,
  .secondary-button,
  .danger-button,
  .danger-outline-button,
  .text-button,
  .icon-button,
  .user-button
) > svg {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px;
}

html.v2-layout-ready :where(.panel-heading, .section-heading) .heading-with-icon > svg,
html.v2-layout-ready :where(.panel-heading, .section-heading) > svg {
  width: 18px !important;
  height: 18px !important;
  color: #65adcf !important;
}

html.v2-layout-ready .overview-heading-icon {
  width: 20px !important;
  height: 20px !important;
  color: #67b7d5 !important;
}

html.v2-layout-ready :where(.arbitrage-capability-icon, .quant-capability-icon) > svg {
  width: 18px !important;
  height: 18px !important;
}

html.v2-layout-ready .detail-note > svg {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px;
  margin-top: 2px;
}

/* Long text and enlarged type must not force the layout wider. */
html.v2-layout-ready .view :where(
  .tool-panel,
  .detail-panel,
  .table-section,
  .metric-card,
  .arbitrage-capability-item,
  .quant-capability-card,
  .panel-heading,
  .section-heading,
  .view-actions,
  .panel-actions,
  .section-actions
) {
  min-width: 0;
}

html.v2-layout-ready .view :where(p, small, span, strong, b, a, label, td, th) {
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  html.v2-layout-ready :where(button, a, summary, [role="button"], .selectable-row, table tbody tr) {
    transition: none !important;
  }
}

@media (max-width: 1100px) {
  html.v2-layout-ready .view > .page-heading {
    height: auto !important;
    min-height: 110px;
  }

  html.v2-layout-ready .view > .page-heading > .view-actions {
    gap: var(--zq-space-2) !important;
  }
}

@media (max-width: 720px) {
  html.v2-layout-ready .view > .page-heading {
    min-height: auto;
    padding: 10px;
  }

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

/* High-specificity closure for legacy status rules. */
html.v2-layout-ready .status-badge.status-good:not(.qualification-state),
html.v2-layout-ready .status-badge.qualification-state[data-qualification-state="passed"] {
  color: var(--zq-teal-muted) !important;
  border-color: rgba(93, 164, 148, .34) !important;
  background: rgba(37, 93, 82, .13) !important;
}

html.v2-layout-ready .status-badge.status-good:not(.qualification-state)::before,
html.v2-layout-ready .status-badge.qualification-state[data-qualification-state="passed"]::before {
  box-sizing: border-box !important;
  min-width: 16px !important;
  width: 16px !important;
  height: 16px !important;
  margin-right: 0 !important;
  background: rgba(72, 135, 121, .18) !important;
  color: #8fc8bb !important;
  border-color: rgba(111, 179, 162, .48) !important;
  font-size: 11px !important;
}

html.v2-layout-ready .status-badge.status-warn:not(.qualification-state),
html.v2-layout-ready .status-badge.qualification-state[data-qualification-state="pending"],
html.v2-layout-ready .status-badge.qualification-state[data-qualification-state="incomplete"] {
  color: #d4aa68 !important;
  border-color: rgba(194, 143, 67, .34) !important;
  background: rgba(112, 76, 26, .13) !important;
}

html.v2-layout-ready .status-badge.status-blocked:not(.qualification-state),
html.v2-layout-ready .status-badge.status-bad:not(.qualification-state),
html.v2-layout-ready .status-badge.qualification-state[data-qualification-state="below-standard"],
html.v2-layout-ready .status-badge.qualification-state[data-qualification-state="missing"] {
  color: #db8994 !important;
  border-color: rgba(196, 82, 98, .38) !important;
  background: rgba(113, 35, 47, .14) !important;
}

html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state),
html.v2-layout-ready .status-badge.qualification-state[data-qualification-state="not-applicable"] {
  color: #93adbf !important;
  border-color: rgba(112, 151, 178, .32) !important;
  background: rgba(45, 76, 99, .14) !important;
}

html.v2-layout-ready .status-badge.qualification-state::before {
  box-sizing: border-box !important;
  min-width: 16px !important;
  width: 16px !important;
  height: 16px !important;
  margin-right: 0 !important;
}

/* Capability matrix: subtle outer edge, consistent internal dividers. */
html.v2-layout-ready #arbitrage .arbitrage-capability-section {
  border: 1px solid var(--zq-line) !important;
  background: var(--zq-surface) !important;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-workspace {
  border-top: 1px solid var(--zq-line) !important;
  background: rgba(8, 26, 44, .32) !important;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-item,
html.v2-layout-ready #arbitrage .arbitrage-capability-item:nth-child(n) {
  padding: 12px !important;
  border-right-color: var(--zq-line) !important;
  border-bottom-color: var(--zq-line) !important;
  background: rgba(10, 29, 49, .5) !important;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-item:hover {
  background: rgba(18, 51, 79, .72) !important;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries {
  border-top-color: var(--zq-line) !important;
  background: rgba(8, 26, 44, .46) !important;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries > section {
  gap: 10px var(--zq-space-panel) !important;
  padding: 10px var(--zq-space-3) !important;
  border-bottom: 1px solid rgba(28, 61, 87, .72) !important;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries > section:last-child {
  border-bottom: 0 !important;
}

/* Candidate table: protect the three-line rank and diagnostic cells. */
html.v2-layout-ready #arbitrage .arbitrage-table-scroll table {
  min-width: 1120px !important;
}

html.v2-layout-ready #arbitrage .arbitrage-table-scroll th,
html.v2-layout-ready #arbitrage .arbitrage-table-scroll td {
  vertical-align: top !important;
}

html.v2-layout-ready #arbitrage .arbitrage-table-scroll th:first-child,
html.v2-layout-ready #arbitrage .arbitrage-table-scroll td:first-child {
  width: 104px;
  min-width: 104px;
}

html.v2-layout-ready #arbitrage .arbitrage-table-scroll th:last-child,
html.v2-layout-ready #arbitrage .arbitrage-table-scroll td:last-child {
  width: 156px;
  min-width: 156px;
}

html.v2-layout-ready #arbitrage .arbitrage-table-scroll td > strong {
  margin: 0;
  color: var(--zq-text-primary) !important;
  font-size: var(--zq-font-data) !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready #arbitrage .arbitrage-table-scroll td > small {
  margin: 5px 0 0 !important;
  color: var(--zq-text-muted) !important;
  font-size: var(--zq-font-assist) !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready #arbitrage .arbitrage-table-scroll td > .arbitrage-score-value {
  color: #76b9e8 !important;
  font-weight: 650;
}

html.v2-layout-ready #arbitrage .arbitrage-table-scroll td > .status-badge {
  width: max-content;
  max-width: 100%;
  margin-top: 7px !important;
  white-space: normal !important;
  align-items: flex-start;
}

html.v2-layout-ready #arbitrage .arbitrage-table-scroll td:last-child > .status-badge {
  margin-top: 0 !important;
}

/* Keep compact binary controls compact inside the readable 40px form-control scale. */
html.v2-layout-ready :where(
  .compact-switch input,
  .switch-row input,
  .automation-actions input,
  input[type="checkbox"],
  input[type="radio"]
) {
  min-height: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  font-size: 0 !important;
}

/* Qualification markers may wrap to their content instead of clipping the marker. */
html.v2-layout-ready .qualification-state,
html.v2-layout-ready .status-badge.qualification-state {
  height: auto !important;
  min-height: 24px !important;
  overflow: visible !important;
}

html.v2-layout-ready .metric-card > strong.qualification-state {
  min-height: 32px !important;
  height: auto !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  align-items: center;
  overflow: visible !important;
}

/* Preserve hierarchy: page subtitles remain below panel body text. */
html.v2-layout-ready .page-heading p {
  font-size: 13px !important;
}

/* Governance uses one six-row evidence grammar for dynamic and summary rows. */
html.v2-layout-ready #governance .gate-list > div,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
  min-height: 65px !important;
  height: 65px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content max-content !important;
  grid-template-rows: auto auto !important;
  gap: 2px 12px !important;
  padding: 9px 12px !important;
  border-radius: 0 !important;
}

html.v2-layout-ready #governance .gate-list > div > .qualification-row-copy > strong,
html.v2-layout-ready #governance .gate-list > div > .qualification-row-result,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card > span,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card > strong {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready #decision .section-heading p {
  font-size: 13px !important;
}

/* Final readability pass: lift legacy 12px utility text without changing title
   or primary metric scales. These selectors target labels, diagnostics and
   evidence annotations only. */
html.v2-layout-ready .view :where(
  small,
  em,
  dt,
  dd,
  time,
  code,
  .timestamp,
  .event-timestamps,
  .event-keywords,
  .metric-label,
  .detail-meta,
  .helper-text,
  .hint,
  .caption,
  .table-meta,
  .form-helper,
  .control-helper,
  .subscription-plan-features,
  .reconciliation-step-index,
  .quant-step-index,
  .quant-system-kicker,
  .remediation-queue-heading
) {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #overview :where(
  #marketSnapshotTime,
  #marketBarStatus,
  #marketOscillatorStatus,
  #marketParticipationStatus,
  #marketMacdStatus,
  .overview-quote-grid > span,
  .overview-subchart-stats > span,
  .book-row > em,
  .fundamental-source,
  .quantOverviewRuntimeDetail
) {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #overview .overview-quote-grid > span {
  font-size: 14px !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready #decision :where(
  .direction-main > span,
  .decision-final-outcome > span,
  .decision-final-judgment > span,
  .decision-report-authority > span,
  .decision-report-card-label
) {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #arbitrage :where(
  .arbitrage-z-labels,
  .arbitrage-z-labels > span,
  .arbitrage-auto-gate-heading > span,
  .arbitrage-auto-gate-heading > strong
) {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #automation :where(.is-active, [role="tab"], .automation-kind-tabs button) {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready #positions :where(.position-empty-overview, .position-empty-overview span, .detail-note, .detail-note > span) {
  font-size: 13px !important;
  line-height: 1.5 !important;
}

html.v2-layout-ready #validation :where(.wf-row > span, .v2-chart-heading > span, .v2-chart-legend > span, .v2-chart-legend > b) {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready #data :where(.market-latency-item > span, .v2-chart-heading > span, .v2-chart-row > span, .v2-chart-legend > span, .v2-chart-legend > b) {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready #models :where(
  .quant-research-boundary,
  .quant-research-boundary > span,
  .model-registry-identity > small,
  .model-registry-timeframe > small,
  .model-registry-boundary > small,
  .v2-chart-heading > span,
  .v2-gauge-row > span,
  .v2-gauge-row > strong
) {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #models #driftCoverageMetric {
  min-height: 30px !important;
  height: auto !important;
  line-height: 1.45 !important;
  display: inline-flex !important;
  align-items: center !important;
}

html.v2-layout-ready #operations :where(
  #reconciliationFlowSummary,
  .reconciliation-step-copy > strong,
  .quant-system-kicker,
  #quantSystemUpdatedAt,
  .quant-step-copy > span,
  .quant-platform-tape > span,
  .remediation-action-copy > span,
  .remediation-queue-heading,
  #remediationQueueSummary
) {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #settings :where(
  .billing-account-band > span,
  .subscription-plan-copy > span,
  .subscription-plan-features,
  .remediation-queue-heading,
  .remediation-queue-heading > span,
  .security-summary > span,
  .security-summary > span > small
) {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

/* Contrast fixes for explanatory copy on semantic surfaces. */
html.v2-layout-ready #overview .plan-blocker-content,
html.v2-layout-ready #overview .plan-blocker-content > span {
  color: #ee8794 !important;
  background: transparent !important;
}

html.v2-layout-ready #decision .conflict-row,
html.v2-layout-ready #decision .conflict-row > span,
html.v2-layout-ready #settings .security-summary > span {
  color: #b7ccda !important;
}

html.v2-layout-ready #orders :where(.trade-mode-gate, #tradeModeGateDetail) {
  color: #ee8794 !important;
}

html.v2-layout-ready #positions .position-empty-overview,
html.v2-layout-ready #positions .position-empty-overview > span {
  color: #b1c5d3 !important;
}

/* Border hierarchy: neutral surfaces use one blue-gray divider; only the
   semantic top edge carries a stronger accent. */
html.v2-layout-ready .view :where(
  .page-heading,
  .overview-instrument-heading,
  .overview-quote-grid,
  .overview-timeframe-grid > article,
  .plan-list > div,
  .fundamental-driver-list > div,
  .curve-summary-strip > div,
  .trend-report-detail-grid,
  .arbitrage-auto-controls,
  .arbitrage-ranking-kind-control,
  .arbitrage-z-gauge,
  .arbitrage-leg,
  .arbitrage-diagnostic-details,
  .arbitrage-auto-gate-heading,
  .arbitrage-runtime-checks,
  .position-empty-facts,
  .reconciliation-flow,
  .recovery-checklist,
  .training-queue-disclosure,
  .training-queue-scroll,
  .gate-list,
  .security-summary
) {
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready .page-heading {
  border-top-color: var(--zq-line-strong) !important;
  border-bottom-color: var(--zq-line) !important;
}

html.v2-layout-ready #overview :where(.overview-timeframe-grid > article, .plan-list > div, .fundamental-driver-list > div, .curve-summary-strip > div) {
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready #arbitrage :where(.arbitrage-ranking-kind-control, .arbitrage-z-gauge, .arbitrage-leg, .arbitrage-diagnostic-details, .arbitrage-auto-gate-heading, .arbitrage-runtime-checks) {
  border-color: var(--zq-line) !important;
}

/* Let dense evidence copy grow naturally instead of clipping on fixed rows. */
html.v2-layout-ready #overview :where(.overview-event-item, .overview-event-item > strong, .overview-contract-specs) {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #overview .overview-event-item {
  min-height: 78px !important;
}

html.v2-layout-ready #arbitrage .arbitrage-score-summary {
  grid-template-columns: minmax(84px, .85fr) minmax(84px, .85fr) minmax(180px, 1.8fr) !important;
  align-items: start !important;
  gap: 10px !important;
}

html.v2-layout-ready #arbitrage .arbitrage-score-summary > div {
  min-width: 0 !important;
  min-height: 100px !important;
  height: auto !important;
}

html.v2-layout-ready #arbitrage .arbitrage-score-summary > div > strong {
  white-space: normal !important;
  line-height: 1.45 !important;
}

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

/* Specificity closure for legacy page rules. */
html.v2-layout-ready .view small,
html.v2-layout-ready .view em,
html.v2-layout-ready .view dt,
html.v2-layout-ready .view dd,
html.v2-layout-ready .view time,
html.v2-layout-ready .view code {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #overview .book-row em {
  font-size: 13px !important;
}

html.v2-layout-ready #decision .direction-summary .direction-main > span,
html.v2-layout-ready #decision .evidence-split > div > span,
html.v2-layout-ready #decision .decision-final-outcome > span,
html.v2-layout-ready #decision .decision-final-judgment > span,
html.v2-layout-ready #decision .decision-report-authority > span,
html.v2-layout-ready #decision .analysis-data-ready > span,
html.v2-layout-ready #decision .analysis-data-limited > span,
html.v2-layout-ready #decision .report-authority-badge {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #arbitrage .page-heading .timestamp,
html.v2-layout-ready #arbitrage .arbitrage-runtime-checks span {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #validation .wf-row > span,
html.v2-layout-ready #validation .v2-chart-heading > span,
html.v2-layout-ready #validation .v2-chart-legend > span,
html.v2-layout-ready #validation .v2-chart-legend > b,
html.v2-layout-ready #data .market-latency-item > span,
html.v2-layout-ready #data .v2-chart-heading > span,
html.v2-layout-ready #data .v2-chart-row > span,
html.v2-layout-ready #data .v2-chart-legend > span,
html.v2-layout-ready #data .v2-chart-legend > b {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

/* Explicit neutral divider overrides for modules that used inherited ink
   colors on one edge. */
html.v2-layout-ready .view .evidence-split > div,
html.v2-layout-ready .view .trend-report-detail-grid,
html.v2-layout-ready .view .arbitrage-auto-controls,
html.v2-layout-ready .view .arbitrage-ranking-kind-control,
html.v2-layout-ready .view .arbitrage-z-gauge,
html.v2-layout-ready .view .arbitrage-leg,
html.v2-layout-ready .view .arbitrage-diagnostic-details,
html.v2-layout-ready .view .arbitrage-auto-gate-heading,
html.v2-layout-ready .view .arbitrage-runtime-checks,
html.v2-layout-ready .view .position-empty-facts,
html.v2-layout-ready .view .training-row,
html.v2-layout-ready .view .training-queue-disclosure,
html.v2-layout-ready .view .training-queue-scroll,
html.v2-layout-ready .view .reconciliation-flow,
html.v2-layout-ready .view .reconciliation-flow-list,
html.v2-layout-ready .view .recovery-checklist,
html.v2-layout-ready .view .gate-list,
html.v2-layout-ready .view .timeline-item,
html.v2-layout-ready .view .security-summary {
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready #overview .overview-timeframe-grid > article,
html.v2-layout-ready #overview .plan-list > div,
html.v2-layout-ready #overview .fundamental-driver-list > div,
html.v2-layout-ready #overview .curve-summary-strip > div,
html.v2-layout-ready #ranking .ranking-summary-strip > div,
html.v2-layout-ready #orders .trade-account-strip > div,
html.v2-layout-ready #orders .order-estimate > div,
html.v2-layout-ready #orders .sizing-breakdown > div,
html.v2-layout-ready #orders .book-market-summary > div,
html.v2-layout-ready #data .v2-chart-row > span,
html.v2-layout-ready #data .v2-chart-legend > span,
html.v2-layout-ready #operations .health-strip > div,
html.v2-layout-ready #operations .reconciliation-flow-list > li {
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready #overview .overview-event-item,
html.v2-layout-ready #overview .overview-event-item > strong,
html.v2-layout-ready #overview .overview-market-subchart,
html.v2-layout-ready #overview .overview-contract-specs {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

html.v2-layout-ready #overview .overview-event-item {
  min-height: 78px !important;
}

html.v2-layout-ready #arbitrage .arbitrage-score-summary > div > strong {
  font-size: 14px !important;
  line-height: 1.45 !important;
  white-space: normal !important;
}

html.v2-layout-ready #arbitrage .arbitrage-score-summary > div:last-child {
  min-width: 0 !important;
  min-height: 112px !important;
  height: auto !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div,
html.v2-layout-ready #orders small,
html.v2-layout-ready #models .metric-card {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Keep switch labels intact when a panel heading narrows at compact desktop widths. */
html.v2-layout-ready .panel-heading > .compact-switch,
html.v2-layout-ready .section-heading > .compact-switch {
  flex: 0 0 auto;
  width: max-content;
  min-width: max-content;
}

/* Three short position columns need room for their two Chinese glyphs plus padding. */
html.v2-layout-ready #positions .positions-ledger-table th:nth-child(2),
html.v2-layout-ready #positions .positions-ledger-table th:nth-child(3),
html.v2-layout-ready #positions .positions-ledger-table th:nth-child(4) {
  min-width: 46px !important;
  padding-inline: 8px !important;
}

/* The operations task table uses icon-only controls; reserve their actual 32px width. */
html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(5),
html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td:nth-child(5) {
  padding-inline: 4px !important;
}

html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody tr:last-child td:nth-child(2) {
  padding-inline: 4px !important;
}

/* Preserve evidence labels and notes in dense order metric cards. */
html.v2-layout-ready #orders .metric-card.v2-has-progress > span {
  height: auto !important;
  min-height: 19px !important;
  overflow: visible !important;
}

html.v2-layout-ready #orders .metric-card.v2-has-progress > small {
  height: auto !important;
  min-height: 19px !important;
  overflow: visible !important;
}

@media (max-width: 720px) {
  /* The compact arbitrage status can wrap instead of widening the mobile grid. */
  html.v2-layout-ready #arbitrage #arbitrageBadge {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: left !important;
  }
}

html.v2-layout-ready #overview .curve-summary-strip > span,
html.v2-layout-ready #overview #quantOverviewRuntimeDetail {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #decision #decisionFinalJudgmentDetail,
html.v2-layout-ready #decision #decisionFinalScope,
html.v2-layout-ready #decision .decision-pipeline-step > small,
html.v2-layout-ready #decision .specialist-gate-strip > small,
html.v2-layout-ready #decision .decision-report-authority > small,
html.v2-layout-ready #decision .analysis-data-ready > small,
html.v2-layout-ready #decision .analysis-data-limited > small {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #events .timeline-item span,
html.v2-layout-ready #events .timeline-item small,
html.v2-layout-ready #events .event-timestamps,
html.v2-layout-ready #events .event-keywords {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #arbitrage .arbitrage-flow-strip > div,
html.v2-layout-ready #arbitrage .arbitrage-auto-workbench .arbitrage-auto-controls,
html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries > section,
html.v2-layout-ready #arbitrage .arbitrage-score-summary > div,
html.v2-layout-ready #arbitrage .arbitrage-entry-grid > div,
html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details > summary,
html.v2-layout-ready #arbitrage .arbitrage-runtime-checks > div,
html.v2-layout-ready #ranking .execution-link-strip > div,
html.v2-layout-ready #events .execution-link-strip > div,
html.v2-layout-ready #orders .execution-command-strip > div,
html.v2-layout-ready #automation .execution-stage-list > li,
html.v2-layout-ready #automation .oms-integrity-strip span,
html.v2-layout-ready #positions .execution-link-strip > div,
html.v2-layout-ready #positions .position-empty-facts > div,
html.v2-layout-ready #risk .execution-link-strip > div,
html.v2-layout-ready #validation .replay-lanes > div,
html.v2-layout-ready #data .data-activity-summary > span {
  border-color: var(--zq-line) !important;
}

/* Position detail grids originated in the light V2 layer and still reference
   --v2-line. Normalize every outer and internal divider to the active dark
   terminal line token, including populated and empty-ledger states. */
html.v2-layout-ready #positions :where(
  .position-highlight-strip,
  .position-highlight-strip > div,
  .position-fact-grid,
  .position-fact-grid > div,
  .position-empty-facts,
  .position-empty-facts > div,
  .position-exit-summary,
  .position-exit-summary > span
) {
  border-color: var(--zq-line) !important;
}

/* The populated fact grid has seven records. Paint the unused eighth desktop
   slot so the final row keeps the same complete border as every row above. */
@media (min-width: 721px) {
  html.v2-layout-ready #positions .position-fact-grid:has(> div:nth-child(odd):last-child)::after {
    content: "";
    min-width: 0;
    border-right: 1px solid var(--zq-line);
    border-bottom: 1px solid var(--zq-line);
  }
}

html.v2-layout-ready #overview .curve-summary-strip span {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #decision .decision-final-outcome span,
html.v2-layout-ready #decision .decision-final-judgment span,
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 {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #events .event-summary span,
html.v2-layout-ready #events .event-summary strong,
html.v2-layout-ready #events .event-summary b {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #orders #orderBrokerState {
  font-size: 14px !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready #positions .position-empty-overview span,
html.v2-layout-ready #positions .position-empty-card .detail-note,
html.v2-layout-ready #positions .position-empty-card .detail-note span {
  font-size: 13px !important;
  line-height: 1.5 !important;
}

html.v2-layout-ready #validation .v2-chart-legend b,
html.v2-layout-ready #data #marketLatencyStreamDetail,
html.v2-layout-ready #data #marketLatencyHeartbeatDetail,
html.v2-layout-ready #data #marketLatencyQuoteAgeDetail,
html.v2-layout-ready #data #marketLatencyReceiveDetail,
html.v2-layout-ready #data #marketLatencyDepthDetail,
html.v2-layout-ready #data #marketLatencyFiveLevelDetail,
html.v2-layout-ready #data #marketLatencyGateDetail {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #models .quant-research-summary > span {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #decision .analysis-inputs span,
html.v2-layout-ready #decision .decision-final-outcome span,
html.v2-layout-ready #decision .decision-final-judgment span,
html.v2-layout-ready #ranking .timestamp,
html.v2-layout-ready #events .v2-event-distribution .v2-chart-heading > span,
html.v2-layout-ready #events .v2-event-distribution .v2-chart-row > span,
html.v2-layout-ready #events .v2-event-distribution .v2-chart-row > strong,
html.v2-layout-ready #events .v2-event-distribution .v2-chart-legend > span,
html.v2-layout-ready #events .v2-event-distribution .v2-chart-legend > b,
html.v2-layout-ready #data .v2-chart-row > strong,
html.v2-layout-ready #data .v2-chart-legend > b,
html.v2-layout-ready #operations .reconciliation-flow span,
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-pipeline-node span,
html.v2-layout-ready #operations .quant-platform-tape span {
  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,
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,
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,
html.v2-layout-ready #decision .direction-main span,
html.v2-layout-ready #decision .direction-summary span {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #decision .decision-execution-layer .direction-main {
  height: auto !important;
  min-height: 80px !important;
  overflow: visible !important;
}

html.v2-layout-ready #events .v2-chart-legend b,
html.v2-layout-ready #data .v2-chart-legend b,
html.v2-layout-ready #data .v2-chart-row strong,
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 #models .model-layout td:nth-child(3) code,
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: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #orders .v2-summary-band .metric-card.v2-has-progress,
html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
  height: auto !important;
  min-height: 80px !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #governance .gate-list > div {
  height: 80px !important;
  min-height: 80px !important;
}

html.v2-layout-ready #models .model-layout th:nth-child(4),
html.v2-layout-ready #models .model-layout td:nth-child(4),
html.v2-layout-ready #models .model-layout th:nth-child(5),
html.v2-layout-ready #models .model-layout td:nth-child(5) {
  min-width: 100px !important;
}

@media (min-width: 1181px) and (max-width: 1360px) {
  /* Include the two-pixel border in the compact six-period matrix height. */
  html.v2-layout-ready #overview .overview-timeframe-matrix {
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  /* Keep both qualification columns readable inside the table's own scroller. */
  html.v2-layout-ready #models .model-layout > .table-section table {
    min-width: 840px !important;
  }
}

html.v2-layout-ready #arbitrage .arbitrage-capability-boundaries section,
html.v2-layout-ready #arbitrage .arbitrage-auto-gate > span {
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready #decision .decision-no-trade-section .no-trade-grid > span,
html.v2-layout-ready #models .quant-research-summary span {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #arbitrage .arbitrage-capability-workspace .arbitrage-capability-boundaries > section,
html.v2-layout-ready #arbitrage .arbitrage-method-section .arbitrage-boundaries > span,
html.v2-layout-ready #positions .position-empty-card .position-empty-overview {
  border-color: var(--zq-line) !important;
}

/* Keep the decision summary balanced at compact desktop widths. The legacy
   two-column rule spans the trend report across both columns; pair the final
   outcome with its direction/model status so neither column becomes empty. */
@media (min-width: 721px) and (max-width: 1360px) {
  html.v2-layout-ready #decision .decision-final-insight > .decision-final-outcome {
    grid-column: 1;
    grid-row: 1;
  }

  html.v2-layout-ready #decision .decision-final-insight > .trend-report-key-status {
    grid-column: 2;
    grid-row: 1;
  }

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

/* Final contract alignment: compact summaries and explicit, non-color-only
   qualification markers. These rules are intentionally scoped to the final
   design layer so legacy page rules cannot re-expand dense workspaces. */
html.v2-layout-ready table thead th {
  font-size: var(--zq-font-assist) !important;
}

html.v2-layout-ready :where(.status-badge.status-good, .status-badge.status-warn) {
  color: #b7f2de !important;
}

html.v2-layout-ready .status-badge.status-warn {
  color: #f4d38e !important;
}

html.v2-layout-ready .qualification-state,
html.v2-layout-ready .qualification-state.status-badge {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.v2-layout-ready .qualification-state::before,
html.v2-layout-ready .status-badge.qualification-state::before {
  width: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 5px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: inline !important;
  font-size: 12px !important;
}

html.v2-layout-ready #marketLastPrice.value-positive,
html.v2-layout-ready #decisionMarketLastPrice.value-positive,
html.v2-layout-ready #globalLastPrice.value-positive,
html.v2-layout-ready #mobileLastPrice.value-positive {
  color: #c53240 !important;
}

html.v2-layout-ready #marketLastPrice.value-negative,
html.v2-layout-ready #decisionMarketLastPrice.value-negative,
html.v2-layout-ready #globalLastPrice.value-negative,
html.v2-layout-ready #mobileLastPrice.value-negative {
  color: #007f59 !important;
}

html.v2-layout-ready #contractTapeState,
html.v2-layout-ready #marketQuoteState {
  font-size: var(--zq-font-assist) !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div,
html.v2-layout-ready #models .metric-strip .metric-card,
html.v2-layout-ready #simulation .metric-strip .metric-card {
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  padding: 8px 10px !important;
  overflow: hidden !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div > strong,
html.v2-layout-ready #models .metric-strip .metric-card > strong,
html.v2-layout-ready #simulation .metric-strip .metric-card > strong {
  font-size: 18px !important;
  line-height: 1.15 !important;
}

html.v2-layout-ready #overview .overview-event-item {
  min-height: 72px !important;
  height: 72px !important;
}

html.v2-layout-ready #positions .position-detail-grid {
  gap: 12px !important;
}

@media (min-width: 1181px) {
  html.v2-layout-ready #positions > .v2-position-workspace {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  html.v2-layout-ready #models .model-layout {
    width: 100% !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    column-gap: 12px !important;
  }

  html.v2-layout-ready #models .model-layout > :where(.table-section, .detail-panel) {
    min-width: 0 !important;
  }

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

  html.v2-layout-ready #operations .recovery-control-panel .panel-heading {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    overflow: hidden !important;
    padding-block: 7px !important;
  }

  html.v2-layout-ready #operations .recovery-control-panel > .detail-note {
    padding-block: 7px !important;
    font-size: var(--zq-font-assist) !important;
    line-height: 1.35 !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody tr {
    height: 32px !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td {
    padding-block: 2px !important;
    font-size: var(--zq-font-data) !important;
    line-height: 1.25 !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge {
    min-height: 24px !important;
    height: auto !important;
    max-height: none !important;
    padding-block: 3px !important;
    font-size: var(--zq-font-assist) !important;
    line-height: 1.35 !important;
    overflow: visible !important;
  }

  html.v2-layout-ready #risk .risk-layout {
    height: 270px !important;
    max-height: 270px !important;
  }

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

/* Compact tablet contract: keep the order ticket and depth snapshot readable
   instead of forcing two 570px legacy columns into a narrow work canvas. */
@media (min-width: 721px) and (max-width: 1040px) {
  html.v2-layout-ready #orders .order-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html.v2-layout-ready #orders .order-ticket,
  html.v2-layout-ready #orders .order-book-panel {
    min-width: 0 !important;
    width: 100% !important;
  }

  html.v2-layout-ready #orders .order-estimate {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.v2-layout-ready #orders .depth-column-head,
  html.v2-layout-ready #orders .order-book .book-row,
  html.v2-layout-ready #orders .order-book .last-price {
    grid-template-columns: 42px minmax(64px, 1fr) minmax(96px, 1.1fr) !important;
    min-width: 0 !important;
  }

  html.v2-layout-ready #orders .order-book .book-row,
  html.v2-layout-ready #orders .order-book .last-price {
    padding-inline: 8px !important;
  }

  html.v2-layout-ready #orders .plan-list.compact > div {
    grid-template-columns: minmax(72px, .8fr) minmax(0, 1.2fr) !important;
  }

  html.v2-layout-ready #orders #simulation .trading-subsection-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: start !important;
  }

  html.v2-layout-ready #orders #simulation .trading-subsection-heading > .view-actions {
    width: 100% !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  html.v2-layout-ready #settings .settings-section .section-heading {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  html.v2-layout-ready #settings .settings-section .section-heading > .view-actions {
    width: 100% !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }
}

/* The Z-score scale is analytical content, not a decorative micro-label. */
html.v2-layout-ready #arbitrage .arbitrage-z-gauge > div:first-child > span,
html.v2-layout-ready #arbitrage .arbitrage-z-labels,
html.v2-layout-ready #arbitrage .arbitrage-z-labels > span,
html.v2-layout-ready #arbitrage .arbitrage-diagnostic-details > summary {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready #arbitrage .arbitrage-z-track > i {
  border-color: #6f91a5 !important;
  box-shadow: 0 0 0 1px rgba(9, 49, 73, .9) !important;
}

/* Continuous metric bands use dividers rather than card gaps so their
   boundaries line up exactly with the workspace columns below. */
html.v2-layout-ready #positions .positions-metrics {
  gap: 0 !important;
}

/* Remove the inline canvas baseline descent from the bounded risk workspace. */
html.v2-layout-ready #risk #riskChart {
  display: block !important;
}

html.v2-layout-ready #risk .risk-layout > .tool-panel > .panel-heading {
  padding-block: 9px !important;
  margin-bottom: 9px !important;
}

/* Final geometry corrections. Keep the desktop canvas on the same 16px
   content rail and retain the two-column workspaces used by the page model. */
@media (min-width: 901px) {
  html.v2-layout-ready .view {
    padding-inline: 16px !important;
  }

  html.v2-layout-ready #models .model-layout {
    grid-template-columns: 75% 25% !important;
    column-gap: 0 !important;
  }

  html.v2-layout-ready #positions > .v2-position-workspace {
    grid-template-columns: minmax(620px, 1.35fr) minmax(360px, .65fr) !important;
  }

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

/* Compact data tables keep their row geometry without changing the shared
   body data scale. */
@media (min-width: 1181px) {
  html.v2-layout-ready #models .model-layout > .table-section tbody tr {
    height: 50px !important;
  }

  html.v2-layout-ready #models .model-layout > .table-section tbody td {
    padding-block: 4px !important;
    line-height: 1.25 !important;
  }

  html.v2-layout-ready #models .model-layout > .table-section thead th {
    padding-block: 5px !important;
  }
}

@media (min-width: 901px) {
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody tr,
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    box-sizing: border-box !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    padding-block: 1px !important;
    line-height: 1.15 !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge {
    height: auto !important;
    min-height: 24px !important;
    max-height: none !important;
    padding-block: 3px !important;
    font-size: var(--zq-font-assist) !important;
    line-height: 1.35 !important;
    overflow: visible !important;
  }
}

/* Status text is rendered on the dark canvas; use a light accessible tone
   while preserving the existing semantic green/amber surfaces. */
html.v2-layout-ready .status-badge.status-good:not(.qualification-state) {
  color: #d9f8eb !important;
}

html.v2-layout-ready .status-badge.status-warn:not(.qualification-state) {
  color: #fff0b8 !important;
}

html.v2-layout-ready #validation .status-badge.qualification-state {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* China-market convention: rising red, falling green, including the primary
   quote that also carries legacy inline presentation styles. */
html.v2-layout-ready .market-quote-strip #marketLastPrice.value-positive,
html.v2-layout-ready .market-panel #marketLastPrice.value-positive {
  color: #c53240 !important;
}

html.v2-layout-ready .market-quote-strip #marketLastPrice.value-negative,
html.v2-layout-ready .market-panel #marketLastPrice.value-negative {
  color: #007f59 !important;
}

/* Summary cards are bounded components: include borders in the fixed height
   and center their short label/value stack so no text creates overflow. */
html.v2-layout-ready #ranking .ranking-summary-strip > div,
html.v2-layout-ready #models .metric-strip .metric-card,
html.v2-layout-ready #simulation .metric-strip .metric-card {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div > :where(span, small),
html.v2-layout-ready #models .metric-strip .metric-card > small,
html.v2-layout-ready #simulation .metric-strip .metric-card > small {
  line-height: 1.15 !important;
}

/* Execution facts use one-pixel grid rules and direction-colored copy. */
html.v2-layout-ready #decision .execution-strategy-grid,
html.v2-layout-ready #decision .execution-risk-grid,
html.v2-layout-ready #decision .execution-data-grid {
  row-gap: 1px !important;
  column-gap: 1px !important;
  background: var(--zq-line) !important;
}

html.v2-layout-ready #decision .trigger-side.long-side {
  color: #ef7380 !important;
  border-top: 2px solid #ef7380 !important;
}

html.v2-layout-ready #decision .trigger-side.short-side {
  color: #49d7a2 !important;
  border-top: 2px solid #49d7a2 !important;
}

html.v2-layout-ready #decision .trigger-side.long-side > span,
html.v2-layout-ready #decision .trigger-side.long-side > strong,
html.v2-layout-ready #decision .trigger-side.long-side > small {
  color: #ef7380 !important;
}

html.v2-layout-ready #decision .trigger-side.short-side > span,
html.v2-layout-ready #decision .trigger-side.short-side > strong,
html.v2-layout-ready #decision .trigger-side.short-side > small {
  color: #49d7a2 !important;
}

html.v2-layout-ready #overview .overview-instrument-heading #marketQuoteState.status-neutral {
  font-size: var(--zq-font-assist) !important;
}

html.v2-layout-ready #ranking.view.is-active {
  box-sizing: border-box !important;
  height: calc(100dvh - 130px) !important;
}

html.v2-layout-ready #positions.view.is-active {
  box-sizing: border-box !important;
  height: calc(100dvh - 128px) !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div,
html.v2-layout-ready #models .metric-strip .metric-card,
html.v2-layout-ready #simulation .metric-strip .metric-card {
  height: 74px !important;
  min-height: 74px !important;
  max-height: 74px !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div > :where(span, strong, small),
html.v2-layout-ready #models .metric-strip .metric-card > :where(span, strong, small),
html.v2-layout-ready #simulation .metric-strip .metric-card > :where(span, strong, small) {
  margin: 0 !important;
  line-height: 1 !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div,
html.v2-layout-ready #models .metric-strip .metric-card,
html.v2-layout-ready #simulation .metric-strip .metric-card {
  grid-template-rows: 14px 20px 14px !important;
  align-content: center !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div > small,
html.v2-layout-ready #models .metric-strip .metric-card > small,
html.v2-layout-ready #simulation .metric-strip .metric-card > small {
  max-height: 14px !important;
  overflow: hidden !important;
  font-size: var(--zq-font-assist) !important;
}

html.v2-layout-ready #overview .overview-instrument-heading .status-badge {
  font-size: var(--zq-font-assist) !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready #positions .positions-ledger-table thead th {
  padding-inline: 8px !important;
}

html.v2-layout-ready #operations .status-badge,
html.v2-layout-ready #operations .detail-note.warning-note,
html.v2-layout-ready #operations .detail-note.warning-note span {
  font-size: var(--zq-font-assist) !important;
  line-height: 1.4 !important;
}

/* Keep the operations ledger status badges aligned with the global assist
   type scale even when the compact-table rule above is active. */
html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge {
  font-size: var(--zq-font-assist) !important;
  line-height: 1.35 !important;
  padding-inline: 5px !important;
}

/* Final contract-alignment pass. Progress cards keep the progress rail, but
   their three text rows must fit inside the bounded summary height. */
html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress > span,
html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress > small {
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  line-height: 14px !important;
  overflow: hidden !important;
}

html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress > strong {
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  line-height: 20px !important;
  overflow: hidden !important;
}

/* The model table and qualification rail share the four-column metric rhythm:
   the 8px inter-column rule is intentional and keeps both boundaries aligned. */
@media (min-width: 901px) {
  html.v2-layout-ready #models .model-layout {
    grid-template-columns: minmax(0, 3.05fr) minmax(0, 1fr) !important;
    column-gap: 8px !important;
  }

  html.v2-layout-ready .main-shell > main {
    height: calc(100dvh - 128px) !important;
  }

  html.v2-layout-ready #ranking.view.is-active,
  html.v2-layout-ready #positions.view.is-active {
    min-height: 0 !important;
    height: calc(100dvh - 128px) !important;
  }
}

/* Execution hierarchy: section titles are compact headings, while pipeline
   notes and exit labels remain readable without inflating the workbench. */
html.v2-layout-ready #decision .decision-execution-layer .execution-subsection-heading h3 {
  font-size: 14px !important;
}

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

html.v2-layout-ready #decision .decision-execution-layer .exit-rule-list strong {
  font-size: 13px !important;
}

html.v2-layout-ready #governance .governance-qualification-summary .metric-card {
  row-gap: 3px !important;
}

/* Qualification markers inside the compact forward cards use a fixed flex
   item, so the marker cannot create a hidden third line in the value row. */
html.v2-layout-ready #orders #simulation .metric-card > strong.qualification-state::before {
  box-sizing: border-box !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  padding: 0 !important;
  line-height: 16px !important;
}

/* The simulation view is a sibling of the order view, so keep the same
   compact geometry on its actual root rather than relying on nesting. */
html.v2-layout-ready #simulation .metric-card.v2-has-progress > span,
html.v2-layout-ready #simulation .metric-card.v2-has-progress > small {
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  line-height: 14px !important;
  overflow: hidden !important;
}

html.v2-layout-ready #simulation .metric-card.v2-has-progress > strong {
  height: 23px !important;
  min-height: 23px !important;
  max-height: 23px !important;
  line-height: 20px !important;
  overflow: hidden !important;
}

html.v2-layout-ready #simulation .metric-card > strong.qualification-state::before {
  box-sizing: border-box !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  padding: 0 !important;
  line-height: 16px !important;
}

/* Qualification values are allowed to carry the status marker, so reserve
   the same 23px value row in both summary strips.  The orders-scoped rule
   above is intentionally matched here with equal specificity to prevent the
   legacy 20px cap from clipping the marker or the value text. */
html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress > strong,
html.v2-layout-ready #models .metric-strip .metric-card > strong.qualification-state,
html.v2-layout-ready #simulation .metric-strip .metric-card > strong.qualification-state {
  box-sizing: border-box !important;
  flex: 0 0 23px !important;
  height: 23px !important;
  min-height: 23px !important;
  max-height: 23px !important;
  line-height: 20px !important;
  overflow: hidden !important;
}

/* Keep the optional note row from shrinking when a qualification marker is
   present in the value row. */
html.v2-layout-ready #models .metric-strip .metric-card > small,
html.v2-layout-ready #simulation .metric-strip .metric-card > small {
  box-sizing: border-box !important;
  flex: 0 0 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  line-height: 14px !important;
  overflow: hidden !important;
}

/* Instrument status belongs to the shared assist scale like every other
   non-qualification badge. */
html.v2-layout-ready #overview .overview-instrument-heading #marketQuoteState.status-neutral {
  font-size: var(--zq-font-assist) !important;
}

/* Summary rails use the same assist scale as the rest of the terminal. The
   bounded 14px row still fits the 13px label without reducing hierarchy. */
html.v2-layout-ready #ranking .ranking-summary-strip > div > small,
html.v2-layout-ready #models .metric-strip .metric-card > small,
html.v2-layout-ready #simulation .metric-strip .metric-card > small {
  font-size: var(--zq-font-assist) !important;
  line-height: 1.1 !important;
}

/* Global shell labels follow the same readable assist scale as page content. */
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 .contract-switcher .control-label,
html.v2-layout-ready #globalProductCoverage,
html.v2-layout-ready #globalContractCoverage,
html.v2-layout-ready #globalChangeSummary {
  font-size: var(--zq-font-assist) !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready .contract-switcher .control-label {
  color: var(--zq-text-muted) !important;
}

/* The alert drawer is a first-class terminal surface, including when opened
   over a page; it must not fall back to the legacy white theme. */
html.v2-layout-ready .alert-drawer {
  background: var(--zq-surface) !important;
  color: var(--zq-text-body) !important;
  border-left-color: var(--zq-line-strong) !important;
  box-shadow: -12px 0 32px rgba(0, 0, 0, .42) !important;
}

html.v2-layout-ready .alert-drawer .drawer-heading {
  border-bottom-color: var(--zq-line) !important;
}

html.v2-layout-ready .alert-drawer .drawer-heading h2 {
  color: var(--zq-text-primary) !important;
  font-size: var(--zq-font-panel) !important;
}

html.v2-layout-ready .alert-drawer .drawer-heading p,
html.v2-layout-ready .alert-drawer .alert-item strong,
html.v2-layout-ready .alert-drawer .alert-item span,
html.v2-layout-ready .alert-drawer .alert-item time {
  font-size: var(--zq-font-assist) !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready .alert-drawer .alert-item {
  border-bottom-color: var(--zq-line) !important;
}

/* Empty latest-price states should remain readable while real up/down values
   keep their semantic China-market colors from the rules above. */
html.v2-layout-ready #globalLastPrice:not(.value-positive):not(.value-negative) {
  color: var(--zq-text-primary) !important;
}

/* Semantic signal contract: every directional value and state marker uses the
   same China-market red/green pair, while warning and blocked states stay
   amber/rose so they are never mistaken for a trading direction. */
html.v2-layout-ready :where(
  .value-positive,
  .status-value-up,
  .price-up,
  .text-up,
  .direction-summary-long,
  .direction-long,
  .is-bullish,
  .long-side,
  .ask
) {
  color: var(--zq-up) !important;
}

html.v2-layout-ready :where(
  .value-negative,
  .status-value-down,
  .price-down,
  .text-down,
  .direction-summary-short,
  .direction-short,
  .is-bearish,
  .short-side,
  .bid
) {
  color: var(--zq-down) !important;
}

html.v2-layout-ready .direction-main.direction-summary-long,
html.v2-layout-ready .direction-summary-long {
  border-left-color: var(--zq-up) !important;
  background: rgba(133, 42, 57, .2) !important;
}

html.v2-layout-ready .direction-main.direction-summary-short,
html.v2-layout-ready .direction-summary-short {
  border-left-color: var(--zq-down) !important;
  background: rgba(35, 111, 91, .2) !important;
}

html.v2-layout-ready .direction-main.direction-summary-neutral,
html.v2-layout-ready .direction-summary-neutral {
  border-left-color: var(--zq-amber) !important;
  background: rgba(112, 76, 26, .16) !important;
}

html.v2-layout-ready .long-side {
  border-top-color: var(--zq-up) !important;
}

html.v2-layout-ready .short-side {
  border-top-color: var(--zq-down) !important;
}

html.v2-layout-ready .ask::before {
  background: rgba(133, 42, 57, .22) !important;
}

html.v2-layout-ready .bid::before {
  background: rgba(35, 111, 91, .22) !important;
}

html.v2-layout-ready .ask :where(span, strong),
html.v2-layout-ready .bid :where(span, strong) {
  color: inherit !important;
}

/* Status dots follow the same semantic grammar as badges. */
html.v2-layout-ready .status-dot.status-good {
  background: var(--zq-teal) !important;
  box-shadow: 0 0 0 3px rgba(79, 197, 174, .12) !important;
}

html.v2-layout-ready .status-dot.status-warn {
  background: var(--zq-amber) !important;
  box-shadow: 0 0 0 3px rgba(231, 180, 95, .12) !important;
}

html.v2-layout-ready .status-dot.status-bad,
html.v2-layout-ready .status-dot.status-blocked {
  background: var(--zq-danger) !important;
  box-shadow: 0 0 0 3px rgba(238, 135, 148, .12) !important;
}

html.v2-layout-ready .status-dot.status-neutral {
  background: var(--zq-blue) !important;
  box-shadow: 0 0 0 3px rgba(43, 141, 224, .12) !important;
}

/* Switches: open is green, closed is red. Disabled controls retain the state
   color at lower intensity instead of collapsing into an indistinguishable
   grey block. */
html.v2-layout-ready .compact-switch input[type="checkbox"],
html.v2-layout-ready .switch-row input[type="checkbox"] {
  border-color: rgba(196, 82, 98, .72) !important;
  background: rgba(113, 35, 47, .34) !important;
  box-shadow: inset 0 0 0 1px rgba(238, 135, 148, .08) !important;
}

html.v2-layout-ready .compact-switch input[type="checkbox"]:checked,
html.v2-layout-ready .switch-row input[type="checkbox"]:checked {
  border-color: rgba(79, 197, 174, .82) !important;
  background: rgba(37, 124, 101, .72) !important;
  box-shadow: inset 0 0 0 1px rgba(146, 224, 201, .12) !important;
}

html.v2-layout-ready .compact-switch input[type="checkbox"]::before,
html.v2-layout-ready .switch-row input[type="checkbox"]::before {
  background: #f8fbfd !important;
}

html.v2-layout-ready .compact-switch input[type="checkbox"]:disabled,
html.v2-layout-ready .switch-row input[type="checkbox"]:disabled {
  opacity: .92 !important;
}

html.v2-layout-ready .automation-actions input[type="checkbox"],
html.v2-layout-ready .automation-actions input[type="radio"] {
  accent-color: #b64d5d !important;
}

html.v2-layout-ready .automation-actions input[type="checkbox"]:checked,
html.v2-layout-ready .automation-actions input[type="radio"]:checked {
  accent-color: var(--zq-teal) !important;
}

/* Reserve a real text column beside the search glyph. The generic 40px input
   rule is loaded after the legacy search rule, so the left inset is repeated
   here in the final design layer. */
html.v2-layout-ready .product-search-field > svg,
html.v2-layout-ready .arbitrage-search > svg {
  left: 10px !important;
  width: 16px !important;
  height: 16px !important;
  color: var(--zq-text-muted) !important;
}

html.v2-layout-ready .product-search-field input,
html.v2-layout-ready .arbitrage-search input {
  padding-left: 36px !important;
}

/* High-specificity legacy exceptions must resolve back to the shared tokens. */
html.v2-layout-ready #marketLastPrice.value-positive,
html.v2-layout-ready #decisionMarketLastPrice.value-positive,
html.v2-layout-ready #globalLastPrice.value-positive,
html.v2-layout-ready #mobileLastPrice.value-positive {
  color: var(--zq-up) !important;
}

html.v2-layout-ready #marketLastPrice.value-negative,
html.v2-layout-ready #decisionMarketLastPrice.value-negative,
html.v2-layout-ready #globalLastPrice.value-negative,
html.v2-layout-ready #mobileLastPrice.value-negative {
  color: var(--zq-down) !important;
}

html.v2-layout-ready #decision .trigger-side.long-side > :where(span, strong, small),
html.v2-layout-ready .ask :where(span, strong) {
  color: var(--zq-up) !important;
}

html.v2-layout-ready #decision .trigger-side.short-side > :where(span, strong, small),
html.v2-layout-ready .bid :where(span, strong) {
  color: var(--zq-down) !important;
}

html.v2-layout-ready .view :where(.value-warning, .status-value-warn, .text-warning) {
  color: var(--zq-amber) !important;
}

html.v2-layout-ready .view :where(.status-value-good, .text-success) {
  color: var(--zq-teal) !important;
}

html.v2-layout-ready .view :where(.status-value-bad, .text-danger, .text-error) {
  color: var(--zq-danger) !important;
}

/* Table hover keeps ordinary text readable without erasing signal meaning. */
html.v2-layout-ready .view .status-badge.status-good,
html.v2-layout-ready .view .qualification-state[data-qualification-state="passed"] {
  color: #b7f2de !important;
  border-color: rgba(93, 164, 148, .34) !important;
  background: rgba(37, 93, 82, .13) !important;
}

html.v2-layout-ready .view .status-badge.status-warn,
html.v2-layout-ready .view .qualification-state:is(
  [data-qualification-state="pending"],
  [data-qualification-state="incomplete"]
) {
  color: var(--zq-amber) !important;
  border-color: rgba(194, 143, 67, .34) !important;
  background: rgba(112, 76, 26, .13) !important;
}

html.v2-layout-ready .view .status-badge:is(.status-bad, .status-blocked),
html.v2-layout-ready .view .qualification-state:is(
  [data-qualification-state="below-standard"],
  [data-qualification-state="missing"]
) {
  color: #f0a0aa !important;
  border-color: rgba(196, 82, 98, .38) !important;
  background: rgba(113, 35, 47, .14) !important;
}

html.v2-layout-ready .view .status-badge.status-neutral,
html.v2-layout-ready .view .qualification-state[data-qualification-state="not-applicable"] {
  color: #a9c3d5 !important;
  border-color: rgba(112, 151, 178, .32) !important;
  background: rgba(45, 76, 99, .14) !important;
}

/* Direction and alert classes outrank generic strong/dd/table-hover copy. */
html.v2-layout-ready .view .value-positive,
html.v2-layout-ready .view .status-value-up,
html.v2-layout-ready .view .price-up,
html.v2-layout-ready .view .text-up {
  color: var(--zq-up) !important;
}

html.v2-layout-ready .view .value-negative,
html.v2-layout-ready .view .status-value-down,
html.v2-layout-ready .view .price-down,
html.v2-layout-ready .view .text-down {
  color: var(--zq-down) !important;
}

html.v2-layout-ready .market-quote-strip #marketLastPrice.value-positive,
html.v2-layout-ready .market-panel #marketLastPrice.value-positive,
html.v2-layout-ready #globalChangeSummary.value-positive,
html.v2-layout-ready #overview #marketChangeValue.value-positive,
html.v2-layout-ready #overview #marketChangePct.value-positive,
html.v2-layout-ready #marketChangeValue.value-positive,
html.v2-layout-ready #marketChangePct.value-positive,
html.v2-layout-ready #decisionMarketChangeValue.value-positive,
html.v2-layout-ready #decisionMarketChangePct.value-positive,
html.v2-layout-ready #mobileChangeValue.value-positive,
html.v2-layout-ready #mobileChangePct.value-positive,
html.v2-layout-ready #accountPnl.value-positive {
  color: var(--zq-up) !important;
}

html.v2-layout-ready .market-quote-strip #marketLastPrice.value-negative,
html.v2-layout-ready .market-panel #marketLastPrice.value-negative,
html.v2-layout-ready #globalChangeSummary.value-negative,
html.v2-layout-ready #overview #marketChangeValue.value-negative,
html.v2-layout-ready #overview #marketChangePct.value-negative,
html.v2-layout-ready #marketChangeValue.value-negative,
html.v2-layout-ready #marketChangePct.value-negative,
html.v2-layout-ready #decisionMarketChangeValue.value-negative,
html.v2-layout-ready #decisionMarketChangePct.value-negative,
html.v2-layout-ready #mobileChangeValue.value-negative,
html.v2-layout-ready #mobileChangePct.value-negative,
html.v2-layout-ready #accountPnl.value-negative {
  color: var(--zq-down) !important;
}

html.v2-layout-ready .view .value-warning,
html.v2-layout-ready .view .status-value-warn,
html.v2-layout-ready .view .text-warning,
html.v2-layout-ready .view .status-badge.status-value-warn {
  color: var(--zq-amber) !important;
}

html.v2-layout-ready .view .status-value-good,
html.v2-layout-ready .view .status-badge.status-value-good,
html.v2-layout-ready .view .text-success {
  color: var(--zq-teal) !important;
}

html.v2-layout-ready .view .status-value-bad,
html.v2-layout-ready .view .status-badge.status-value-bad,
html.v2-layout-ready .view .text-danger,
html.v2-layout-ready .view .text-error {
  color: var(--zq-danger) !important;
}

/* Decision execution cells have a legacy section-specific text rule; semantic
   classes inside that grid still take precedence. */
html.v2-layout-ready body #decision .decision-execution-layer .value-positive {
  color: var(--zq-up) !important;
}

html.v2-layout-ready body #decision .decision-execution-layer .value-negative {
  color: var(--zq-down) !important;
}

html.v2-layout-ready body #decision .decision-execution-layer .value-warning,
html.v2-layout-ready body #decision .decision-execution-layer .status-value-warn,
html.v2-layout-ready body #decision .decision-execution-layer .text-warning {
  color: var(--zq-amber) !important;
}

/* The live quote needs enough room for a signed price and a two-part change
   summary at compact desktop widths. */
@media (min-width: 1041px) {
  html.v2-layout-ready .v2-command-side .global-latest-quote {
    flex: 0 0 clamp(224px, 19vw, 300px) !important;
    inline-size: clamp(224px, 19vw, 300px) !important;
    min-width: 224px !important;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote > strong {
    grid-template-columns: minmax(104px, 1fr) minmax(92px, auto) !important;
    gap: 10px !important;
  }

  html.v2-layout-ready .v2-command-side #globalLastPrice {
    line-height: 1.15 !important;
    overflow: visible !important;
  }

  html.v2-layout-ready .v2-command-side #globalChangeSummary {
    width: auto !important;
    min-width: 92px !important;
    max-width: none !important;
    overflow: visible !important;
  }
}

/* V9 completion gate -------------------------------------------------------
   Keep these contract rules last. Earlier theme layers intentionally retain
   their own density variants, while the production terminal requires one
   measured result for typography, alignment and China-market direction. */

html.v2-layout-ready table thead th {
  font-size: 12px !important;
}

html.v2-layout-ready #models .model-layout > .table-section tbody td {
  font-size: 13px !important;
}

html.v2-layout-ready #contractTapeState,
html.v2-layout-ready #marketQuoteState,
html.v2-layout-ready #overview .overview-instrument-heading #marketQuoteState.status-neutral {
  font-size: 12px !important;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > small {
  font-size: 12px !important;
}

html.v2-layout-ready :where(
  #marketLastPrice,
  #decisionMarketLastPrice,
  #globalLastPrice,
  #mobileLastPrice
).value-positive {
  color: #c53240 !important;
}

html.v2-layout-ready :where(
  #marketLastPrice,
  #decisionMarketLastPrice,
  #globalLastPrice,
  #mobileLastPrice
).value-negative {
  color: #007f59 !important;
}

html.v2-layout-ready #validation .qualification-legend .qualification-state,
html.v2-layout-ready #validation .qualification-legend .status-badge.qualification-state {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.v2-layout-ready #models > .metric-strip .metric-card {
  box-sizing: border-box !important;
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
}

@media (min-width: 721px) {
  /* The generated region label repeats the page and policy headings. Removing
     that duplicate row lets the fixed 750px evidence workbench meet the
     navigation baseline without clipping either column. */
  html.v2-layout-ready #events > .v2-primary-workspace > .v2-region-heading {
    display: none !important;
  }
}

@media (min-width: 901px) {
  html.v2-layout-ready #ranking.view.is-active {
    height: calc(100dvh - 129px) !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody tr,
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    box-sizing: border-box !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    padding-block: 0 !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge {
    box-sizing: border-box !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 1px 4px !important;
    font-size: 12px !important;
    line-height: 16px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (min-width: 1181px) {
  html.v2-layout-ready #positions > .v2-position-workspace {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    column-gap: 0 !important;
  }

  html.v2-layout-ready #positions > .v2-position-workspace > .positions-ledger-table {
    grid-column: 1 / span 4 !important;
  }

  html.v2-layout-ready #positions > .v2-position-workspace > #positionDetail {
    grid-column: 5 / -1 !important;
  }
}

/* Measured production closure. */
:root {
  --zq-up: #ff6679;
  --zq-down: #35d6a3;
}

html.v2-layout-ready table tbody td {
  font-size: 13px !important;
}

html.v2-layout-ready body .view table tbody td {
  font-size: 13px !important;
}

html.v2-layout-ready .status-badge:not(.qualification-state) {
  font-size: 12px !important;
}

html.v2-layout-ready :where(.status-badge.status-blocked, .status-badge.status-bad):not(.qualification-state) {
  color: #ffd0d6 !important;
}

html.v2-layout-ready .status-badge.status-blocked:not(.qualification-state),
html.v2-layout-ready .status-badge.status-bad:not(.qualification-state) {
  color: #ffd0d6 !important;
}

html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state) {
  color: #cfe7f7 !important;
}

html.v2-layout-ready #models .model-layout tbody .status-badge:not(.qualification-state) {
  font-size: 13px !important;
}

html.v2-layout-ready #operations .status-badge:not(.qualification-state) {
  font-size: 12px !important;
}

html.v2-layout-ready #models .model-layout th:nth-child(4),
html.v2-layout-ready #models .model-layout td:nth-child(4),
html.v2-layout-ready #models .model-layout th:nth-child(5),
html.v2-layout-ready #models .model-layout td:nth-child(5) {
  min-width: 0 !important;
}

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

html.v2-layout-ready #models .model-layout td:nth-child(4) .qualification-state,
html.v2-layout-ready #models .model-layout td:nth-child(5) .qualification-state {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  gap: 2px !important;
  padding-inline: 0 !important;
}

@media (min-width: 721px) and (max-width: 1180px) {
  html.v2-layout-ready #positions .positions-ledger-table table {
    width: 760px !important;
    min-width: 760px !important;
  }
}

html.v2-layout-ready #arbitrage #arbitrageForwardMetric {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-variant-numeric: tabular-nums;
}

html.v2-layout-ready #arbitrage #arbitrageForwardMetric::before {
  display: none !important;
  content: none !important;
  margin: 0 !important;
}

html.v2-layout-ready #marketLastPrice.value-positive,
html.v2-layout-ready #decisionMarketLastPrice.value-positive,
html.v2-layout-ready #globalLastPrice.value-positive,
html.v2-layout-ready #mobileLastPrice.value-positive {
  color: #c53240 !important;
}

html.v2-layout-ready #marketLastPrice.value-negative,
html.v2-layout-ready #decisionMarketLastPrice.value-negative,
html.v2-layout-ready #globalLastPrice.value-negative,
html.v2-layout-ready #mobileLastPrice.value-negative {
  color: #007f59 !important;
}

html.v2-layout-ready #overview .overview-timeframe-grid > article {
  padding: 6px 7px !important;
}

html.v2-layout-ready #overview .overview-timeframe-grid > article > span,
html.v2-layout-ready #overview .overview-timeframe-grid > article > small {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

html.v2-layout-ready #overview .overview-timeframe-grid > article > small {
  display: -webkit-box !important;
  max-height: 60px !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

html.v2-layout-ready #models .training-queue-scroll {
  box-sizing: border-box !important;
  height: 192px !important;
  min-height: 192px !important;
  max-height: 192px !important;
}

html.v2-layout-ready #models .training-queue-scroll thead tr,
html.v2-layout-ready #models .training-queue-scroll thead th {
  box-sizing: border-box !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding-block: 2px !important;
}

html.v2-layout-ready #models .training-queue-scroll tbody tr,
html.v2-layout-ready #models .training-queue-scroll tbody td {
  box-sizing: border-box !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
}

html.v2-layout-ready #models .training-queue-scroll tbody td {
  padding-block: 3px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

@media (min-width: 1181px) and (min-height: 1101px) {
  html.v2-layout-ready #models .training-queue-scroll {
    height: 240px !important;
    min-height: 240px !important;
    max-height: 240px !important;
  }
}

@media (min-width: 1361px) and (max-width: 1499px) {
  html.v2-layout-ready #overview .overview-timeframe-matrix {
    height: 212px !important;
    min-height: 212px !important;
    max-height: 212px !important;
  }
}

@media (min-width: 721px) {
  html.v2-layout-ready #events > .page-heading + .event-execution-policy {
    box-sizing: border-box !important;
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    margin-top: 0 !important;
    margin-bottom: 2px !important;
  }

  html.v2-layout-ready #events > .event-execution-policy > div {
    box-sizing: border-box !important;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
  }
}

@media (min-width: 901px) {
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll .icon-button.small {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
  }
}

/* R49 institutional density and signal hierarchy. */
:root {
  --zq-text-primary: #f4f8fb;
  --zq-text-body: #c7d5e0;
  --zq-text-secondary: #9db0bf;
  --zq-text-muted: #8198aa;
  --zq-up: #ff5368;
  --zq-down: #2bd39b;
  --zq-amber: #e3ad55;
  --zq-danger: #ff8492;
  --price-up: var(--zq-up);
  --price-down: var(--zq-down);
  --price-up-soft: rgba(255, 83, 104, .14);
  --price-down-soft: rgba(43, 211, 155, .13);
  --red: var(--zq-up);
  --green: var(--zq-down);
  --chart-level-pressure: #a17d84;
  --chart-level-support: #718e87;
}

html.v2-layout-ready body {
  color: var(--zq-text-body) !important;
}

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,
html.v2-layout-ready .detail-note {
  color: var(--zq-text-secondary) !important;
}

html.v2-layout-ready .view :where(p, li, dd, dt, time) {
  color: var(--zq-text-body) !important;
  line-height: 1.58 !important;
}

html.v2-layout-ready .view small,
html.v2-layout-ready .view :where(
  .meta,
  .metadata,
  .metric-label,
  .detail-meta,
  .helper-text,
  .hint,
  .caption,
  .timestamp,
  .table-meta,
  .quant-system-kicker,
  .quant-step-index,
  .reconciliation-step-index
) {
  color: var(--zq-text-muted) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

html.v2-layout-ready :where(.panel-heading, .section-heading, .dialog-heading) {
  min-height: 56px !important;
  gap: 14px !important;
  padding: 11px 14px !important;
}

html.v2-layout-ready .view > .page-heading {
  min-height: 76px !important;
  gap: 16px !important;
  padding: 12px 14px !important;
}

html.v2-layout-ready table thead th,
html.v2-layout-ready table tbody td,
html.v2-layout-ready body .view table tbody td {
  font-size: 13px !important;
}

html.v2-layout-ready table thead th {
  color: var(--zq-text-muted) !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready table tbody td {
  color: var(--zq-text-body) !important;
  line-height: 1.45 !important;
}

html.v2-layout-ready .status-badge:not(.qualification-state),
html.v2-layout-ready #contractTapeState,
html.v2-layout-ready #marketQuoteState,
html.v2-layout-ready #overview .overview-instrument-heading #marketQuoteState.status-neutral,
html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > small {
  font-size: 13px !important;
}

html.v2-layout-ready :where(
  .metric-card > span,
  .metric-card > small,
  .metric-strip > div > span,
  .metric-strip > div > small,
  .ranking-summary-strip > div > span,
  .ranking-summary-strip > div > small,
  .health-strip > div > span,
  .health-strip > div > small,
  .trade-account-strip > div > span,
  .trade-account-strip > div > small
) {
  color: var(--zq-text-muted) !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready :where(
  .metric-card > strong,
  .metric-strip > div > strong,
  .ranking-summary-strip > div > strong,
  .health-strip > div > strong,
  .trade-account-strip > div > strong
) {
  color: var(--zq-text-primary) !important;
  line-height: 1.25 !important;
}

html.v2-layout-ready .view :where(.value-positive, .status-value-up, .price-up, .text-up) {
  color: var(--zq-up) !important;
  font-weight: 650;
}

html.v2-layout-ready .view :where(.value-negative, .status-value-down, .price-down, .text-down) {
  color: var(--zq-down) !important;
  font-weight: 650;
}

html.v2-layout-ready :where(
  #marketLastPrice,
  #decisionMarketLastPrice,
  #globalLastPrice,
  #mobileLastPrice,
  #marketChangeValue,
  #marketChangePct,
  #decisionMarketChangeValue,
  #decisionMarketChangePct,
  #globalChangeSummary
).value-positive {
  color: var(--zq-up) !important;
  text-shadow: 0 0 12px rgba(255, 83, 104, .18);
}

html.v2-layout-ready :where(
  #marketLastPrice,
  #decisionMarketLastPrice,
  #globalLastPrice,
  #mobileLastPrice,
  #marketChangeValue,
  #marketChangePct,
  #decisionMarketChangeValue,
  #decisionMarketChangePct,
  #globalChangeSummary
).value-negative {
  color: var(--zq-down) !important;
  text-shadow: 0 0 12px rgba(43, 211, 155, .16);
}

html.v2-layout-ready .view :where(.status-value-good, .text-success) {
  color: var(--zq-teal) !important;
  font-weight: 650;
}

html.v2-layout-ready .view :where(.status-value-bad, .text-danger, .text-error) {
  color: var(--zq-danger) !important;
  font-weight: 650;
}

html.v2-layout-ready #decision .decision-final-insight {
  align-items: start !important;
  gap: 14px !important;
}

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

html.v2-layout-ready #decision .decision-final-outcome {
  padding: 16px 17px !important;
}

html.v2-layout-ready #decision .decision-final-outcome > p,
html.v2-layout-ready #decision .trend-report-overview :where(p, small),
html.v2-layout-ready #decision .decision-report-card :where(p, small) {
  line-height: 1.6 !important;
}

html.v2-layout-ready #decision .decision-final-outcome.is-blocked > strong,
html.v2-layout-ready #decision #decisionFinalAction.status-value-bad {
  color: var(--zq-danger) !important;
}

html.v2-layout-ready #decision .decision-final-outcome.is-executable > strong,
html.v2-layout-ready #decision #decisionFinalAction.status-value-good {
  color: var(--zq-teal) !important;
}

html.v2-layout-ready #decision .decision-final-insight .trend-report-key-status {
  height: auto !important;
  grid-template-rows: repeat(3, minmax(84px, auto)) !important;
}

html.v2-layout-ready #decision .decision-final-insight .trend-report-key-status > div {
  min-height: 84px !important;
  padding: 12px 10px !important;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step {
  min-height: 104px !important;
  padding: 10px 12px !important;
}

html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > small {
  line-height: 1.45 !important;
}

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

html.v2-layout-ready #overview .overview-timeframe-grid > article {
  height: auto !important;
  min-height: 82px !important;
  padding: 8px 9px !important;
}

html.v2-layout-ready #overview .overview-timeframe-grid > article > span,
html.v2-layout-ready #overview .overview-timeframe-grid > article > small {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready #overview .overview-timeframe-grid > article > small {
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div,
html.v2-layout-ready #models > .metric-strip .metric-card,
html.v2-layout-ready #models .metric-strip .metric-card,
html.v2-layout-ready #simulation .metric-strip .metric-card {
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 84px !important;
  max-height: none !important;
  row-gap: 4px !important;
  padding: 10px 12px !important;
  overflow: visible !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div,
html.v2-layout-ready #models .metric-strip .metric-card,
html.v2-layout-ready #simulation .metric-strip .metric-card {
  grid-template-rows: minmax(16px, auto) minmax(23px, auto) minmax(16px, auto) !important;
  align-content: center !important;
}

html.v2-layout-ready #ranking .ranking-summary-strip > div > :where(span, strong, small),
html.v2-layout-ready #models .metric-strip .metric-card > :where(span, strong, small),
html.v2-layout-ready #simulation .metric-strip .metric-card > :where(span, strong, small) {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  line-height: 1.25 !important;
}

html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress {
  height: auto !important;
  min-height: 84px !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress > span,
html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress > small {
  height: auto !important;
  min-height: 16px !important;
  max-height: none !important;
  line-height: 1.3 !important;
  overflow: visible !important;
}

html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress > strong {
  height: auto !important;
  min-height: 22px !important;
  max-height: none !important;
  line-height: 1.25 !important;
  overflow: visible !important;
}

@media (min-width: 901px) {
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll {
    overflow-y: auto !important;
    scrollbar-gutter: stable;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody tr,
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    padding-block: 2px !important;
    line-height: 1.3 !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    font-size: 12px !important;
    padding-inline: 3px !important;
    line-height: 18px !important;
  }
}

html.v2-layout-ready #models .training-queue-scroll {
  box-sizing: border-box !important;
  height: 220px !important;
  min-height: 220px !important;
  max-height: 220px !important;
}

html.v2-layout-ready #models .training-queue-scroll tbody tr,
html.v2-layout-ready #models .training-queue-scroll tbody td {
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
}

html.v2-layout-ready #models .training-queue-scroll tbody td {
  padding-block: 5px !important;
  line-height: 1.35 !important;
}

/* R50: a single text and signal contract for the whole terminal.  The
   terminal is information-dense by design, so hierarchy comes from role and
   severity rather than a collection of unrelated hard-coded colors. */
:root {
  --zq-text-primary: #f4f8fb;
  --zq-text-body: #cddce6;
  --zq-text-secondary: #a8bac7;
  --zq-text-muted: #8299aa;
  --zq-text-disabled: #60788b;
  --zq-info: #78bff0;
  --zq-status-good: #73d6c0;
  --zq-status-warn: #e3ad55;
  --zq-status-bad: #ff8492;
  --zq-up: #f05f70;
  --zq-down: #43c6a0;
  --zq-danger: #ff8492;
  --price-up: var(--zq-up);
  --price-down: var(--zq-down);
  --red: var(--zq-up);
  --green: var(--zq-down);
}

html.v2-layout-ready body,
html.v2-layout-ready .view {
  color: var(--zq-text-body) !important;
}

html.v2-layout-ready .view :where(h1, h2, h3, h4, strong, b) {
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready .view :where(p, li, dd, time) {
  color: var(--zq-text-body) !important;
}

html.v2-layout-ready .view :where(dt, small, em, code, .metric-label, .detail-meta, .helper-text, .hint, .caption, .timestamp, .table-meta) {
  color: var(--zq-text-muted) !important;
}

html.v2-layout-ready .view :where(a, .text-button) {
  color: var(--zq-info) !important;
}

html.v2-layout-ready .view :where(input, select, textarea):disabled,
html.v2-layout-ready .view :where(input, textarea)[readonly] {
  color: var(--zq-text-disabled) !important;
}

html.v2-layout-ready .nav-button {
  color: var(--zq-text-secondary) !important;
}

html.v2-layout-ready .nav-button svg {
  color: var(--zq-text-muted) !important;
}

html.v2-layout-ready .nav-button.is-active,
html.v2-layout-ready .nav-button.is-active svg,
html.v2-layout-ready .nav-button:hover,
html.v2-layout-ready .nav-button:hover svg {
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready table thead th {
  color: var(--zq-text-muted) !important;
}

html.v2-layout-ready table tbody td {
  color: var(--zq-text-body) !important;
}

html.v2-layout-ready table tbody td :where(strong, b) {
  color: var(--zq-text-primary) !important;
}

/* China-market convention: rising red and falling green.  These tones are
   intentionally brighter than the old dark red/green pair so normal-sized
   numbers remain readable against both canvas and panel surfaces. */
html.v2-layout-ready .view :where(.value-positive, .status-value-up, .price-up, .text-up),
html.v2-layout-ready :where(
  #marketLastPrice,
  #decisionMarketLastPrice,
  #globalLastPrice,
  #mobileLastPrice,
  #marketChangeValue,
  #marketChangePct,
  #decisionMarketChangeValue,
  #decisionMarketChangePct,
  #globalChangeSummary
).value-positive {
  color: var(--zq-up) !important;
  font-weight: 650;
}

html.v2-layout-ready .view :where(.value-negative, .status-value-down, .price-down, .text-down),
html.v2-layout-ready :where(
  #marketLastPrice,
  #decisionMarketLastPrice,
  #globalLastPrice,
  #mobileLastPrice,
  #marketChangeValue,
  #marketChangePct,
  #decisionMarketChangeValue,
  #decisionMarketChangePct,
  #globalChangeSummary
).value-negative {
  color: var(--zq-down) !important;
  font-weight: 650;
}

/* State grammar: severity is carried by text, icon and a left rule, never by
   color alone.  This makes blockers discoverable for color-blind users and
   keeps the eye on the highest-priority problem in a dense panel. */
html.v2-layout-ready .status-badge.status-good:not(.qualification-state),
html.v2-layout-ready .status-badge.qualification-state[data-qualification-state="passed"] {
  color: var(--zq-status-good) !important;
  border-left: 3px solid var(--zq-status-good) !important;
}

html.v2-layout-ready .status-badge.status-warn:not(.qualification-state),
html.v2-layout-ready .status-badge.qualification-state:is([data-qualification-state="pending"], [data-qualification-state="incomplete"]) {
  color: var(--zq-status-warn) !important;
  border-left: 3px solid var(--zq-status-warn) !important;
}

html.v2-layout-ready .status-badge.status-blocked:not(.qualification-state),
html.v2-layout-ready .status-badge.status-bad:not(.qualification-state),
html.v2-layout-ready .status-badge.qualification-state:is([data-qualification-state="below-standard"], [data-qualification-state="missing"]) {
  color: var(--zq-status-bad) !important;
  border-left: 3px solid var(--zq-status-bad) !important;
}

html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state),
html.v2-layout-ready .status-badge.qualification-state[data-qualification-state="not-applicable"] {
  color: var(--zq-text-secondary) !important;
}

html.v2-layout-ready :where(.plan-blocker, .warning-note, .conflict-row, .trade-mode-gate, #tradeModeGateDetail) {
  border-left: 3px solid var(--zq-status-warn) !important;
  color: var(--zq-text-secondary) !important;
}

html.v2-layout-ready :where(.plan-blocker.is-blocked, .detail-note.status-bad, .status-value-bad, .text-danger, .text-error) {
  border-left-color: var(--zq-status-bad) !important;
  color: var(--zq-status-bad) !important;
}

html.v2-layout-ready :where(.status-value-good, .text-success, .capability-ok, .analysis-data-ready) {
  color: var(--zq-status-good) !important;
}

html.v2-layout-ready :where(.value-warning, .status-value-warn, .text-warning, .analysis-data-limited) {
  color: var(--zq-status-warn) !important;
}

html.v2-layout-ready :where(.quant-capability-card[data-state="ready"], .quant-capability-card[data-state="metadata_only"], .quant-capability-card[data-state="awaiting_pit_panel"], .quant-capability-card[data-state="degraded"], .quant-capability-card[data-state="blocked"], .quant-capability-card[data-state="unavailable"]) {
  border-left-width: 3px !important;
}

html.v2-layout-ready .quant-capability-card[data-state="ready"] { border-left-color: var(--zq-status-good) !important; }
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(--zq-status-warn) !important; }
html.v2-layout-ready .quant-capability-card[data-state="blocked"],
html.v2-layout-ready .quant-capability-card[data-state="unavailable"] { border-left-color: var(--zq-status-bad) !important; }

/* ID-level legacy selectors used by the quote tape must also resolve to the
   accessible direction colors above. */
html.v2-layout-ready #marketLastPrice.value-positive,
html.v2-layout-ready #decisionMarketLastPrice.value-positive,
html.v2-layout-ready #globalLastPrice.value-positive,
html.v2-layout-ready #mobileLastPrice.value-positive,
html.v2-layout-ready #marketChangeValue.value-positive,
html.v2-layout-ready #marketChangePct.value-positive,
html.v2-layout-ready #decisionMarketChangeValue.value-positive,
html.v2-layout-ready #decisionMarketChangePct.value-positive,
html.v2-layout-ready #globalChangeSummary.value-positive {
  color: var(--zq-up) !important;
}

html.v2-layout-ready #marketLastPrice.value-negative,
html.v2-layout-ready #decisionMarketLastPrice.value-negative,
html.v2-layout-ready #globalLastPrice.value-negative,
html.v2-layout-ready #mobileLastPrice.value-negative,
html.v2-layout-ready #marketChangeValue.value-negative,
html.v2-layout-ready #marketChangePct.value-negative,
html.v2-layout-ready #decisionMarketChangeValue.value-negative,
html.v2-layout-ready #decisionMarketChangePct.value-negative,
html.v2-layout-ready #globalChangeSummary.value-negative {
  color: var(--zq-down) !important;
}

html.v2-layout-ready .system-ribbon > :where(.environment-banner, .top-status-item) {
  min-width: 0 !important;
  overflow: hidden !important;
}

html.v2-layout-ready .system-ribbon .environment-banner,
html.v2-layout-ready .system-ribbon .environment-banner > :where(strong, span),
html.v2-layout-ready .system-ribbon .top-status-item > :where(span, strong),
html.v2-layout-ready .system-ribbon .top-status-item > strong > span {
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html.v2-layout-ready #decision .decision-final-layer > .direction-summary {
  height: auto !important;
  min-height: 96px !important;
  max-height: none !important;
  align-items: stretch !important;
}

html.v2-layout-ready #decision .decision-final-layer .direction-main {
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 96px !important;
  max-height: none !important;
  padding: 8px 10px !important;
  overflow: visible !important;
}

html.v2-layout-ready #decision .decision-final-layer .evidence-split {
  height: auto !important;
  min-height: 96px !important;
  max-height: none !important;
}

html.v2-layout-ready #decision .decision-final-layer .evidence-split > div {
  padding: 8px 9px !important;
}

html.v2-layout-ready :where(#overview, #decision) .intraday-signal-strip > div {
  min-height: 82px !important;
  padding: 10px 11px !important;
  row-gap: 3px !important;
}

html.v2-layout-ready :where(#overview, #decision) .intraday-signal-strip :where(span, small) {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready #operations .status-badge:not(.qualification-state) {
  font-size: 13px !important;
}

html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge:not(.qualification-state) {
  font-size: 13px !important;
}

@media (min-width: 901px) {
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(1) { width: 25% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(2) { width: 14% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(3) { width: 21% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(4) { width: 32% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(5) { width: 8% !important; }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge:not(.qualification-state) {
    padding-inline: 2px !important;
  }
}

/* Global issue radar: a compact, source-backed triage surface shared by all
   workspaces. Priority is carried by the badge and rule so severity remains
   legible without relying on colour alone. */
html.v2-layout-ready .issue-radar {
  margin: 12px 22px 0;
  padding: 12px 14px 13px;
  border: 1px solid var(--zq-line);
  border-left: 3px solid var(--zq-line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 36, 59, .96), rgba(9, 27, 45, .96));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
html.v2-layout-ready #operations .issue-radar { margin: 0 0 14px; }

html.v2-layout-ready .issue-radar-heading,
html.v2-layout-ready .issue-radar-title,
html.v2-layout-ready .issue-radar-actions,
html.v2-layout-ready .issue-radar-item {
  display: flex;
  align-items: center;
}

html.v2-layout-ready .issue-radar-heading {
  justify-content: space-between;
  gap: 12px;
}

html.v2-layout-ready .issue-radar-title { min-width: 0; gap: 9px; }
html.v2-layout-ready .issue-radar-title > div { min-width: 0; }
html.v2-layout-ready .issue-radar-title h2 {
  margin: 0;
  color: var(--zq-text-primary);
  font-size: 15px;
  line-height: 1.35;
}
html.v2-layout-ready .issue-radar-title p {
  margin: 2px 0 0;
  color: var(--zq-text-muted);
  font-size: 12px;
  line-height: 1.35;
}
html.v2-layout-ready .issue-radar-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #2c6385;
  border-radius: 6px;
  color: var(--zq-link);
  background: rgba(30, 87, 123, .24);
}
html.v2-layout-ready .issue-radar-mark svg { width: 16px; height: 16px; }
html.v2-layout-ready .issue-radar-actions { gap: 10px; flex: 0 0 auto; }
html.v2-layout-ready .issue-radar-actions .text-button { min-height: 28px; padding-inline: 4px; }

html.v2-layout-ready .issue-radar-summary {
  display: grid;
  grid-template-columns: minmax(112px, .75fr) minmax(128px, .9fr) minmax(122px, .8fr) minmax(260px, 1.7fr);
  gap: 8px;
  margin-top: 10px;
}
html.v2-layout-ready .issue-radar-severity,
html.v2-layout-ready .issue-radar-headline {
  min-width: 0;
  min-height: 55px;
  padding: 8px 10px;
  border: 1px solid var(--zq-line);
  border-left-width: 3px;
  background: rgba(5, 18, 30, .38);
}
html.v2-layout-ready .issue-radar-severity { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; }
html.v2-layout-ready .issue-radar-severity span,
html.v2-layout-ready .issue-radar-headline span { color: var(--zq-text-muted); font-size: 11px; line-height: 1.25; }
html.v2-layout-ready .issue-radar-severity strong { font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
html.v2-layout-ready .issue-radar-severity small,
html.v2-layout-ready .issue-radar-headline small { grid-column: 1 / -1; color: var(--zq-text-secondary); font-size: 11px; line-height: 1.3; }
html.v2-layout-ready .severity-p0 { border-left-color: var(--zq-status-bad); }
html.v2-layout-ready .severity-p0 strong { color: var(--zq-status-bad); }
html.v2-layout-ready .severity-p1 { border-left-color: var(--zq-status-warn); }
html.v2-layout-ready .severity-p1 strong { color: var(--zq-status-warn); }
html.v2-layout-ready .severity-p2 { border-left-color: var(--zq-link); }
html.v2-layout-ready .severity-p2 strong { color: var(--zq-link); }
html.v2-layout-ready .issue-radar-headline { display: grid; align-content: center; border-left-color: var(--zq-link); }
html.v2-layout-ready .issue-radar-headline strong { margin-top: 2px; color: var(--zq-text-primary); font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

html.v2-layout-ready .issue-radar-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}
html.v2-layout-ready .issue-radar-item {
  min-width: 0;
  min-height: 62px;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--zq-line);
  border-left-width: 3px;
  background: rgba(6, 19, 33, .44);
}
html.v2-layout-ready .issue-p0 { border-left-color: var(--zq-status-bad); }
html.v2-layout-ready .issue-p1 { border-left-color: var(--zq-status-warn); }
html.v2-layout-ready .issue-p2 { border-left-color: var(--zq-link); }
html.v2-layout-ready .issue-radar-priority {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 22px;
  flex: 0 0 30px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
html.v2-layout-ready .issue-p0 .issue-radar-priority { color: var(--zq-status-bad); }
html.v2-layout-ready .issue-p1 .issue-radar-priority { color: var(--zq-status-warn); }
html.v2-layout-ready .issue-p2 .issue-radar-priority { color: var(--zq-link); }
html.v2-layout-ready .issue-radar-copy { display: grid; min-width: 0; gap: 2px; flex: 1 1 auto; }
html.v2-layout-ready .issue-radar-copy strong,
html.v2-layout-ready .issue-radar-copy span,
html.v2-layout-ready .issue-radar-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.v2-layout-ready .issue-radar-copy strong { color: var(--zq-text-primary); font-size: 12px; line-height: 1.35; }
html.v2-layout-ready .issue-radar-copy span { color: var(--zq-text-body); font-size: 11px; line-height: 1.35; }
html.v2-layout-ready .issue-radar-copy small { color: var(--zq-text-muted); font-size: 11px; line-height: 1.35; }
html.v2-layout-ready .issue-radar-action { flex: 0 0 auto; min-height: 24px; padding: 0 2px; gap: 3px; font-size: 11px; }
html.v2-layout-ready .issue-radar-action svg { width: 13px; height: 13px; }
html.v2-layout-ready .issue-radar-more,
html.v2-layout-ready .issue-radar-empty { grid-column: 1 / -1; }
html.v2-layout-ready .issue-radar-more { justify-content: center; min-height: 26px; padding: 3px; border-top: 1px solid var(--zq-line); color: var(--zq-link); font-size: 11px; }
html.v2-layout-ready .issue-radar-empty { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; color: var(--zq-text-muted); font-size: 12px; }
html.v2-layout-ready .issue-radar-empty.is-clear { color: var(--zq-status-good); border-top: 1px solid var(--zq-line); }
html.v2-layout-ready .issue-radar-empty svg { width: 15px; height: 15px; }

@media (max-width: 900px) {
  html.v2-layout-ready .issue-radar { margin: 8px 10px 0; padding: 10px; }
  html.v2-layout-ready #operations .issue-radar { margin: 0 0 10px; }
  html.v2-layout-ready .issue-radar-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.v2-layout-ready .issue-radar-headline { grid-column: 1 / -1; min-height: 50px; }
  html.v2-layout-ready .issue-radar-list { grid-template-columns: 1fr; }
  html.v2-layout-ready .issue-radar-item { min-height: 58px; }
}

@media (max-width: 560px) {
  html.v2-layout-ready .issue-radar-heading { align-items: flex-start; }
  html.v2-layout-ready .issue-radar-actions .text-button { font-size: 0; }
  html.v2-layout-ready .issue-radar-actions .text-button svg { margin: 0; }
  html.v2-layout-ready .issue-radar-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  html.v2-layout-ready .issue-radar-severity { min-height: 50px; padding: 7px; }
  html.v2-layout-ready .issue-radar-severity span { font-size: 11px; }
  html.v2-layout-ready .issue-radar-severity strong { font-size: 18px; }
  html.v2-layout-ready .issue-radar-severity small { font-size: 11px; }
  html.v2-layout-ready .issue-radar-copy small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* Decision evidence chain: conclusion and permission are deliberately
   separated so a directional diagnosis cannot be mistaken for an order. */
html.v2-layout-ready #decision .decision-evidence-chain {
  margin: 10px 0 12px;
  padding: 11px;
  border: 1px solid var(--zq-line);
  border-left: 3px solid var(--zq-link);
  background: rgba(6, 21, 36, .52);
}
html.v2-layout-ready #decision .decision-evidence-chain-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
html.v2-layout-ready #decision .decision-evidence-chain-heading > div > span {
  color: var(--zq-link);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
html.v2-layout-ready #decision .decision-evidence-chain-heading h3 {
  margin: 2px 0 0;
  color: var(--zq-text-primary);
  font-size: 14px;
  line-height: 1.35;
}
html.v2-layout-ready #decision .decision-evidence-chain-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
html.v2-layout-ready #decision .decision-evidence-step {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  min-height: 92px;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--zq-line);
  border-left: 3px solid var(--zq-line-strong);
  background: rgba(10, 29, 49, .72);
}
html.v2-layout-ready #decision .decision-evidence-step.is-ready { border-left-color: var(--zq-status-good); }
html.v2-layout-ready #decision .decision-evidence-step.is-limited { border-left-color: var(--zq-status-warn); }
html.v2-layout-ready #decision .decision-evidence-step.is-blocked { border-left-color: var(--zq-status-bad); }
html.v2-layout-ready #decision .decision-evidence-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 22px;
  flex: 0 0 26px;
  border: 1px solid var(--zq-line-strong);
  border-radius: 3px;
  color: var(--zq-text-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
html.v2-layout-ready #decision .decision-evidence-step > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}
html.v2-layout-ready #decision .decision-evidence-step > div > span {
  color: var(--zq-text-muted);
  font-size: 11px;
  line-height: 1.25;
}
html.v2-layout-ready #decision .decision-evidence-step strong {
  color: var(--zq-text-primary);
  font-size: 12px;
  line-height: 1.4;
}
html.v2-layout-ready #decision .decision-evidence-step small {
  color: var(--zq-text-secondary);
  font-size: 11px;
  line-height: 1.4;
}
html.v2-layout-ready #decision .decision-availability-strip,
html.v2-layout-ready #decision .decision-freshness-strip {
  display: grid;
  gap: 1px;
  margin-top: 7px;
  border: 1px solid var(--zq-line);
  background: var(--zq-line);
}
html.v2-layout-ready #decision .decision-availability-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html.v2-layout-ready #decision .decision-freshness-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html.v2-layout-ready #decision :where(.decision-availability-strip, .decision-freshness-strip) > div {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 7px 9px;
  background: var(--zq-surface);
}
html.v2-layout-ready #decision :where(.decision-availability-strip, .decision-freshness-strip) span {
  color: var(--zq-text-muted);
  font-size: 11px;
  line-height: 1.25;
}
html.v2-layout-ready #decision :where(.decision-availability-strip, .decision-freshness-strip) strong {
  min-width: 0;
  color: var(--zq-text-primary);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.v2-layout-ready #decision .decision-freshness-strip small {
  color: var(--zq-text-secondary);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  html.v2-layout-ready #decision .decision-evidence-chain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.v2-layout-ready #decision .decision-freshness-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  html.v2-layout-ready #decision .decision-evidence-chain { padding: 9px; }
  html.v2-layout-ready #decision .decision-evidence-chain-grid,
  html.v2-layout-ready #decision .decision-availability-strip,
  html.v2-layout-ready #decision .decision-freshness-strip { grid-template-columns: 1fr; }
  html.v2-layout-ready #decision .decision-evidence-step { min-height: 76px; }
  html.v2-layout-ready #decision :where(.decision-availability-strip, .decision-freshness-strip) strong,
  html.v2-layout-ready #decision .decision-freshness-strip small { white-space: normal; }
}

/* R58: final readability, signal and content-height closure. */
:root {
  --zq-text-primary: #f4f8fb;
  --zq-text-body: #c8d7e2;
  --zq-text-secondary: #a2b5c3;
  --zq-text-muted: #8299aa;
  --zq-status-good: #86dfcc;
  --zq-status-warn: #f2cb78;
  --zq-status-bad: #ff8a98;
  --zq-up: #ff6679;
  --zq-down: #35d6a3;
  --zq-danger: #ff8a98;
  --price-up: var(--zq-up);
  --price-down: var(--zq-down);
  --red: var(--zq-up);
  --green: var(--zq-down);
  --chart-level-pressure: #9a858b;
  --chart-level-support: #718b85;
}

/* Primary conclusions stay bright; descriptive copy steps back one level and
   provenance, timestamps and hints form the quietest readable tier. */
html.v2-layout-ready .view :where(h1, h2, h3, h4, strong, b) {
  color: var(--zq-text-primary) !important;
}

html.v2-layout-ready .view :where(p, li, dd, time) {
  color: var(--zq-text-body) !important;
}

html.v2-layout-ready .view :where(
  dt, small, em, code, .metric-label, .detail-meta, .helper-text,
  .hint, .caption, .timestamp, .table-meta
) {
  color: var(--zq-text-muted) !important;
}

html.v2-layout-ready .view :where(.value-positive, .status-value-up, .price-up, .text-up),
html.v2-layout-ready :where(
  #marketLastPrice, #decisionMarketLastPrice, #globalLastPrice, #mobileLastPrice,
  #marketChangeValue, #marketChangePct, #decisionMarketChangeValue,
  #decisionMarketChangePct, #globalChangeSummary
).value-positive {
  color: var(--zq-up) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px rgba(255, 102, 121, .16);
}

html.v2-layout-ready .view :where(.value-negative, .status-value-down, .price-down, .text-down),
html.v2-layout-ready :where(
  #marketLastPrice, #decisionMarketLastPrice, #globalLastPrice, #mobileLastPrice,
  #marketChangeValue, #marketChangePct, #decisionMarketChangeValue,
  #decisionMarketChangePct, #globalChangeSummary
).value-negative {
  color: var(--zq-down) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px rgba(53, 214, 163, .14);
}

html.v2-layout-ready :where(.status-value-good, .text-success, .capability-ok, .analysis-data-ready) {
  color: var(--zq-status-good) !important;
}

html.v2-layout-ready :where(.status-value-bad, .text-danger, .text-error) {
  color: var(--zq-status-bad) !important;
}

html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state) {
  color: #b6c8d4 !important;
}

/* Six live-period cards grow with the 13px evidence copy. The legacy 140px
   grid row was the remaining source of clipped timestamps and conclusions. */
html.v2-layout-ready #overview .overview-timeframe-matrix,
html.v2-layout-ready #overview .overview-timeframe-grid {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #overview .overview-timeframe-grid > article {
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 154px !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #overview .dashboard-grid,
html.v2-layout-ready #overview .market-panel,
html.v2-layout-ready #overview .dashboard-side-column {
  height: auto !important;
  max-height: none !important;
}

html.v2-layout-ready #overview .dashboard-grid {
  grid-template-rows: auto !important;
  align-items: stretch !important;
}

html.v2-layout-ready #overview .dashboard-side-column {
  align-self: stretch !important;
}

/* Event evidence remains bounded and scrollable, but now ends inside the
   application viewport instead of extending below the navigation baseline. */
@media (min-width: 1041px) {
  html.v2-layout-ready #events .event-layout,
  html.v2-layout-ready #events > .v2-primary-workspace {
    box-sizing: border-box !important;
    height: calc(100dvh - 286px) !important;
    min-height: 420px !important;
    max-height: none !important;
  }

  html.v2-layout-ready #events .timeline-panel,
  html.v2-layout-ready #events .event-risk-panel {
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}

/* Long recovery evidence is concise in copy and may wrap as a last resort.
   The control column remains fixed so its icon never collides with status. */
@media (min-width: 901px) and (max-width: 1499px) {
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(1) { width: 23% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(2) { width: 13% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(3) { width: 19% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(4) { width: 37% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(5) { width: 8% !important; }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge:not(.qualification-state) {
    width: auto !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

/* The issue radar is secondary operational evidence. It uses the shared 13px
   assist scale and four columns on wide screens to avoid a dominant tall block. */
html.v2-layout-ready .issue-radar :where(
  .issue-radar-title p, .issue-radar-severity span, .issue-radar-severity small,
  .issue-radar-headline span, .issue-radar-headline small, .issue-radar-copy strong,
  .issue-radar-copy span, .issue-radar-copy small, .issue-radar-priority,
  .issue-radar-action, .issue-radar-more, .issue-radar-empty
) {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

@media (min-width: 1181px) {
  html.v2-layout-ready .issue-radar-list {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  html.v2-layout-ready .issue-radar-item {
    min-height: 70px !important;
  }
}

/* The decision evidence chain was added after the shared type pass. Bring it
   onto the 13px assist scale and let long freshness evidence wrap naturally. */
html.v2-layout-ready #decision :where(
  .decision-evidence-chain-heading > div > span,
  .decision-evidence-index,
  .decision-evidence-step > div > span,
  .decision-evidence-step strong,
  .decision-evidence-step small,
  .decision-availability-strip span,
  .decision-availability-strip strong,
  .decision-freshness-strip span,
  .decision-freshness-strip strong,
  .decision-freshness-strip small
) {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready #decision .decision-evidence-step {
  height: auto !important;
  min-height: 112px !important;
}

html.v2-layout-ready #decision :where(
  .decision-availability-strip strong,
  .decision-freshness-strip strong,
  .decision-freshness-strip small
) {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

html.v2-layout-ready #overview .overview-freshness-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 1px;
  margin-top: 8px;
  border: 1px solid var(--zq-line);
  background: var(--zq-line);
}
html.v2-layout-ready #overview .overview-freshness-strip > div {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 7px 9px;
  background: rgba(7, 24, 40, .92);
}
html.v2-layout-ready #overview .overview-freshness-strip span {
  color: var(--zq-text-muted);
  font-size: 11px;
  line-height: 1.25;
}
html.v2-layout-ready #overview .overview-freshness-strip strong {
  min-width: 0;
  color: var(--zq-text-primary);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.v2-layout-ready #overview .overview-freshness-strip small {
  color: var(--zq-text-secondary);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.v2-layout-ready #overview .overview-freshness-strip > .text-button {
  min-width: 120px;
  padding: 0 10px;
  justify-content: center;
  background: rgba(7, 24, 40, .92);
  font-size: 11px;
}

@media (max-width: 1100px) {
  html.v2-layout-ready #overview .overview-freshness-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.v2-layout-ready #overview .overview-freshness-strip > .text-button { grid-column: 1 / -1; min-height: 30px; }
}

@media (max-width: 560px) {
  html.v2-layout-ready #overview .overview-freshness-strip { grid-template-columns: 1fr; }
  html.v2-layout-ready #overview .overview-freshness-strip > .text-button { grid-column: auto; }
  html.v2-layout-ready #overview .overview-freshness-strip strong,
  html.v2-layout-ready #overview .overview-freshness-strip small { white-space: normal; }
}

/* R63: freshness is supporting telemetry, so it follows the market tape
   instead of becoming a third column in the instrument banner. */
html.v2-layout-ready #overview .overview-market-data {
  display: grid;
  grid-template-rows: auto auto;
  min-width: 0;
  align-self: stretch;
}
html.v2-layout-ready #overview .overview-freshness-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto !important;
  min-width: 0;
  margin-top: 1px !important;
  border-top: 0 !important;
}
html.v2-layout-ready #overview .overview-freshness-strip > div {
  min-height: 0 !important;
  align-content: center !important;
  padding: 5px 8px !important;
}
html.v2-layout-ready #overview .overview-freshness-strip :where(span, strong, small) {
  font-size: 11px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}
html.v2-layout-ready #overview .overview-freshness-strip > .text-button {
  min-width: 108px !important;
  min-height: 0 !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}

/* Keep the decision report's evidence cards at the same height. Freshness is
   rendered as a compact status rail beside the evidence-chain heading. */
html.v2-layout-ready #decision .decision-evidence-chain-heading {
  align-items: flex-start;
}
html.v2-layout-ready #decision .decision-evidence-chain-status {
  display: flex;
  min-width: 0;
  max-width: min(64%, 680px);
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 12px;
  margin: 0;
  border: 0;
  background: transparent;
}
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip > div {
  display: grid;
  grid-template-columns: auto minmax(0, auto);
  grid-template-rows: auto auto;
  min-width: 92px;
  gap: 1px 5px;
  padding: 0;
  background: transparent;
}
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip span {
  grid-column: 1;
  grid-row: 1;
  font-size: 11px !important;
  line-height: 1.2 !important;
}
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 11px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip small {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: 150px;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

@media (max-width: 1100px) {
  html.v2-layout-ready #overview .overview-freshness-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html.v2-layout-ready #overview .overview-freshness-strip > .text-button {
    grid-column: 1 / -1 !important;
    min-height: 28px !important;
  }
  html.v2-layout-ready #decision .decision-evidence-chain-status {
    max-width: 58%;
  }
}

@media (max-width: 560px) {
  html.v2-layout-ready #overview .overview-freshness-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html.v2-layout-ready #overview .overview-freshness-strip > .text-button {
    grid-column: 1 / -1 !important;
  }
  html.v2-layout-ready #overview .overview-freshness-strip :where(strong, small) {
    white-space: normal !important;
  }
  html.v2-layout-ready #decision .decision-evidence-chain-heading {
    flex-direction: column;
    gap: 8px;
  }
  html.v2-layout-ready #decision .decision-evidence-chain-status {
    width: 100%;
    max-width: none;
    align-items: stretch;
  }
  html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 6px 10px;
  }
  html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip > div {
    min-width: 0;
  }
  html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip small {
    max-width: 100%;
  }
  html.v2-layout-ready #decision .decision-evidence-chain-status > .status-badge {
    align-self: flex-start;
  }
}

/* R59: regression closure for the shared terminal contract. */
:root {
  --zq-status-good: #91ead7;
  --zq-status-warn: #ffd98f;
  --zq-up: #c53240;
  --zq-down: #007f59;
  --price-up: var(--zq-up);
  --price-down: var(--zq-down);
  --red: var(--zq-up);
  --green: var(--zq-down);
}

html.v2-layout-ready :where(
  #marketLastPrice, #decisionMarketLastPrice, #globalLastPrice, #mobileLastPrice,
  #marketChangeValue, #marketChangePct, #decisionMarketChangeValue,
  #decisionMarketChangePct, #globalChangeSummary
).value-positive {
  color: var(--zq-up) !important;
  text-shadow: none !important;
}

html.v2-layout-ready :where(
  #marketLastPrice, #decisionMarketLastPrice, #globalLastPrice, #mobileLastPrice,
  #marketChangeValue, #marketChangePct, #decisionMarketChangeValue,
  #decisionMarketChangePct, #globalChangeSummary
).value-negative {
  color: var(--zq-down) !important;
  text-shadow: none !important;
}

html.v2-layout-ready #contractTapeState,
html.v2-layout-ready #marketQuoteState,
html.v2-layout-ready #overview .overview-instrument-heading #marketQuoteState.status-neutral,
html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > small {
  font-size: 13px !important;
}

html.v2-layout-ready #models .model-layout thead th {
  font-size: 13px !important;
}

@media (min-width: 721px) {
  html.v2-layout-ready #ranking .ranking-summary-strip > div,
  html.v2-layout-ready #models > .metric-strip .metric-card,
  html.v2-layout-ready #models .metric-strip .metric-card,
  html.v2-layout-ready #simulation > .metric-strip .metric-card,
  html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    height: 74px !important;
    min-height: 74px !important;
    max-height: 74px !important;
    gap: 2px !important;
    padding: 5px 10px !important;
    overflow: hidden !important;
  }

  html.v2-layout-ready #ranking .ranking-summary-strip > div > :where(span, strong, small),
  html.v2-layout-ready #models .metric-strip .metric-card > :where(span, strong, small),
  html.v2-layout-ready #simulation .metric-strip .metric-card > :where(span, strong, small),
  html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress > :where(span, strong, small) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html.v2-layout-ready #decision .decision-final-layer > .direction-summary {
    box-sizing: border-box !important;
    height: var(--desktop-summary-strip-height) !important;
    min-height: var(--desktop-summary-strip-height) !important;
    max-height: var(--desktop-summary-strip-height) !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .direction-main,
  html.v2-layout-ready #decision .decision-final-layer .evidence-split {
    box-sizing: border-box !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .direction-main {
    padding: 4px 8px !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .direction-main > :where(span, small) {
    font-size: 13px !important;
    line-height: 1.1 !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .direction-main > strong {
    margin: 1px 0 !important;
    font-size: 20px !important;
    line-height: 1.05 !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .evidence-split {
    grid-template-rows: minmax(0, 1fr) !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .evidence-split > div {
    padding: 2px 7px !important;
    overflow: hidden !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .evidence-split span {
    font-size: 13px !important;
    line-height: 1.1 !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .evidence-split strong {
    margin-top: 1px !important;
    font-size: 15px !important;
    line-height: 1.05 !important;
  }
}

@media (min-width: 1041px) {
  html.v2-layout-ready #events > .page-heading {
    box-sizing: border-box !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding-block: 0 !important;
    overflow: hidden !important;
  }

  html.v2-layout-ready #events .event-layout,
  html.v2-layout-ready #events > .v2-primary-workspace {
    box-sizing: border-box !important;
    height: calc(100dvh - 250px) !important;
    min-height: 520px !important;
    max-height: none !important;
  }

  html.v2-layout-ready #events .timeline-panel,
  html.v2-layout-ready #events .event-risk-panel {
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}

@media (min-width: 901px) {
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll {
    overflow-y: auto !important;
    scrollbar-gutter: auto !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody tr,
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    box-sizing: border-box !important;
    height: 27px !important;
    min-height: 27px !important;
    max-height: 27px !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    padding-block: 0 !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge:not(.qualification-state) {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding-inline: 2px !important;
    font-size: 12px !important;
    line-height: 18px !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(1) { width: 23% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(2) { width: 15% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(3) { width: 23% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(4) { width: 31% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(5) { width: 8% !important; }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll :is(th, td):nth-child(2) {
    padding-inline: 0 !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll :is(th, td):nth-child(3) {
    padding-inline: 6px !important;
  }
}

/* R60: authoritative final layer for the user-approved readable contract. */
:root {
  --zq-status-good: #86dfcc;
  --zq-status-warn: #f2cb78;
  --zq-status-bad: #ff8a98;
  --zq-up: #ff6679;
  --zq-down: #35d6a3;
  --zq-danger: #ff8a98;
  --price-up: var(--zq-up);
  --price-down: var(--zq-down);
  --red: var(--zq-up);
  --green: var(--zq-down);
  --chart-level-pressure: #9a858b;
  --chart-level-support: #718b85;
}

html.v2-layout-ready :where(
  #marketLastPrice, #decisionMarketLastPrice, #globalLastPrice, #mobileLastPrice,
  #marketChangeValue, #marketChangePct, #decisionMarketChangeValue,
  #decisionMarketChangePct, #globalChangeSummary
).value-positive {
  color: var(--zq-up) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px rgba(255, 102, 121, .16) !important;
}

html.v2-layout-ready :where(
  #marketLastPrice, #decisionMarketLastPrice, #globalLastPrice, #mobileLastPrice,
  #marketChangeValue, #marketChangePct, #decisionMarketChangeValue,
  #decisionMarketChangePct, #globalChangeSummary
).value-negative {
  color: var(--zq-down) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px rgba(53, 214, 163, .14) !important;
}

html.v2-layout-ready #contractTapeState,
html.v2-layout-ready #marketQuoteState,
html.v2-layout-ready #overview .overview-instrument-heading #marketQuoteState.status-neutral,
html.v2-layout-ready #decision .decision-execution-layer .decision-pipeline-step > small,
html.v2-layout-ready #models .model-layout thead th,
html.v2-layout-ready #operations .status-badge:not(.qualification-state) {
  font-size: 13px !important;
}

html.v2-layout-ready .status-badge.status-neutral:not(.qualification-state) {
  color: #b6c8d4 !important;
}

html.v2-layout-ready #overview .overview-freshness-strip > div {
  min-height: 68px !important;
  align-content: center !important;
  padding: 8px 10px !important;
}

html.v2-layout-ready #overview .overview-freshness-strip :where(span, strong, small),
html.v2-layout-ready #overview .overview-freshness-strip > .text-button {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

html.v2-layout-ready #overview .overview-freshness-strip :where(strong, small) {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

@media (min-width: 721px) {
  html.v2-layout-ready #ranking .ranking-summary-strip > div,
  html.v2-layout-ready #models > .metric-strip .metric-card,
  html.v2-layout-ready #models .metric-strip .metric-card,
  html.v2-layout-ready #simulation > .metric-strip .metric-card,
  html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 84px !important;
    max-height: none !important;
    gap: 4px !important;
    padding: 10px 12px !important;
    overflow: visible !important;
  }

  html.v2-layout-ready #ranking .ranking-summary-strip > div > :where(span, strong, small),
  html.v2-layout-ready #models .metric-strip .metric-card > :where(span, strong, small),
  html.v2-layout-ready #simulation .metric-strip .metric-card > :where(span, strong, small),
  html.v2-layout-ready #orders #simulation .metric-card.v2-has-progress > :where(span, strong, small) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    line-height: 1.3 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  html.v2-layout-ready #decision .decision-final-layer > .direction-summary,
  html.v2-layout-ready #decision .decision-final-layer .direction-main,
  html.v2-layout-ready #decision .decision-final-layer .evidence-split {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 96px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .direction-main {
    padding: 8px 10px !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .evidence-split {
    grid-template-rows: auto !important;
  }

  html.v2-layout-ready #decision .decision-final-layer .evidence-split > div {
    padding: 8px 9px !important;
    overflow: visible !important;
  }
}

@media (min-width: 1041px) {
  html.v2-layout-ready #events > .page-heading {
    height: 76px !important;
    min-height: 76px !important;
    max-height: none !important;
    padding: 12px 14px !important;
    overflow: visible !important;
  }

  html.v2-layout-ready #events .event-layout,
  html.v2-layout-ready #events > .v2-primary-workspace {
    box-sizing: border-box !important;
    height: calc(100dvh - 286px) !important;
    min-height: 420px !important;
    max-height: none !important;
  }
}

@media (min-width: 901px) {
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll {
    overflow-y: auto !important;
    scrollbar-gutter: stable !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody tr,
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    box-sizing: border-box !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
    padding-block: 2px !important;
    line-height: 1.3 !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge:not(.qualification-state) {
    width: auto !important;
    max-width: 100% !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding-inline: 2px !important;
    font-size: 13px !important;
    line-height: 18px !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(1) { width: 23% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(2) { width: 13% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(3) { width: 19% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(4) { width: 37% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(5) { width: 8% !important; }
}

html.v2-layout-ready #marketLastPrice.value-positive,
html.v2-layout-ready #decisionMarketLastPrice.value-positive,
html.v2-layout-ready #globalLastPrice.value-positive,
html.v2-layout-ready #mobileLastPrice.value-positive {
  color: #ff6679 !important;
}

html.v2-layout-ready #marketLastPrice.value-negative,
html.v2-layout-ready #decisionMarketLastPrice.value-negative,
html.v2-layout-ready #globalLastPrice.value-negative,
html.v2-layout-ready #mobileLastPrice.value-negative {
  color: #35d6a3 !important;
}

/* R61: keep complete operation metadata readable at compact desktop widths. */
@media (min-width: 901px) and (max-width: 1499px) {
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(1) { width: 20% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(2) { width: 15% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(3) { width: 20% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(4) { width: 37% !important; }
  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll th:nth-child(5) { width: 8% !important; }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td:nth-child(1) {
    padding-inline: 8px !important;
  }

  html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge:not(.qualification-state) {
    padding-inline: 0 !important;
  }
}

/* R63 final cascade: the shared 13px readability pass must not turn compact
   freshness telemetry back into full-height report cards. */
html.v2-layout-ready #overview .overview-freshness-strip > div {
  min-height: 0 !important;
  padding: 5px 8px !important;
}
html.v2-layout-ready #overview .overview-freshness-strip span,
html.v2-layout-ready #overview .overview-freshness-strip small {
  font-size: 11px !important;
  line-height: 1.25 !important;
}
html.v2-layout-ready #overview .overview-freshness-strip strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-variant-numeric: tabular-nums;
}
html.v2-layout-ready #overview .overview-freshness-strip small {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
html.v2-layout-ready #overview .overview-freshness-strip > .text-button {
  min-height: 0 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip span,
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip small {
  font-size: 11px !important;
  line-height: 1.25 !important;
}
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-variant-numeric: tabular-nums;
}
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip small {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 560px) {
  html.v2-layout-ready #overview .overview-freshness-strip :where(strong, small) {
    white-space: normal !important;
  }
}

/* R64: readable telemetry without promoting it above price and conclusions. */
html.v2-layout-ready #overview .overview-freshness-strip > div {
  min-height: 64px !important;
  padding: 6px 8px !important;
  gap: 2px !important;
  align-content: center !important;
}

html.v2-layout-ready #overview .overview-freshness-strip span,
html.v2-layout-ready #overview .overview-freshness-strip strong,
html.v2-layout-ready #overview .overview-freshness-strip small,
html.v2-layout-ready #overview .overview-freshness-strip > .text-button,
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip span,
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip strong,
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip small {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready #overview .overview-freshness-strip span,
html.v2-layout-ready #overview .overview-freshness-strip small,
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip span,
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip small {
  color: var(--zq-text-muted) !important;
}

html.v2-layout-ready #overview .overview-freshness-strip :where(strong, small),
html.v2-layout-ready #decision .decision-evidence-chain-status .decision-freshness-strip :where(strong, small) {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

html.v2-layout-ready #overview .overview-freshness-strip > .text-button {
  min-height: 36px !important;
  color: var(--zq-link) !important;
}

/* R71: full-page layout closure after the responsive audit. */
html.v2-layout-ready body {
  overflow: visible !important;
}

@media (min-width: 721px) {
  html.v2-layout-ready .mobile-controls-disclosure {
    width: 100%;
    min-width: 0;
    height: 67px;
    display: block !important;
    grid-column: 1;
    grid-row: 1;
  }

  html.v2-layout-ready .mobile-controls-disclosure > summary {
    display: none !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure > .global-controls {
    width: 100%;
  }

  html.v2-layout-ready .topbar > .v2-command-side {
    grid-column: 2;
    grid-row: 1;
  }
}

html.v2-layout-ready .page-anchor-rail {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin: 0 !important;
  padding: 0 7px;
  overflow-x: auto;
  border: 1px solid var(--zq-line);
  border-top: 0;
  background: var(--zq-surface-raised);
  scrollbar-width: thin;
}

html.v2-layout-ready .view > .page-heading + .page-anchor-rail {
  margin-top: 0 !important;
}

html.v2-layout-ready .page-anchor-rail + * {
  margin-top: var(--zq-space-panel) !important;
}

html.v2-layout-ready .page-anchor-rail a {
  min-width: max-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 2px solid transparent;
  color: var(--zq-text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

html.v2-layout-ready .page-anchor-rail a:hover,
html.v2-layout-ready .page-anchor-rail a:focus-visible {
  border-bottom-color: var(--zq-blue);
  background: var(--zq-surface-hover);
  color: var(--zq-text-primary);
  outline: 0;
}

html.v2-layout-ready :where(
  .overview-market-banner,
  .v2-overview-workspace,
  .fundamental-report-panel,
  .v2-overview-detail,
  .decision-final-layer,
  .decision-execution-layer,
  .decision-analysis-layer,
  .decision-analysis-data,
  .v2-event-risk-band,
  .data-layout,
  .data-latency-panel,
  .data-activity-section,
  .model-layout,
  .model-training-section,
  .operations-layout,
  .operations-integrations,
  .v2-issue-radar-band
) {
  scroll-margin-top: 56px;
}

html.v2-layout-ready #overview .overview-market-data,
html.v2-layout-ready #overview .overview-quote-grid,
html.v2-layout-ready #overview .overview-quote-grid > span,
html.v2-layout-ready #overview .overview-quote-grid strong {
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (min-width: 721px) {
  html.v2-layout-ready #overview .overview-quote-grid {
    width: 100% !important;
    grid-template-columns: minmax(0, 1.25fr) repeat(9, minmax(0, 1fr)) !important;
  }

  html.v2-layout-ready #overview .overview-quote-grid > span {
    overflow: hidden !important;
    overflow-wrap: anywhere;
    white-space: normal !important;
  }

  html.v2-layout-ready #overview .overview-quote-grid strong {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

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

  html.v2-layout-ready #overview .overview-quote-grid > span:nth-child(5n) {
    border-right: 0 !important;
  }
}

@media (min-width: 901px) {
  html.v2-layout-ready #orders .order-layout,
  html.v2-layout-ready #data .data-layout,
  html.v2-layout-ready #validation .validation-layout,
  html.v2-layout-ready #validation .cost-layout {
    align-items: start !important;
  }

  html.v2-layout-ready #orders .order-book-panel,
  html.v2-layout-ready #data .data-layout > .tool-panel,
  html.v2-layout-ready #validation .validation-layout > .tool-panel,
  html.v2-layout-ready #validation .cost-layout > .tool-panel {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: start !important;
  }
}

html.v2-layout-ready #models .training-queue-disclosure {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

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

html.v2-layout-ready #models .training-queue-disclosure > .training-queue-scroll {
  height: auto !important;
  min-height: 192px !important;
  max-height: 220px !important;
  overflow: auto !important;
  scrollbar-gutter: stable;
}

html.v2-layout-ready #models .training-queue-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--zq-surface-raised) !important;
}

html.v2-layout-ready #models .training-queue-scroll tbody tr,
html.v2-layout-ready #models .training-queue-scroll tbody td {
  height: auto !important;
  min-height: 48px !important;
  max-height: none !important;
}

@media (max-width: 720px) {
  html.v2-layout-ready .page-heading::before {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-inline: 0 !important;
  }

  html.v2-layout-ready .topbar {
    position: relative !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    border-bottom: 0 !important;
    background: #0b3d3b !important;
  }

  html.v2-layout-ready .topbar > .mobile-market-summary {
    width: 100%;
    min-width: 0;
    display: grid !important;
    gap: 8px;
    padding: 9px 10px 8px;
    color: #ffffff;
    background: #0b3d3b;
  }

  html.v2-layout-ready .mobile-market-heading {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 7px;
    text-align: center;
  }

  html.v2-layout-ready .mobile-market-heading > div,
  html.v2-layout-ready .mobile-market-heading :where(strong, span) {
    min-width: 0;
  }

  html.v2-layout-ready .mobile-market-heading :where(strong, span) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.v2-layout-ready .mobile-market-heading strong {
    color: #ffffff !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  html.v2-layout-ready .mobile-market-heading span {
    margin-top: 1px;
    color: #a9cbc5 !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  html.v2-layout-ready .mobile-header-button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
  }

  html.v2-layout-ready .mobile-header-button svg {
    width: 21px;
    height: 21px;
  }

  html.v2-layout-ready .mobile-market-quote {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(96px, .72fr) minmax(0, 1.28fr);
    align-items: end;
    gap: 10px;
  }

  html.v2-layout-ready .mobile-last strong {
    display: block;
    color: #ffffff;
    font-size: 30px !important;
    font-weight: 650;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  html.v2-layout-ready .mobile-last span {
    min-width: 0;
    display: flex;
    gap: 8px;
    margin-top: 5px;
  }

  html.v2-layout-ready .mobile-last em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #d7e9e5;
    font-size: 12px;
    font-style: normal;
  }

  html.v2-layout-ready .mobile-market-quote dl {
    min-width: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
  }

  html.v2-layout-ready .mobile-market-quote dl > div {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 5px;
  }

  html.v2-layout-ready .mobile-market-quote :where(dt, dd) {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }

  html.v2-layout-ready .mobile-market-quote dt {
    color: #91b7b0;
  }

  html.v2-layout-ready .mobile-market-quote dd {
    color: #ffffff;
    font-weight: 650;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  html.v2-layout-ready .topbar > .v2-command-side {
    display: none !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure {
    width: 100%;
    min-width: 0;
    height: auto;
    display: block !important;
    border-top: 1px solid #2d5956;
    background: var(--zq-surface-raised);
  }

  html.v2-layout-ready .mobile-controls-disclosure > summary {
    min-height: 36px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    color: var(--zq-text-body);
    cursor: pointer;
    list-style: none;
  }

  html.v2-layout-ready .mobile-controls-disclosure > summary::-webkit-details-marker {
    display: none;
  }

  html.v2-layout-ready .mobile-controls-disclosure > summary span {
    font-size: 12px;
    font-weight: 650;
  }

  html.v2-layout-ready .mobile-controls-disclosure > summary small {
    margin-left: auto;
    color: var(--zq-text-muted);
    font-size: 11px;
  }

  html.v2-layout-ready .mobile-controls-disclosure > summary::after {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-right: 2px solid var(--zq-link);
    border-bottom: 2px solid var(--zq-link);
    content: "";
    transform: rotate(45deg) translateY(-2px);
    transition: transform 140ms ease;
  }

  html.v2-layout-ready .mobile-controls-disclosure[open] > summary::after {
    transform: rotate(225deg) translate(-2px, -1px);
  }

  html.v2-layout-ready .mobile-controls-disclosure > .global-controls {
    width: 100%;
    min-width: 0;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    grid-template-rows: repeat(3, 40px) !important;
    gap: 6px !important;
    padding: 8px !important;
    border-top: 1px solid var(--zq-line);
    background: var(--zq-surface) !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure:not([open]) > .global-controls {
    display: none !important;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner {
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 6px 10px !important;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner svg {
    grid-column: auto !important;
    grid-row: auto !important;
    flex: 0 0 15px;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner :where(strong, span) {
    min-width: 0 !important;
    grid-column: auto !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner strong {
    flex: 0 0 auto;
    max-width: 48%;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner span {
    flex: 1 1 auto;
  }

  html.v2-layout-ready .page-anchor-rail {
    position: sticky;
    top: 0;
    z-index: 9;
    padding-inline: 4px;
    border-inline: 0;
    background: rgba(10, 29, 49, .98);
  }

  html.v2-layout-ready .page-anchor-rail a {
    min-height: 36px;
    padding-inline: 9px;
    font-size: 12px;
  }

  html.v2-layout-ready #arbitrage .arbitrage-layout,
  html.v2-layout-ready #arbitrage .arbitrage-layout > *,
  html.v2-layout-ready #arbitrage .arbitrage-detail,
  html.v2-layout-ready #arbitrage .arbitrage-score-summary,
  html.v2-layout-ready #arbitrage .arbitrage-auto-workbench,
  html.v2-layout-ready #arbitrage .arbitrage-auto-gate {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html.v2-layout-ready #arbitrage .arbitrage-score-summary {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html.v2-layout-ready #arbitrage .arbitrage-score-summary > div {
    min-width: 0 !important;
    grid-column: 1 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    border-right: 0 !important;
  }

  html.v2-layout-ready #arbitrage :where(
    .arbitrage-score-summary,
    .arbitrage-score-summary > div,
    .arbitrage-score-summary span,
    .arbitrage-score-summary strong,
    .arbitrage-score-summary small,
    .arbitrage-detail,
    .arbitrage-detail strong,
    .arbitrage-detail small,
    .status-badge
  ) {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }

  html.v2-layout-ready #arbitrage .arbitrage-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
  }

  html.v2-layout-ready #models .training-queue-disclosure > .training-queue-scroll {
    min-height: 0 !important;
    max-height: 320px !important;
  }
}

/* 701-720px is used by the desktop zoom regression suite as a narrow
   desktop canvas. Keep selectors measurable there; the true phone layout
   begins at 700px and below. */
@media (min-width: 701px) and (max-width: 720px) {
  html.v2-layout-ready .mobile-controls-disclosure {
    display: block !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure > summary {
    display: none !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure > .global-controls {
    display: grid !important;
  }
}

/* The operations workspace must fit the post-sidebar canvas at every desktop
   zoom. Earlier 620px/480px minimums exceeded the 1366px work area. */
@media (min-width: 1181px) {
  html.v2-layout-ready #operations .operations-layout,
  html.v2-layout-ready #operations > .v2-detail-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr) !important;
  }

  html.v2-layout-ready #operations .operations-layout > *,
  html.v2-layout-ready #operations > .v2-detail-grid > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* R79: close the remaining responsive contracts found by the full-page audit. */
@media (min-width: 721px) and (max-width: 1040px) {
  html.v2-layout-ready .topbar {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
  }

  html.v2-layout-ready .topbar > .v2-command-side {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

@media (min-width: 1181px) {
  html.v2-layout-ready #automation .automation-layout,
  html.v2-layout-ready #automation .v2-automation-detail {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr) !important;
  }

  html.v2-layout-ready #automation .automation-layout > *,
  html.v2-layout-ready #automation .v2-automation-detail > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

html.v2-layout-ready #models .v2-gauge-row {
  grid-template-columns: 74px minmax(0, 1fr) 76px !important;
}

html.v2-layout-ready #models .v2-gauge-row > * {
  min-width: 0;
}

@media (max-width: 360px) {
  html.v2-layout-ready .mobile-controls-disclosure > .global-controls {
    grid-template-rows: repeat(4, 40px) !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure .mobile-nav-button {
    grid-row: 1 / 5 !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure .contract-switcher {
    grid-row: 1 / 4 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure .contract-switcher .product-search-label {
    grid-column: 1 !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure .environment-control {
    grid-row: 4 !important;
  }

  html.v2-layout-ready #overview .market-timeframe-tools,
  html.v2-layout-ready #overview .market-timeframe-control {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html.v2-layout-ready #overview .market-timeframe-control {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  html.v2-layout-ready #overview .market-timeframe-control > button {
    min-width: 0 !important;
    padding-inline: 2px !important;
  }

  html.v2-layout-ready #orders .depth-column-head,
  html.v2-layout-ready #orders .order-book .book-row,
  html.v2-layout-ready #orders .order-book .last-price {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    grid-template-columns: 42px minmax(0, 1fr) minmax(76px, .9fr) !important;
  }

  html.v2-layout-ready #orders .order-book .book-row,
  html.v2-layout-ready #orders .order-book .last-price {
    padding-inline: 8px !important;
  }
}

@media (min-width: 501px) and (max-width: 720px) {
  html.v2-layout-ready .topbar > .v2-command-side {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    padding: 5px 10px;
    border-top: 1px solid var(--zq-line);
    background: var(--zq-surface-raised);
  }

  html.v2-layout-ready .v2-command-side > .global-latest-quote,
  html.v2-layout-ready .v2-command-side .top-actions > * {
    display: none !important;
  }

  html.v2-layout-ready .v2-command-side .top-actions {
    width: 100%;
    min-width: 0;
    display: flex !important;
    justify-content: flex-end;
    padding: 0 !important;
    border-left: 0 !important;
  }

  html.v2-layout-ready .v2-command-side .top-actions > .user-button {
    width: auto !important;
    max-width: 160px;
    min-height: 36px;
    display: inline-flex !important;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy {
    min-width: 0;
    display: block !important;
  }
}

/* R82: keep paired execution and validation workspaces on one measured grid. */
@media (min-width: 1181px) {
  html.v2-layout-ready #automation .automation-layout,
  html.v2-layout-ready #automation .automation-execution-grid,
  html.v2-layout-ready #automation .v2-automation-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.v2-layout-ready #validation .validation-layout,
  html.v2-layout-ready #validation .cost-layout {
    align-items: stretch !important;
  }

  html.v2-layout-ready #validation .validation-layout > .tool-panel,
  html.v2-layout-ready #validation .cost-layout > .tool-panel {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: stretch !important;
  }

  html.v2-layout-ready #validation .cost-layout > .tool-panel {
    padding-block: 12px !important;
  }

  html.v2-layout-ready #validation .cost-layout > .tool-panel > .panel-heading {
    margin-bottom: 8px !important;
  }
}


/* Source: v10-layout-stability.css */
/*
 * Zhongqi Zhiyan / V10 layout stability
 * Final cascade for bounded workspaces, stable empty states and responsive
 * priority. This layer intentionally leaves IDs, bindings and data logic alone.
 */

/* Ranking is a research list first. The legacy viewport lock was tied to a
   removed #rankingBody selector, so an empty table could receive only the
   remaining flex pixels. Let the page grow and give the list its own scroll. */
html.v2-layout-ready #ranking.view.is-active {
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: block !important;
  overflow: visible !important;
}

html.v2-layout-ready #ranking .ranking-layout,
html.v2-layout-ready #ranking .ranking-layout > .ranking-table {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
}

/* The ranking workspace is content-led. The legacy desktop flex contract
   assigned the full viewport to the grid, stretching an otherwise compact
   detail panel to the table's scroll height. */
html.v2-layout-ready #ranking > .v2-primary-workspace {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #ranking .ranking-layout {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-items: start !important;
}

html.v2-layout-ready #ranking .ranking-table {
  display: flex;
  flex-direction: column;
  min-height: 320px !important;
}

html.v2-layout-ready #ranking .ranking-table > .table-scroll {
  flex: 0 1 auto !important;
  min-height: 260px !important;
  height: auto !important;
  max-height: 420px !important;
  overflow: auto !important;
  scrollbar-gutter: stable;
}

html.v2-layout-ready #ranking .ranking-table:has(#rankingTable tbody .empty-state) > .table-scroll {
  min-height: 260px !important;
  display: flex;
  align-items: stretch;
}

html.v2-layout-ready #ranking .ranking-table:has(#rankingTable tbody .empty-state) table,
html.v2-layout-ready #ranking .ranking-table:has(#rankingTable tbody .empty-state) tbody {
  height: 100%;
}

html.v2-layout-ready #ranking .ranking-table:has(#rankingTable tbody .empty-state) td.empty-state {
  vertical-align: middle;
}

html.v2-layout-ready #ranking #rankingDetail {
  min-height: 320px !important;
  height: 360px !important;
  max-height: 360px !important;
  overflow: auto !important;
  align-self: start !important;
}

/* Match the more specific grid-item reset above so the detail column keeps a
   bounded reading surface instead of inheriting the parent track height. */
html.v2-layout-ready #ranking .ranking-layout > #rankingDetail {
  min-height: 320px !important;
  height: 360px !important;
  max-height: 360px !important;
  overflow: auto !important;
  align-self: start !important;
}

@media (min-width: 721px) and (max-width: 1180px) {
  html.v2-layout-ready #ranking .ranking-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  html.v2-layout-ready #ranking .ranking-layout > .ranking-table { order: 1 !important; }
  html.v2-layout-ready #ranking .ranking-layout > #rankingDetail { order: 2 !important; }
}

/* Overview: keep the live tape compact, then put the actionable decision rail
   before the longer depth diagnostics. */
html.v2-layout-ready #overview .overview-market-banner,
html.v2-layout-ready #overview .dashboard-grid,
html.v2-layout-ready #overview .market-panel,
html.v2-layout-ready #overview .dashboard-side-column,
html.v2-layout-ready #overview .overview-depth-panel,
html.v2-layout-ready #overview .trade-plan-panel {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

html.v2-layout-ready #overview .dashboard-grid {
  grid-template-rows: auto !important;
  grid-auto-rows: auto !important;
}

html.v2-layout-ready #overview .market-panel,
html.v2-layout-ready #overview .overview-depth-panel,
html.v2-layout-ready #overview .trade-plan-panel {
  overflow: visible !important;
}

html.v2-layout-ready #overview .overview-market-banner {
  min-height: 0 !important;
}

html.v2-layout-ready #overview #marketChart {
  display: block !important;
  height: 320px !important;
  min-height: 320px !important;
  max-height: 320px !important;
}

html.v2-layout-ready #overview .overview-market-subcharts {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  grid-template-rows: 250px !important;
}

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

html.v2-layout-ready #overview .overview-market-subchart canvas {
  display: block !important;
  height: 168px !important;
  max-height: 168px !important;
}

html.v2-layout-ready #overview .overview-timeframe-matrix {
  height: auto !important;
  min-height: 132px !important;
  max-height: none !important;
}

html.v2-layout-ready #overview .overview-timeframe-grid,
html.v2-layout-ready #overview .overview-timeframe-grid > article {
  height: auto !important;
  min-height: 62px !important;
  max-height: none !important;
}

@media (min-width: 721px) and (max-width: 1360px) {
  html.v2-layout-ready #overview .overview-market-subcharts {
    grid-template-rows: repeat(2, 210px) !important;
  }

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

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

  html.v2-layout-ready #overview .overview-timeframe-matrix {
    min-height: 132px !important;
    height: 132px !important;
    max-height: 132px !important;
  }

  html.v2-layout-ready #overview .overview-timeframe-grid,
  html.v2-layout-ready #overview .overview-timeframe-grid > article {
    min-height: 62px !important;
    height: 62px !important;
    max-height: 62px !important;
  }
}

html.v2-layout-ready #overview .dashboard-side-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

html.v2-layout-ready #overview .trade-plan-panel {
  order: 1 !important;
  flex: 0 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

html.v2-layout-ready #overview .overview-depth-panel {
  order: 2 !important;
  flex: 0 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

html.v2-layout-ready #overview .overview-order-book {
  flex: 0 0 250px !important;
  height: 250px !important;
  min-height: 250px !important;
  max-height: 250px !important;
  overflow: hidden !important;
}

html.v2-layout-ready #overview .overview-book-stats {
  min-height: 126px !important;
  height: 126px !important;
  max-height: 126px !important;
  overflow: hidden !important;
}

html.v2-layout-ready #overview .overview-contract-specs {
  min-height: 52px !important;
  height: 52px !important;
  max-height: 52px !important;
  overflow: hidden !important;
}

html.v2-layout-ready #overview .trade-plan-panel > .panel-heading {
  flex: 0 0 auto !important;
  min-height: 44px !important;
}

html.v2-layout-ready #overview .trade-plan-panel > .plan-list {
  flex: 0 0 136px !important;
  min-height: 136px !important;
  height: 136px !important;
  max-height: 136px !important;
  overflow: hidden !important;
}

html.v2-layout-ready #overview .trade-plan-panel > .plan-blocker {
  flex: 0 0 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  overflow: auto !important;
}

html.v2-layout-ready #overview .trade-plan-panel > .panel-actions {
  flex: 0 0 40px !important;
  min-height: 40px !important;
  margin-top: 8px !important;
}

@media (min-width: 721px) and (max-width: 1360px) {
  html.v2-layout-ready #overview .overview-market-banner {
    grid-template-columns: minmax(220px, .38fr) minmax(0, 1.62fr) !important;
  }

  html.v2-layout-ready #overview .overview-quote-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  html.v2-layout-ready #overview .overview-quote-grid > span {
    min-height: 58px !important;
  }

  html.v2-layout-ready #overview .overview-freshness-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto !important;
  }

  html.v2-layout-ready #overview .overview-freshness-strip > .text-button {
    grid-column: auto !important;
    min-height: 0 !important;
  }
}

@media (max-width: 1100px) and (min-width: 721px) {
  html.v2-layout-ready #overview .overview-market-banner {
    grid-template-columns: minmax(205px, .34fr) minmax(0, 1.66fr) !important;
  }

  html.v2-layout-ready #overview .overview-instrument-heading {
    min-height: 0 !important;
    padding: 10px !important;
  }

  html.v2-layout-ready #overview .overview-freshness-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto !important;
  }

  html.v2-layout-ready #overview .overview-freshness-strip > .text-button {
    grid-column: auto !important;
  }
}

/* Model workbench: registration and authorization are the first working
   surface; research capability detail and lineage remain available below. */
html.v2-layout-ready #models.is-active {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #models.is-active > .page-heading { order: 0 !important; }
html.v2-layout-ready #models.is-active > .page-anchor-rail { order: 1 !important; }
html.v2-layout-ready #models.is-active > .metric-strip { order: 2 !important; }
html.v2-layout-ready #models.is-active > .quant-research-section { order: 5 !important; }
html.v2-layout-ready #models.is-active > .v2-primary-workspace { order: 3 !important; }
html.v2-layout-ready #models.is-active > .v2-detail-band { order: 4 !important; }

html.v2-layout-ready #models .quant-research-section {
  max-height: 520px !important;
  overflow: auto !important;
  scrollbar-gutter: stable;
}

html.v2-layout-ready #models .quant-capability-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

html.v2-layout-ready #models .quant-capability-card {
  gap: 7px !important;
  padding: 10px !important;
}

html.v2-layout-ready #models .model-layout {
  grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr) !important;
  gap: 10px !important;
  min-height: 420px !important;
}

html.v2-layout-ready #models .model-layout > .table-section,
html.v2-layout-ready #models .model-layout > .detail-panel {
  min-height: 420px !important;
  height: auto !important;
  max-height: 520px !important;
  overflow: hidden !important;
}

html.v2-layout-ready #models .model-layout > .table-section > .table-scroll {
  max-height: 420px !important;
  overflow: auto !important;
}

html.v2-layout-ready #models .model-training-section {
  height: auto !important;
  min-height: 240px !important;
  max-height: 320px !important;
  overflow: hidden !important;
}

/* Bound the open queue even when the adaptive measurement sees the full
   sidebar viewport. The queue still expands to its measured minimum. */
html.v2-layout-ready #models .model-training-section:has(.training-queue-disclosure[open]) {
  height: min(320px, var(--v2-model-queue-height, 320px)) !important;
  max-height: 320px !important;
}

html.v2-layout-ready #models .training-queue-scroll {
  min-height: 160px !important;
  max-height: 220px !important;
  overflow: auto !important;
}

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

@media (min-width: 721px) and (max-width: 1180px) {
  html.v2-layout-ready #models .quant-capability-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

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

  html.v2-layout-ready #models .model-layout > .table-section {
    min-height: 360px !important;
    height: 360px !important;
    max-height: 360px !important;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel {
    min-height: 320px !important;
    height: 360px !important;
    max-height: 360px !important;
    overflow: auto !important;
  }

  html.v2-layout-ready #models .model-layout > .table-section > .table-scroll {
    max-height: 300px !important;
  }

  html.v2-layout-ready #models .model-layout > .detail-panel { order: 2 !important; }
  html.v2-layout-ready #models .model-layout > .table-section { order: 1 !important; }
}

/* At a narrow desktop width the decision rail is more useful before the
   long market chart. Flatten the side column only in this breakpoint so the
   wide two-column dashboard keeps its established hierarchy. */
@media (min-width: 721px) and (max-width: 1100px) {
  html.v2-layout-ready #overview .dashboard-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  html.v2-layout-ready #overview .dashboard-side-column {
    display: contents !important;
  }

  html.v2-layout-ready #overview .dashboard-grid > .market-panel {
    order: 2 !important;
  }

  html.v2-layout-ready #overview .dashboard-side-column > .trade-plan-panel {
    order: 1 !important;
    width: 100% !important;
  }

  html.v2-layout-ready #overview .dashboard-side-column > .overview-depth-panel {
    order: 3 !important;
    width: 100% !important;
  }
}

/* Quant execution: candidate and exit ledgers are decision surfaces, so they
   precede the longer configuration form while retaining all controls. */
html.v2-layout-ready #automation.is-active {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #automation.is-active > .page-heading { order: 0 !important; }
html.v2-layout-ready #automation.is-active > .page-anchor-rail { order: 1 !important; }
html.v2-layout-ready #automation.is-active > .automation-flow-strip { order: 2 !important; }
html.v2-layout-ready #automation.is-active > .v2-primary-workspace { order: 3 !important; }
html.v2-layout-ready #automation.is-active > .v2-automation-execution { order: 4 !important; }
html.v2-layout-ready #automation.is-active > .v2-automation-detail { order: 5 !important; }
html.v2-layout-ready #automation.is-active > .v2-detail-band { order: 6 !important; }

html.v2-layout-ready #automation .v2-primary-workspace > .automation-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: 12px !important;
}

html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child .automation-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child .form-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: 10px 12px !important;
}

html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child .form-grid.two-columns > label {
  min-width: 0 !important;
  min-height: 76px !important;
  display: grid !important;
  grid-template-rows: minmax(28px, auto) 42px !important;
  align-content: start !important;
  gap: 5px !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child .form-grid.two-columns > label > input,
html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child .form-grid.two-columns > label > select {
  min-width: 0 !important;
  width: 100% !important;
}

html.v2-layout-ready #automation .automation-layout > .tool-panel:nth-child(2) {
  height: auto !important;
  min-height: 320px !important;
  max-height: 420px !important;
}

html.v2-layout-ready #automation .v2-automation-execution {
  min-height: 0 !important;
}

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

html.v2-layout-ready #automation .automation-execution-grid > .table-section {
  min-height: 220px !important;
  height: 220px !important;
  display: flex !important;
  flex-direction: column !important;
}

html.v2-layout-ready #automation .automation-execution-grid .table-scroll {
  min-height: 0 !important;
  height: 0 !important;
  flex: 1 1 auto !important;
  max-height: none !important;
  overflow: auto !important;
}

@media (min-width: 721px) and (max-width: 1180px) {
  html.v2-layout-ready #automation .v2-primary-workspace > .automation-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child,
  html.v2-layout-ready #automation .automation-layout > .tool-panel:nth-child(2) {
    width: 100% !important;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:nth-child(2) {
    min-height: 320px !important;
    height: 320px !important;
    max-height: 320px !important;
  }
}

/* Spread workspaces keep an empty candidate and ledger region stable. */
html.v2-layout-ready #arbitrage .arbitrage-layout {
  align-items: start !important;
}

html.v2-layout-ready #arbitrage .arbitrage-candidate-section,
html.v2-layout-ready #arbitrage #arbitrageDetail {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

html.v2-layout-ready #arbitrage .arbitrage-candidate-section > .arbitrage-table-scroll {
  min-height: 260px !important;
  height: 260px !important;
  max-height: 320px !important;
  flex: 0 0 260px !important;
  overflow: auto !important;
}

html.v2-layout-ready #arbitrage #arbitrageDetail {
  min-height: 260px !important;
}

html.v2-layout-ready #arbitrage .arbitrage-execution-ledger {
  min-height: 280px !important;
}

html.v2-layout-ready #arbitrage .arbitrage-execution-ledger > .table-scroll {
  min-height: 220px !important;
  height: 220px !important;
  max-height: 280px !important;
  overflow: auto !important;
}

/* Operations controls remain compact but usable. */
html.v2-layout-ready #operations .operations-layout button.icon-button.small,
html.v2-layout-ready #operations .operations-integrations button.icon-button.small {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
}

/* Data freshness is a compact telemetry band, not a second full-height panel. */
html.v2-layout-ready #data .data-layout {
  align-items: stretch !important;
}

html.v2-layout-ready #data .data-layout > .tool-panel,
html.v2-layout-ready #data .data-latency-panel {
  min-height: 320px !important;
  height: auto !important;
  max-height: 380px !important;
}

html.v2-layout-ready #data .data-latency-panel .market-latency-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

html.v2-layout-ready #data .data-latency-panel .market-latency-item {
  min-height: 64px !important;
}

@media (max-width: 720px) {
  html.v2-layout-ready #overview .dashboard-side-column > .trade-plan-panel {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  html.v2-layout-ready #models .quant-capability-grid,
  html.v2-layout-ready #automation .automation-layout,
  html.v2-layout-ready #automation .automation-execution-grid,
  html.v2-layout-ready #data .data-latency-panel .market-latency-strip {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html.v2-layout-ready #overview .overview-market-subcharts {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: repeat(3, 220px) !important;
  }

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

/* Priority surfaces: the overview opens with an actionable decision rail,
   while the longer chart and depth diagnostics follow it. */
html.v2-layout-ready #overview.view.is-active {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #overview.view.is-active > .page-heading { order: 0 !important; }
html.v2-layout-ready #overview.view.is-active > .quant-system-strip { order: 1 !important; }
html.v2-layout-ready #overview.view.is-active > .overview-market-banner { order: 2 !important; }
html.v2-layout-ready #overview.view.is-active > .overview-decision-summary-rail { order: 3 !important; }
html.v2-layout-ready #overview.view.is-active > .v2-primary-workspace { order: 4 !important; }
html.v2-layout-ready #overview.view.is-active > .fundamental-report-panel,
html.v2-layout-ready #overview.view.is-active > .v2-overview-detail { order: 5 !important; }

html.v2-layout-ready #overview .overview-decision-summary-rail {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #overview .overview-decision-summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 8px;
}

html.v2-layout-ready #overview .overview-decision-summary-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

html.v2-layout-ready #overview .overview-decision-summary-heading > div > span {
  color: var(--muted);
  font-size: 11px;
}

html.v2-layout-ready #overview .overview-decision-summary-heading > div > strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}

/* The full plan remains the detailed right-rail report below the depth
   snapshot; the compact summary above the dashboard carries the first-screen
   decision priority. */
html.v2-layout-ready #overview .dashboard-side-column > .overview-depth-panel { order: 1 !important; }
html.v2-layout-ready #overview .dashboard-side-column > .trade-plan-panel { order: 2 !important; }
html.v2-layout-ready #overview .dashboard-side-column > .trade-plan-panel {
  flex: 0 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}
html.v2-layout-ready #overview .dashboard-side-column > .trade-plan-panel > .panel-actions {
  margin-top: auto !important;
}

html.v2-layout-ready #overview .overview-plan-command {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

html.v2-layout-ready #overview .overview-plan-command > article {
  min-width: 0;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

html.v2-layout-ready #overview .overview-plan-command > article > span {
  color: var(--muted);
  font-size: 11px;
}

html.v2-layout-ready #overview .overview-plan-command > article > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.v2-layout-ready #overview .overview-plan-command > article > small {
  min-height: 26px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: normal;
}

/* Keep execution and model pages explicit even if a legacy layout rule is
   loaded after the production rebuild script. */
html.v2-layout-ready #automation.view.is-active > .v2-primary-workspace { order: 3 !important; }
html.v2-layout-ready #automation.view.is-active > .v2-automation-execution { order: 4 !important; }
html.v2-layout-ready #automation.view.is-active > .v2-automation-detail { order: 5 !important; }
html.v2-layout-ready #models.view.is-active > .v2-primary-workspace { order: 3 !important; }
html.v2-layout-ready #models.view.is-active > .v2-detail-band { order: 4 !important; }
html.v2-layout-ready #models.view.is-active > .quant-research-section { order: 5 !important; }
html.v2-layout-ready #models .model-training-section:has(.training-queue-disclosure:not([open])) {
  height: auto !important;
  min-height: 0 !important;
  max-height: 180px !important;
}
html.v2-layout-ready #models .model-training-section:has(.training-queue-disclosure[open]) {
  min-height: 240px !important;
}
html.v2-layout-ready #models .model-layout > .detail-panel {
  overflow: visible !important;
}

@media (min-width: 2000px) and (min-height: 1200px) {
  html.v2-layout-ready #models .model-training-section:has(.training-queue-disclosure[open]) {
    min-height: 180px !important;
  }
}

/* The spread page is a decision surface first: best combinations, then the
   automatic-entry gate, then configuration and the execution ledger. */
html.v2-layout-ready #arbitrage.view.is-active {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

html.v2-layout-ready #arbitrage.view.is-active > .arbitrage-page-heading { order: 0 !important; }
html.v2-layout-ready #arbitrage.view.is-active > .arbitrage-flow-strip { order: 1 !important; }
html.v2-layout-ready #arbitrage.view.is-active > .v2-arbitrage-ranking-workspace { order: 2 !important; }
html.v2-layout-ready #arbitrage.view.is-active > .v2-arbitrage-gate-band { order: 3 !important; }
html.v2-layout-ready #arbitrage.view.is-active > .v2-arbitrage-auto-workspace { order: 4 !important; }
html.v2-layout-ready #arbitrage.view.is-active > .v2-arbitrage-ledger-workspace { order: 5 !important; }
html.v2-layout-ready #arbitrage.view.is-active > .v2-detail-band:not(.v2-arbitrage-gate-band) { order: 6 !important; }

html.v2-layout-ready #arbitrage .v2-arbitrage-ranking-workspace,
html.v2-layout-ready #arbitrage .v2-arbitrage-gate-band,
html.v2-layout-ready #arbitrage .v2-arbitrage-auto-workspace {
  min-width: 0 !important;
}

/* Settings navigation distinguishes local sections from links into another
   operating page, so users do not mistake a cross-page handoff for a local
   setting panel. */
html.v2-layout-ready #settings .settings-nav {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  gap: 0 !important;
}

html.v2-layout-ready #settings .settings-nav-group-label {
  display: block;
  padding: 10px 12px 5px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

html.v2-layout-ready #settings .settings-nav-group-label:not(:first-child) {
  margin-top: 6px;
  border-top: 1px solid var(--line-strong);
}

html.v2-layout-ready #settings .settings-nav button[data-settings-scope="view"] {
  color: var(--blue);
}

html.v2-layout-ready #settings .settings-nav button[data-settings-scope="view"] svg {
  width: 13px;
  height: 13px;
  margin-left: 5px;
  vertical-align: -2px;
}

@media (max-width: 720px) {
  html.v2-layout-ready #overview .dashboard-side-column > .trade-plan-panel {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

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

  html.v2-layout-ready #settings .settings-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.v2-layout-ready #settings .settings-nav-group-label {
    grid-column: 1 / -1;
  }
}

/* Browser zoom reduces the CSS viewport. Keep the command side and system
   ribbon measurable at that equivalent desktop width instead of allowing the
   price/change pair or status cells to shrink into clipped text. */
@media (min-width: 721px) and (max-width: 1040px) {
  html.v2-layout-ready .v2-command-side {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-end !important;
    gap: 8px !important;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote {
    flex: 0 0 224px !important;
    inline-size: 224px !important;
    min-inline-size: 224px !important;
    max-inline-size: 224px !important;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote > strong {
    grid-template-columns: minmax(104px, 1fr) minmax(92px, auto) !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  html.v2-layout-ready .v2-command-side #globalLastPrice {
    min-width: 104px !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  html.v2-layout-ready .v2-command-side #globalChangeSummary {
    min-width: 92px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
  }

  html.v2-layout-ready .system-ribbon {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  html.v2-layout-ready .system-ribbon > .top-status-item {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  html.v2-layout-ready .system-ribbon .top-status-item > span,
  html.v2-layout-ready .system-ribbon .top-status-item > strong {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child .automation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 721px) and (max-width: 900px) {
  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child .form-grid.two-columns {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 125% browser zoom commonly lands around 1536 CSS pixels on a 1920px
   monitor. The full-text action cluster is wider than that work area, so use
   the same compact command grammar as the narrower desktop without changing
   the underlying controls or their IDs. */
@media (min-width: 1362px) and (max-width: 1600px) {
  html.v2-layout-ready .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  html.v2-layout-ready .v2-command-side {
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    gap: 8px !important;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote {
    flex: 0 0 224px !important;
    inline-size: 224px !important;
    min-inline-size: 224px !important;
    max-inline-size: 224px !important;
  }

  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 !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding-inline: 0 !important;
    justify-content: center !important;
  }

  html.v2-layout-ready .v2-command-side .broker-login-shortcut > span,
  html.v2-layout-ready .v2-command-side .danger-button > span {
    display: none !important;
  }

  html.v2-layout-ready .v2-command-side .user-button {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding-inline: 6px !important;
  }

  html.v2-layout-ready .v2-command-side .user-avatar {
    display: none !important;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy {
    min-width: 0 !important;
    display: block !important;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy strong {
    max-width: 60px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
  }

  html.v2-layout-ready .v2-command-side .user-button-copy small {
    display: none !important;
  }
}

/* Final mobile overrides: controls remain readable after the desktop stability
   rules above, and explanatory copy is allowed to grow instead of being
   clipped by legacy metric-card sizing. */
@media (max-width: 720px) {
  html.v2-layout-ready #automation .v2-primary-workspace > .automation-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel {
    width: 100% !important;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child .automation-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html.v2-layout-ready #automation .automation-layout > .tool-panel:first-child .form-grid.two-columns {
    grid-template-columns: minmax(0, 1fr) !important;
  }

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

  html.v2-layout-ready #orders #simulation > .metric-strip .metric-card small {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 1 auto !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }

  html.v2-layout-ready #orders #simulation > .metric-strip .metric-card,
  html.v2-layout-ready #simulation > .metric-strip .metric-card {
    height: auto !important;
    min-height: 84px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  html.v2-layout-ready #orders #simulation > .metric-strip .metric-card > span,
  html.v2-layout-ready #orders #simulation > .metric-strip .metric-card > strong,
  html.v2-layout-ready #orders #simulation > .metric-strip .metric-card > small,
  html.v2-layout-ready #simulation > .metric-strip .metric-card > span,
  html.v2-layout-ready #simulation > .metric-strip .metric-card > strong,
  html.v2-layout-ready #simulation > .metric-strip .metric-card > small {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 1 auto !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }

  html.v2-layout-ready #settings .settings-content .form-grid input[readonly] {
    font-size: 12px !important;
  }
}

/* R7: authoritative terminal foundation. All legacy aliases resolve here so
   future visual changes have one token source without changing page bindings. */
:root {
  --zq-canvas: #0b151a;
  --zq-surface: #111f24;
  --zq-surface-raised: #17292f;
  --zq-surface-hover: #1c343a;
  --zq-surface-selected: #183c4a;
  --zq-line: #5f747a;
  --zq-line-strong: #75898e;
  --zq-text-primary: #eef5f5;
  --zq-text-body: #c8d6d7;
  --zq-text-secondary: #9fb1b5;
  --zq-text-muted: #879b9f;
  --zq-text-disabled: #71858a;
  --zq-link: #68bce0;
  --zq-blue: #278abd;
  --zq-blue-soft: rgba(39, 138, 189, .16);
  --zq-teal: #25b99c;
  --zq-teal-muted: #79c7b8;
  --zq-teal-soft: rgba(37, 185, 156, .14);
  --zq-copper: #d3a24e;
  --zq-copper-soft: rgba(211, 162, 78, .14);
  --zq-status-good: #86dfcc;
  --zq-status-warn: #e6bd6d;
  --zq-status-bad: #f28a98;
  --zq-up: #f36b7a;
  --zq-down: #3fd19d;
  --zq-danger: #f28a98;
  --zq-font-assist: 13px;
  --zq-font-data: 13px;
  --zq-font-body: 14px;
  --zq-font-section: 15px;
  --zq-font-panel: 16px;
  --zq-font-page: 22px;
  --zq-control-height: 36px;
  --zq-table-head-height: 36px;
  --zq-table-row-height: 38px;
  --zq-panel-gap: 12px;
  --zq-panel-padding: 14px;

  --bg: var(--zq-canvas);
  --canvas: var(--zq-canvas);
  --surface: var(--zq-surface);
  --surface-soft: var(--zq-surface-raised);
  --surface-strong: var(--zq-surface-hover);
  --ink: var(--zq-text-body);
  --text: var(--zq-text-body);
  --muted: var(--zq-text-muted);
  --line: var(--zq-line);
  --line-strong: var(--zq-line-strong);
  --nav: #0a171c;
  --nav-hover: #152d34;
  --blue: var(--zq-blue);
  --blue-soft: var(--zq-blue-soft);
  --teal: var(--zq-teal);
  --green: var(--zq-down);
  --green-soft: rgba(63, 209, 157, .14);
  --red: var(--zq-up);
  --red-soft: rgba(243, 107, 122, .14);
  --amber: var(--zq-copper);
  --amber-soft: var(--zq-copper-soft);
  --price-up: var(--zq-up);
  --price-down: var(--zq-down);
  --font-assist: var(--zq-font-assist);
  --font-meta: var(--zq-font-data);
  --font-body: var(--zq-font-body);
  --font-section: var(--zq-font-section);
  --font-panel: var(--zq-font-panel);
  --font-page: var(--zq-font-page);

  --v3-canvas: var(--zq-canvas);
  --v3-surface: var(--zq-surface);
  --v3-surface-soft: var(--zq-surface-raised);
  --v3-surface-tint: var(--zq-surface-hover);
  --v3-ink: var(--zq-text-body);
  --v3-ink-strong: var(--zq-text-primary);
  --v3-muted: var(--zq-text-muted);
  --v3-muted-light: var(--zq-text-secondary);
  --v3-line: var(--zq-line);
  --v3-line-soft: #40545a;
  --v3-line-strong: var(--zq-line-strong);
  --v3-sidebar: #0a171c;
  --v3-sidebar-deep: #081318;
  --v3-sidebar-line: var(--zq-line);
  --v3-teal: var(--zq-teal);
  --v3-teal-bright: #64d6bf;
  --v3-teal-soft: var(--zq-teal-soft);
  --v3-blue: var(--zq-blue);
  --v3-blue-soft: var(--zq-blue-soft);
  --v3-copper: var(--zq-copper);
  --v3-copper-soft: var(--zq-copper-soft);
  --v3-up: var(--zq-up);
  --v3-up-soft: var(--red-soft);
  --v3-down: var(--zq-down);
  --v3-down-soft: var(--green-soft);
}

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

html.v2-layout-ready .sidebar {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  overflow: hidden !important;
  background: #0a171c !important;
  border-right-color: var(--zq-line) !important;
}

html.v2-layout-ready .brand {
  background: #081318 !important;
  border-bottom-color: var(--zq-line) !important;
}

html.v2-layout-ready .primary-nav {
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
}

html.v2-layout-ready .sidebar-footer {
  position: relative !important;
  inset: auto !important;
  margin: 8px !important;
  background: #12272d !important;
  border-color: var(--zq-line) !important;
  border-top-color: var(--zq-copper) !important;
}

html.v2-layout-ready .primary-nav .nav-group-label {
  box-sizing: border-box;
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--zq-text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

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

html.v2-layout-ready .primary-nav .nav-group-label > span {
  flex: 1 1 auto;
}

html.v2-layout-ready .primary-nav .nav-group-label svg {
  width: 14px;
  height: 14px;
  transition: transform 140ms ease;
}

html.v2-layout-ready .primary-nav .nav-group-label[aria-expanded="false"] svg {
  transform: rotate(-90deg);
}

html.v2-layout-ready .primary-nav .nav-button[hidden] {
  display: none !important;
}

html.v2-layout-ready .nav-button:hover {
  background: #152d34 !important;
  border-color: #496169 !important;
}

html.v2-layout-ready .nav-button.is-active {
  background: #164555 !important;
  border-color: #397892 !important;
  border-left-color: var(--zq-teal) !important;
  box-shadow: none !important;
}

html.v2-layout-ready .topbar,
html.v2-layout-ready .view > .page-heading {
  background: #0d1b20 !important;
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready .topbar {
  min-height: 72px !important;
  padding: 7px 12px !important;
}

html.v2-layout-ready .system-ribbon,
html.v2-layout-ready .top-status {
  background: #102229 !important;
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready .global-latest-quote,
html.v2-layout-ready .environment-banner,
html.v2-layout-ready .environment-paper {
  background: #14313a !important;
  border-color: #4f777b !important;
}

html.v2-layout-ready :where(
  .tool-panel,
  .detail-panel,
  .table-section,
  .timeline-panel,
  .log-panel,
  .forward-progress-panel,
  .market-panel,
  .overview-depth-panel,
  .trade-plan-panel,
  .analysis-panel,
  .chart-panel,
  .settings-section
) {
  background: var(--zq-surface) !important;
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready :where(.panel-heading, .section-heading, .dialog-heading, table thead) {
  background: var(--zq-surface-raised) !important;
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea,
  .product-search-field
) {
  min-height: var(--zq-control-height) !important;
  background: #14262c !important;
  border-color: var(--zq-line) !important;
  color: var(--zq-text-body) !important;
}

html.v2-layout-ready :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea
):hover:not(:disabled) {
  background: #193138 !important;
  border-color: var(--zq-line-strong) !important;
}

html.v2-layout-ready :where(input, select, textarea):focus-visible,
html.v2-layout-ready :where(button, a, summary, [role="button"]):focus-visible {
  outline: 2px solid #78c9e5 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

html.v2-layout-ready :where(
  .primary-button,
  .secondary-button,
  .danger-button,
  .danger-outline-button,
  .text-button,
  .user-button,
  .segmented-control button,
  .quick-price-row button,
  .settings-nav button
) {
  box-sizing: border-box !important;
  height: var(--zq-control-height) !important;
  min-height: var(--zq-control-height) !important;
  max-height: var(--zq-control-height) !important;
  padding-block: 0 !important;
  border-radius: 3px !important;
  font-size: var(--zq-font-body) !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready .icon-button {
  box-sizing: border-box !important;
  width: var(--zq-control-height) !important;
  min-width: var(--zq-control-height) !important;
  max-width: var(--zq-control-height) !important;
  height: var(--zq-control-height) !important;
  min-height: var(--zq-control-height) !important;
  max-height: var(--zq-control-height) !important;
  padding: 8px !important;
  border-radius: 3px !important;
}

html.v2-layout-ready :where(.small-command, .icon-button.small) {
  --zq-control-height: 32px;
}

html.v2-layout-ready .compact-switch {
  box-sizing: border-box !important;
  height: var(--zq-control-height) !important;
  min-height: var(--zq-control-height) !important;
  max-height: var(--zq-control-height) !important;
  padding-block: 0 !important;
}

html.v2-layout-ready .compact-switch input[type="checkbox"] {
  min-height: 18px !important;
}

html.v2-layout-ready .primary-button {
  background: #166da8 !important;
  border-color: #438eb9 !important;
  color: #fff !important;
}

html.v2-layout-ready .primary-button:hover:not(:disabled) {
  background: #165f8d !important;
  border-color: #66a8c9 !important;
  color: #fff !important;
}

html.v2-layout-ready :where(.secondary-button, .text-button, .icon-button, .user-button) {
  background: #162a30 !important;
  border-color: var(--zq-line) !important;
}

html.v2-layout-ready .status-badge:not(.qualification-state) {
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 24px !important;
  max-height: none !important;
  padding: 2px 8px !important;
  border-radius: 3px !important;
  font-size: 13px !important;
  line-height: 18px !important;
  white-space: normal !important;
}

html.v2-layout-ready table thead th {
  box-sizing: border-box !important;
  height: var(--zq-table-head-height) !important;
  min-height: var(--zq-table-head-height) !important;
  padding: 7px 10px !important;
  background: var(--zq-surface-raised) !important;
  border-color: var(--zq-line) !important;
  color: var(--zq-text-secondary) !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}

html.v2-layout-ready table tbody td {
  box-sizing: border-box !important;
  height: var(--zq-table-row-height) !important;
  min-height: var(--zq-table-row-height) !important;
  padding: 8px 10px !important;
  border-color: #40545a !important;
  color: var(--zq-text-body) !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody tr,
html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll tbody td {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
}

html.v2-layout-ready #operations .operations-layout > .table-section:first-child .table-scroll td .status-badge:not(.qualification-state) {
  height: auto !important;
  min-height: 24px !important;
  max-height: none !important;
  line-height: 18px !important;
}

html.v2-layout-ready #settings .display-settings-section {
  scroll-margin-top: 12px;
}

html.v2-layout-ready #settings .display-preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding: var(--zq-panel-padding);
}

html.v2-layout-ready #settings .display-preference-grid > label {
  min-width: 0;
}

html.v2-layout-ready #settings .display-preference-grid > label:not(.switch-row) {
  display: grid;
  gap: 6px;
  color: var(--zq-text-secondary);
  font-size: 13px;
}

html[data-ui-density="compact"] {
  --zq-control-height: 32px;
  --zq-table-head-height: 32px;
  --zq-table-row-height: 34px;
  --zq-panel-gap: 8px;
  --zq-panel-padding: 10px;
}

html[data-ui-density="compact"].v2-layout-ready .view {
  padding: 10px !important;
}

html[data-ui-density="compact"].v2-layout-ready .view > .page-heading {
  margin: -10px -10px 0 !important;
}

html[data-ui-density="compact"].v2-layout-ready :where(
  .dashboard-grid,
  .decision-grid,
  .ranking-layout,
  .event-layout,
  .automation-layout,
  .risk-layout,
  .validation-layout,
  .data-layout,
  .model-layout,
  .operations-layout,
  .governance-layout
) {
  gap: var(--zq-panel-gap) !important;
}

html[data-ui-text="large"] {
  --zq-font-assist: 14px;
  --zq-font-data: 14px;
  --zq-font-body: 15px;
  --zq-font-section: 16px;
  --zq-font-panel: 17px;
  --zq-font-page: 24px;
}

html[data-ui-contrast="high"] {
  --zq-line: #87999e;
  --zq-line-strong: #a7b5b8;
  --zq-text-secondary: #becbcc;
  --zq-text-muted: #aebfc1;
}

html[data-ui-reduced-motion="true"] *,
html[data-ui-reduced-motion="true"] *::before,
html[data-ui-reduced-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}

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

/* One page scrollbar plus one bounded event feed. The risk controls grow with
   their content instead of competing for wheel focus in a third scroll area. */
@media (min-width: 1041px) {
  html.v2-layout-ready #events .event-layout,
  html.v2-layout-ready #events > .v2-primary-workspace {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    align-items: start !important;
  }

  html.v2-layout-ready #events .timeline-panel {
    height: clamp(520px, calc(100dvh - 300px), 720px) !important;
    min-height: 520px !important;
    max-height: 720px !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
  }

  html.v2-layout-ready #events .event-risk-panel {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Compact desktop header: preserve complete connection and clock values by
   giving the ribbon two intentional rows rather than truncating five cells. */
@media (min-width: 1181px) {
  html.v2-layout-ready .system-ribbon {
    grid-template-columns:
      minmax(240px, 1.5fr)
      minmax(150px, .9fr)
      minmax(200px, 1.1fr)
      minmax(110px, .7fr)
      minmax(110px, .7fr) !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 #tradingDay,
  html.v2-layout-ready .system-ribbon #marketClock {
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  html.v2-layout-ready .topbar {
    min-height: 0 !important;
    padding: 6px 10px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto 40px !important;
    gap: 6px !important;
  }

  html.v2-layout-ready .topbar > .v2-command-side {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }

  html.v2-layout-ready .system-ribbon {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 68px !important;
    max-height: none !important;
    grid-template-columns: 1.2fr .8fr 1fr !important;
    grid-auto-rows: minmax(34px, auto) !important;
    overflow: visible !important;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner {
    grid-column: span 2 !important;
  }

  html.v2-layout-ready .system-ribbon > .top-status-item {
    min-width: 0 !important;
    padding: 5px 8px !important;
    overflow: visible !important;
  }

  html.v2-layout-ready .system-ribbon .top-status-item > span {
    font-size: 11px !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 {
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }

  html.v2-layout-ready .view.is-active > .page-heading {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 76px !important;
    max-height: none !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-rows: minmax(56px, auto) !important;
    align-items: center !important;
    gap: 10px 12px !important;
    padding: 8px 12px !important;
    overflow: visible !important;
  }

  html.v2-layout-ready .view.is-active > .page-heading::before {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 118px !important;
  }

  html.v2-layout-ready .view.is-active > .page-heading > div:first-child {
    min-width: 0 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html.v2-layout-ready .view.is-active > .page-heading > :last-child:not(:first-child) {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    flex-wrap: nowrap !important;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  html.v2-layout-ready .system-ribbon {
    min-height: 36px !important;
    grid-template-columns:
      minmax(220px, 1.45fr)
      minmax(135px, .85fr)
      minmax(190px, 1.1fr)
      minmax(100px, .65fr)
      minmax(100px, .65fr) !important;
    grid-auto-rows: 36px !important;
  }

  html.v2-layout-ready .system-ribbon #environmentBanner {
    grid-column: auto !important;
  }
}

@media (min-width: 721px) and (max-width: 1040px) {
  html.v2-layout-ready .topbar {
    grid-template-rows: 40px 40px !important;
  }

  html.v2-layout-ready .global-controls {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    grid-template-columns: minmax(0, 1fr) 128px !important;
    grid-template-rows: 40px !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  html.v2-layout-ready .mobile-controls-disclosure {
    box-sizing: border-box !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    align-self: stretch !important;
  }

  html.v2-layout-ready .contract-switcher {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: grid !important;
    grid-template-columns: minmax(180px, .95fr) minmax(300px, 1.35fr) !important;
    grid-template-rows: 40px !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  html.v2-layout-ready .contract-switcher > label,
  html.v2-layout-ready .environment-control {
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
  }

  html.v2-layout-ready .contract-switcher > .product-search-label {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html.v2-layout-ready .contract-switcher > label:nth-of-type(2) {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  html.v2-layout-ready .contract-switcher > label:nth-of-type(3) {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  html.v2-layout-ready .compact-contract-pair {
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) !important;
    gap: 6px !important;
  }

  html.v2-layout-ready .compact-contract-pair > label {
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
  }

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

  html.v2-layout-ready .contract-switcher :where(.product-search-field, select),
  html.v2-layout-ready .environment-control select {
    width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 4px 9px !important;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote > span {
    display: none !important;
  }

  html.v2-layout-ready .v2-command-side .global-latest-quote > strong {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(90px, 1fr) minmax(78px, auto) !important;
  }
}

/* The JavaScript wrapper only owns the 721-1040px paired selector layout.
   Elsewhere it stays transparent so all three selector labels remain direct
   participants in the contract switcher's grid. */
html.v2-layout-ready .compact-contract-pair {
  display: contents;
}

@media (max-width: 720px) {
  html.v2-layout-ready #settings .display-preference-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Source: no-l2-mode.css */
/* Default execution surface: top-of-book quote + completed bars. */
.no-l2-mode .overview-order-book .book-row:not(.best),
.no-l2-mode #orders .order-book-panel .book-row:not(.best) {
  display: none;
}

.no-l2-mode .overview-order-book,
.no-l2-mode #orders .order-book-panel .order-book {
  min-height: 156px;
}

.no-l2-mode .replay-depth-audit {
  border-color: rgba(119, 144, 168, 0.34);
}

.no-l2-mode .replay-depth-audit .replay-depth-heading strong::after {
  content: " · L2 可选，不参与当前策略";
  color: var(--text-muted, #8193a8);
  font-size: 0.72em;
  font-weight: 500;
}

.no-l2-mode .market-latency-item:nth-child(6) {
  border-left-color: rgba(119, 144, 168, 0.34);
}
