/* Stitch qmt_5 / qmt_6 / qmt_7 dense workstation pages. */

.workspace:has(#page > .stitch-page-root) .page-toolbar,
.workspace:has(#page > .stitch-page-root) .global-banner,
.app-shell:has(#page > .stitch-page-root) .agent-indicator {
  display: none !important;
}

.workspace:has(#page > .stitch-page-root) #page {
  padding: 0 12px 20px;
  overflow: visible;
}

.workspace.route-orders:has(#page > .stitch-orders-page) #page { padding-bottom: 0; }
.workspace.route-risk:has(#page > .stitch-risk-page) #page { padding-bottom: 0; }

.stitch-page-root {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
}

.stitch-page-root button,
.stitch-page-root input,
.stitch-page-root select {
  border-radius: 1px;
}

.stitch-page-root small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.35;
}

.stitch-page-root code,
.stitch-page-root time,
.stitch-number {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.stitch-page-title,
.stitch-actions,
.stitch-command-row,
.stitch-filter-row,
.stitch-filters,
.stitch-tabs,
.stitch-card-head,
.stitch-progress-label,
.stitch-subhead,
.stitch-detail-actions,
.stitch-inline-form,
.stitch-editor-actions {
  min-width: 0;
  display: flex;
  align-items: center;
}

.stitch-command-row,
.stitch-filter-row,
.stitch-card-head,
.stitch-progress-label,
.stitch-subhead,
.stitch-editor-actions {
  justify-content: space-between;
}

.stitch-page-title { gap: 7px; overflow: hidden; }
.stitch-page-title > strong,
.stitch-page-title > div { min-width: 0; }
.stitch-page-title > strong { font-size: 14px; white-space: nowrap; }
.stitch-page-title > strong small { display: inline; margin-left: 4px; font: 9px var(--mono); letter-spacing: .04em; }
.stitch-title-icon { flex: 0 0 auto; color: var(--primary-dark); font-size: 18px; font-weight: 800; }
.stitch-info-chip { flex: 0 1 auto; max-width: 280px; padding: 3px 6px; overflow: hidden; color: #245b9e; background: #e5eefc; border: 1px solid #c9d9ef; font: 700 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.stitch-demo-tag { flex: 0 0 auto; padding: 3px 6px; color: #793614; background: #ffe4d7; border: 1px solid #efb393; font-size: 9px; font-weight: 750; white-space: nowrap; }
.stitch-actions { flex: 0 0 auto; justify-content: flex-end; gap: 7px; }
.stitch-actions .button { min-height: 26px; padding: 3px 9px; font-size: 10px; }

.stitch-page-command,
.stitch-position-hero,
.stitch-position-filter,
.stitch-risk-command,
.stitch-risk-metrics,
.stitch-risk-bottom {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
}

.stitch-page-command {
  height: 85px;
  padding: 8px;
  display: grid;
  grid-template-rows: 27px 34px;
  gap: 7px;
}

.stitch-filter-row {
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.stitch-tabs {
  flex: 0 1 auto;
  overflow-x: auto;
  white-space: nowrap;
}

.stitch-tabs button {
  min-height: 24px;
  padding: 3px 9px;
  color: #596a80;
  background: #f6f8fd;
  border: 0;
  border-right: 1px solid #dce3ef;
  font-size: 9px;
  white-space: nowrap;
}

.stitch-tabs button:last-child { border-right: 0; }
.stitch-tabs button:hover { color: var(--primary-dark); background: #eef4ff; }
.stitch-tabs button.active { color: #fff; background: var(--primary); font-weight: 750; }

.stitch-filters {
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 6px;
  overflow-x: auto;
}

.stitch-filters input,
.stitch-filters select,
.stitch-inline-form select {
  width: auto;
  min-width: 92px;
  height: 28px;
  padding: 0 7px;
  color: #35445a;
  background: #fff;
  border: 1px solid var(--line-strong);
  font-size: 9px;
}

.stitch-filters input { min-width: 132px; }
.stitch-filters select:disabled { color: #758195; background: #f3f5f9; }
.stitch-filters > span { color: var(--muted); font: 9px var(--mono); white-space: nowrap; }

.stitch-main-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr);
  gap: 8px;
  align-items: start;
}

.stitch-orders-page,
.stitch-positions-page {
  display: grid;
  gap: 8px;
}

.stitch-orders-page .stitch-main-grid { height: 794px; }
.stitch-card { min-width: 0; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.stitch-page-root .stitch-card.panel { margin-top: 0; }
.stitch-primary-panel { min-width: 0; display: flex; flex-direction: column; }
.stitch-orders-page .stitch-primary-panel { height: 794px; }

.stitch-card-head {
  flex: 0 0 36px;
  min-height: 36px;
  gap: 8px;
  padding: 6px 8px;
  background: #eff4ff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.stitch-card-head > strong,
.stitch-card-head > div > strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stitch-card-head > span { flex: 0 0 auto; color: var(--muted); font: 9px var(--mono); white-space: nowrap; }
.stitch-card-head > div { min-width: 0; }
.stitch-card-head > div small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#orders-table,
#positions-table,
#stitch-risk-table {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stitch-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-gutter: stable;
}

.stitch-page-root table { border-collapse: collapse; table-layout: fixed; }
.stitch-page-root th {
  height: 32px;
  padding: 4px 6px;
  color: #5a687c;
  background: #e8effc;
  border-bottom: 1px solid #ced9e9;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  white-space: normal;
}

.stitch-page-root td {
  height: 52px;
  max-width: none;
  padding: 5px 6px;
  border-bottom: 1px solid #e3e8f1;
  font-size: 9px;
  line-height: 1.25;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.stitch-page-root tbody tr { cursor: pointer; }
.stitch-page-root tbody tr:hover { background: #f5f8fe; }
.stitch-page-root tbody tr.selected { background: #e9f0fc; box-shadow: inset 2px 0 var(--primary); }
.stitch-page-root td small { margin-top: 2px; }
.stitch-code-cell strong,
.stitch-code-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-code-cell strong { color: #154d93; font: 700 10px var(--mono); }
.stitch-number { text-align: right; white-space: nowrap; }
.stitch-time-cell { font-size: 8px !important; white-space: normal; }
.stitch-cell-wrap { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.stitch-unreported { color: #7f8998; font-family: var(--mono); }

.stitch-order-table { width: 1040px; min-width: 1040px; }
.stitch-order-table th:nth-child(1) { width: 100px; }
.stitch-order-table th:nth-child(2) { width: 48px; }
.stitch-order-table th:nth-child(3) { width: 92px; }
.stitch-order-table th:nth-child(4),
.stitch-order-table th:nth-child(5),
.stitch-order-table th:nth-child(6) { width: 60px; text-align: right; }
.stitch-order-table th:nth-child(7),
.stitch-order-table th:nth-child(8) { width: 78px; text-align: right; }
.stitch-order-table th:nth-child(9) { width: 92px; }
.stitch-order-table th:nth-child(10) { width: 138px; }
.stitch-order-table th:nth-child(11) { width: 105px; }
.stitch-order-table th:nth-child(12) { width: 112px; }

.stitch-side { display: inline-block; min-width: 28px; padding: 2px 4px; text-align: center; border: 1px solid #d5dce8; }
.stitch-side-buy { color: var(--positive); background: var(--positive-soft); border-color: #efc0bd; }
.stitch-side-sell { color: var(--negative); background: var(--negative-soft); border-color: #c6e2d4; }
.stitch-row-actions { display: flex; flex-wrap: wrap; gap: 3px; }
.stitch-row-actions .button { min-height: 22px; padding: 2px 5px; }

.stitch-table-summary {
  flex: 0 0 auto;
  min-height: 36px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 5px 8px;
  color: #596a80;
  background: #eaf0fb;
  border-top: 1px solid #cfdaea;
  font: 8px var(--mono);
}

.stitch-table-summary .text-button { margin-left: auto; }
.stitch-table-empty { min-height: 114px; display: grid; place-content: center; gap: 4px; color: var(--muted); text-align: center; }
.stitch-table-empty strong { font-size: 11px; }
.stitch-table-empty span { font-size: 9px; }

.stitch-detail-column { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.stitch-orders-page .stitch-detail-column { height: 794px; }
.stitch-order-trace-card { flex: 0 0 560px; display: flex; flex-direction: column; }
.stitch-order-identity { min-height: 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 8px; background: #edf3ff; border-bottom: 1px solid var(--line); }
.stitch-order-identity > div { min-width: 0; }
.stitch-order-identity strong,
.stitch-order-identity span { display: block; }
.stitch-order-identity strong { color: #154f9e; font: 700 12px var(--mono); }
.stitch-order-identity strong small { display: inline; margin-left: 4px; }
.stitch-order-identity > span { flex: 0 0 auto; color: #53647a; font: 9px var(--mono); }

.stitch-kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.stitch-kv-grid span { min-width: 0; color: var(--muted); font-size: 8px; }
.stitch-kv-grid strong { display: block; overflow: hidden; margin-top: 2px; color: #334257; font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }

.stitch-progress-label { gap: 8px; padding: 5px 8px 3px; color: var(--muted); font-size: 8px; }
.stitch-progress-label strong { color: var(--primary-dark); font: 700 9px var(--mono); }
.stitch-progress { display: block; width: calc(100% - 16px); height: 7px; margin: 0 8px 6px; overflow: hidden; appearance: none; background: #dfe7f2; border: 0; }
.stitch-progress::-webkit-progress-bar { background: #dfe7f2; }
.stitch-progress::-webkit-progress-value { background: var(--primary); }
.stitch-progress::-moz-progress-bar { background: var(--primary); }

.stitch-trace-list { min-height: 0; flex: 1 1 auto; padding: 2px 8px 4px 16px; overflow: auto; }
.stitch-trace-event { position: relative; min-height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 6px 0 6px 12px; border-left: 1px solid #cbd6e6; }
.stitch-trace-event > i { position: absolute; left: -4px; top: 12px; width: 7px; height: 7px; background: var(--primary); border: 1px solid #fff; border-radius: 50%; }
.stitch-trace-event strong,
.stitch-trace-event small { display: block; }
.stitch-trace-event strong { font-size: 9px; }
.stitch-trace-event time { align-self: start; color: var(--muted); font-size: 8px; white-space: nowrap; }
.stitch-inline-empty { padding: 18px 8px; color: var(--muted); text-align: center; font-size: 9px; }

.stitch-subhead { min-height: 28px; gap: 8px; padding: 5px 8px; background: #f0f4fb; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stitch-subhead strong { font-size: 9px; }
.stitch-subhead span { color: var(--muted); font: 8px var(--mono); }
.stitch-mini-table { max-height: 123px; overflow: auto; }
.stitch-mini-table table { width: 100%; min-width: 360px; table-layout: auto; }
.stitch-mini-table th { height: 24px; font-size: 8px; }
.stitch-mini-table td { height: 23px; padding: 3px 5px; font: 8px var(--mono); white-space: nowrap; }

.stitch-safety-card { flex: 1 1 auto; min-height: 150px; padding: 10px; color: #713500; background: #fff6ee; border: 1px solid #e8a671; overflow: auto; }
.stitch-safety-card.stitch-safety-critical { color: #961f27; background: #fff0ef; border-color: #e56970; }
.stitch-safety-card > strong { font-size: 12px; }
.stitch-safety-card p { margin: 7px 0; font-size: 9px; line-height: 1.55; }
.stitch-lock-note { padding: 7px; background: rgba(255,255,255,.65); border: 1px solid currentColor; font-size: 9px; font-weight: 750; line-height: 1.45; }

/* qmt_6 positions */
.stitch-position-hero { height: 106px; padding: 11px; }
.stitch-position-hero .stitch-command-row { height: 25px; }
.stitch-metric-row { height: 50px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.stitch-metric-row article { min-width: 0; padding: 5px 8px; overflow: hidden; background: #edf3ff; border-left: 1px solid #d6e0ef; }
.stitch-metric-row article:first-child { border-left: 0; }
.stitch-metric-row small,
.stitch-metric-row strong,
.stitch-metric-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-metric-row strong { margin-top: 3px; font: 700 15px var(--mono); }
.stitch-metric-row span { margin-top: 2px; color: var(--muted); font-size: 8px; }

.stitch-position-filter { height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 11px; overflow: hidden; }
.stitch-positions-page .stitch-primary-panel { height: 558px; }
.stitch-position-table { width: 1120px; min-width: 1120px; }
.stitch-position-table th:nth-child(1) { width: 104px; }
.stitch-position-table th:nth-child(2) { width: 92px; }
.stitch-position-table th:nth-child(3),
.stitch-position-table th:nth-child(4),
.stitch-position-table th:nth-child(5),
.stitch-position-table th:nth-child(6) { width: 72px; text-align: right; }
.stitch-position-table th:nth-child(7),
.stitch-position-table th:nth-child(8),
.stitch-position-table th:nth-child(9) { width: 74px; text-align: right; }
.stitch-position-table th:nth-child(10) { width: 98px; text-align: right; }
.stitch-position-table th:nth-child(11) { width: 70px; }
.stitch-position-table th:nth-child(12) { width: 116px; }
.stitch-position-table th:nth-child(13) { width: 102px; }
.stitch-position-table td { height: 84px; }
.stitch-position-table td:nth-child(3),
.stitch-position-table td:nth-child(4),
.stitch-position-table td:nth-child(5),
.stitch-position-table td:nth-child(6),
.stitch-position-table td:nth-child(7),
.stitch-position-table td:nth-child(8),
.stitch-position-table td:nth-child(9),
.stitch-position-table td:nth-child(10) { text-align: right; }

.stitch-positions-page .stitch-detail-column { min-height: 877px; }
.stitch-position-detail-card { flex: 0 0 740px; }
.stitch-position-detail-card > .empty { min-height: 680px; }
.stitch-t1-notice { margin: 8px; padding: 8px; color: #763b0b; background: #fff4eb; border-left: 3px solid #c96917; }
.stitch-t1-notice strong { font-size: 10px; }
.stitch-t1-notice p { margin: 5px 0 0; font-size: 9px; line-height: 1.55; }
.stitch-position-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 8px 8px; }
.stitch-position-split span { min-width: 0; padding: 6px; background: #eef3fb; }
.stitch-position-split strong,
.stitch-position-split small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-position-split strong { margin: 4px 0 2px; font: 700 13px var(--mono); }
.stitch-unknown-block { margin: 8px; padding: 8px; color: #4b5e76; background: #f5f7fb; border: 1px solid #dfe5ee; }
.stitch-unknown-block strong { font-size: 9px; }
.stitch-unknown-block p { margin: 4px 0 0; font-size: 9px; line-height: 1.5; }
.stitch-kv-list { display: grid; gap: 1px; padding: 4px 8px 8px; }
.stitch-kv-list span { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 3px 0; color: var(--muted); font-size: 8px; border-bottom: 1px solid #edf0f5; }
.stitch-kv-list strong { max-width: 65%; overflow: hidden; color: #344459; font: 700 8px var(--mono); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.stitch-price-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 7px 8px; padding: 7px; background: #edf3ff; }
.stitch-price-strip span,
.stitch-price-strip strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-price-strip span { color: var(--muted); font-size: 8px; }
.stitch-price-strip strong { margin-top: 4px; color: #33445c; font: 700 9px var(--mono); }
.stitch-detail-actions { gap: 8px; padding: 7px 8px; }
.stitch-detail-actions .button.primary { flex: 1 1 auto; }
.stitch-reassign-card { flex: 0 0 129px; }
.stitch-card-body { padding: 8px; }
.stitch-card-body p { margin: 0 0 7px; color: var(--muted); font-size: 9px; }
.stitch-inline-form { gap: 8px; }
.stitch-inline-form select { flex: 1 1 auto; }

/* qmt_7 risk */
.stitch-risk-page { display: grid; gap: 12px; }
.stitch-risk-command { height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 11px; overflow: hidden; }
.stitch-risk-command .stitch-page-title > div > strong,
.stitch-risk-command .stitch-page-title > div > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-command .stitch-page-title > div > strong { font-size: 13px; }

.stitch-risk-metrics { height: 104px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; background: transparent; border: 0; }
.stitch-risk-metrics article { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 8px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.stitch-risk-metrics article.stitch-metric-alert { border-left: 5px solid var(--danger); }
.stitch-risk-metrics small,
.stitch-risk-metrics strong,
.stitch-risk-metrics span { display: block; overflow: hidden; text-overflow: ellipsis; }
.stitch-risk-metrics small { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.stitch-risk-metrics strong { font: 700 16px var(--mono); white-space: nowrap; }
.stitch-risk-metrics span { color: var(--muted); font-size: 8px; line-height: 1.35; }

.stitch-risk-main { height: 626px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; align-items: start; }
.stitch-risk-matrix { height: 626px; display: flex; flex-direction: column; }
.stitch-risk-table-tools { flex: 0 0 62px; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 11px; background: #eff4ff; }
.stitch-risk-table-tools > div:first-child strong,
.stitch-risk-table-tools > div:first-child span { display: block; }
.stitch-risk-table-tools > div:first-child strong { font-size: 11px; }
.stitch-risk-table-tools > div:first-child span { margin-top: 3px; color: var(--muted); font: 8px var(--mono); }
.stitch-risk-table-tools .stitch-filters { flex: 0 1 auto; }
.stitch-risk-table { width: 980px; min-width: 980px; }
.stitch-risk-table th:nth-child(1) { width: 195px; }
.stitch-risk-table th:nth-child(2) { width: 140px; }
.stitch-risk-table th:nth-child(3),
.stitch-risk-table th:nth-child(4),
.stitch-risk-table th:nth-child(5) { width: 110px; text-align: right; }
.stitch-risk-table th:nth-child(6) { width: 92px; }
.stitch-risk-table th:nth-child(7) { width: 130px; }
.stitch-risk-table th:nth-child(8) { width: 93px; }
.stitch-risk-table td { height: 58px; }
.stitch-risk-table td:nth-child(3),
.stitch-risk-table td:nth-child(4),
.stitch-risk-table td:nth-child(5) { text-align: right; }
.stitch-risk-name strong { display: inline-block; width: 47px; color: var(--primary-dark); font: 700 9px var(--mono); vertical-align: top; }
.stitch-risk-name span { display: inline-block; width: calc(100% - 51px); font-weight: 700; vertical-align: top; }
.stitch-risk-state { display: inline-block; max-width: 100%; padding: 2px 4px; font-size: 8px; font-weight: 750; }
.stitch-risk-state-success { color: #137049; background: var(--negative-soft); }
.stitch-risk-state-warning { color: #854108; background: var(--warning-soft); }
.stitch-risk-state-danger { color: #a21f29; background: var(--danger-soft); }
.stitch-risk-state-neutral { color: #59677b; background: #edf0f5; }
.stitch-risk-table-foot { flex: 0 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 10px; color: #596a80; background: #e6eefb; font: 8px var(--mono); }

.stitch-risk-detail { height: auto; min-height: 590px; max-height: 626px; padding-bottom: 8px; overflow: auto; }
.stitch-risk-detail-title { padding: 8px; background: #edf3ff; border-bottom: 1px solid var(--line); }
.stitch-risk-detail-title strong,
.stitch-risk-detail-title code,
.stitch-risk-detail-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-detail-title strong { font-size: 12px; }
.stitch-risk-detail-title code { margin-top: 2px; color: #5f6f84; font-size: 8px; }
.stitch-risk-detail-title span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.stitch-risk-formula { display: grid; gap: 1px; padding: 7px 9px; }
.stitch-risk-formula span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; color: var(--muted); font-size: 8px; border-bottom: 1px solid #e8edf4; }
.stitch-risk-formula strong { max-width: 65%; overflow: hidden; color: #25364c; font: 700 9px var(--mono); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-log { display: grid; gap: 4px; padding: 7px 8px; }
.stitch-risk-log > div { display: grid; grid-template-columns: 112px 1fr; gap: 2px 8px; padding: 5px; background: #f0f4fb; }
.stitch-risk-log time { grid-row: span 2; color: #617189; font-size: 8px; }
.stitch-risk-log strong { font: 700 8px var(--mono); text-align: right; }
.stitch-risk-log span { color: var(--muted); font-size: 8px; text-align: right; }
.stitch-risk-detail > .button.wide { width: calc(100% - 16px); margin: 8px; }

.stitch-risk-bottom { height: 48px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 7px; }
.stitch-risk-bottom article { min-width: 0; padding: 0 8px; border-right: 1px solid var(--line); }
.stitch-risk-bottom article:last-child { border-right: 0; }
.stitch-risk-bottom small,
.stitch-risk-bottom strong,
.stitch-risk-bottom span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-bottom small { color: var(--muted); font-size: 8px; }
.stitch-risk-bottom strong { margin-top: 2px; font: 700 11px var(--mono); }
.stitch-risk-bottom span { margin-top: 1px; color: var(--muted); font-size: 7px; }

.stitch-risk-editor { min-width: 0; background: #fff; border: 1px solid var(--line); }
.stitch-risk-editor > summary { height: 30px; display: flex; align-items: center; padding: 5px 9px; color: var(--primary-dark); font-size: 9px; font-weight: 750; cursor: pointer; }
.stitch-risk-editor[open] > summary { border-bottom: 1px solid var(--line); }
.stitch-risk-editor form { padding: 9px; }
.stitch-switch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 8px; }
.stitch-switch-grid label { display: flex; align-items: center; gap: 5px; padding: 6px; background: #f2f5fa; font-size: 9px; }
.stitch-risk-input-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.stitch-risk-input-grid label { color: var(--muted); font-size: 8px; }
.stitch-risk-input-grid input { width: 100%; height: 28px; margin-top: 3px; padding: 0 6px; color: #304056; background: #fff; border: 1px solid var(--line-strong); font: 9px var(--mono); }
.stitch-editor-actions { gap: 8px; margin-top: 8px; }
.stitch-editor-actions span { color: var(--muted); font-size: 8px; }

@media (max-width: 1279px) {
  .stitch-main-grid { grid-template-columns: minmax(0, 1fr); height: auto !important; }
  .stitch-position-table { width: 100%; min-width: 0; }
  .stitch-position-table th { width: auto !important; }
  .stitch-orders-page .stitch-primary-panel,
  .stitch-positions-page .stitch-primary-panel { height: auto; min-height: 520px; }
  .stitch-orders-page .stitch-detail-column,
  .stitch-positions-page .stitch-detail-column { height: auto; min-height: 0; }
  .stitch-order-trace-card,
  .stitch-position-detail-card { flex-basis: auto; min-height: 520px; }
  .stitch-reassign-card { flex-basis: auto; }
  .stitch-page-command { height: auto; min-height: 85px; grid-template-rows: auto auto; }
  .stitch-command-row { align-items: flex-start; }
  .stitch-page-title { flex-wrap: wrap; }
}

@media (max-width: 1099px) {
  .stitch-risk-main { height: auto; grid-template-columns: minmax(0, 1fr); }
  .stitch-risk-matrix { height: 626px; }
  .stitch-risk-detail { max-height: none; }
  .stitch-risk-command { height: auto; min-height: 52px; flex-wrap: wrap; }
}

@media (max-width: 1023px) {
  .stitch-metric-row { height: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stitch-position-hero { height: auto; }
  .stitch-risk-metrics { height: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stitch-risk-metrics article { min-height: 96px; }
  .stitch-risk-input-grid,
  .stitch-switch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .stitch-filter-row,
  .stitch-position-filter,
  .stitch-risk-table-tools { align-items: flex-start; flex-direction: column; height: auto; overflow: visible; }
  .stitch-tabs,
  .stitch-filters { width: 100%; justify-content: flex-start; }
  .stitch-metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stitch-risk-metrics,
  .stitch-risk-bottom,
  .stitch-position-split,
  .stitch-price-strip { height: auto; grid-template-columns: minmax(0, 1fr); }
  .stitch-risk-bottom article { border-right: 0; border-bottom: 1px solid var(--line); }
  .stitch-risk-input-grid,
  .stitch-switch-grid { grid-template-columns: minmax(0, 1fr); }
}

/* qmt_5 strict Stitch alignment: orders and executions */
@font-face {
  font-family: "Material Symbols QMT5";
  src: url("/fonts/material-symbols-outlined-qmt5.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

.stitch-orders-page .material-symbols-outlined {
  display: inline-block;
  overflow: hidden;
  font-family: "Material Symbols QMT5";
  font-style: normal;
  font-weight: 400;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

.stitch-orders-page .stitch-page-command {
  height: 85px;
  min-height: 85px;
  padding: 8px;
  grid-template-rows: 26px 33px;
  gap: 8px;
}

.stitch-orders-page .stitch-command-row { gap: 8px; }
.stitch-orders-page .stitch-page-title { flex: 1 1 auto; gap: 6px; }
.stitch-orders-page .stitch-page-title > strong { flex: 0 0 auto; font-size: 14px; line-height: 20px; }
.stitch-orders-page .stitch-page-title > small { flex: 0 0 auto; display: inline; color: #505f74; font: 400 11px/14px var(--mono); letter-spacing: .02em; white-space: nowrap; }
.stitch-orders-page .stitch-page-title > i { flex: 0 0 1px; width: 1px; height: 16px; margin: 0 2px; background: #c2c6d5; }
.stitch-orders-page .stitch-title-icon { width: 20px; height: 20px; font-size: 20px; }
.stitch-orders-page .stitch-title-icon .material-symbols-outlined { font-size: 20px; }
.stitch-orders-page .stitch-info-chip { max-width: none; padding: 2px 8px; font-size: 11px; line-height: 14px; }
.stitch-orders-page .stitch-demo-tag { padding: 2px 8px; font-size: 11px; line-height: 14px; }
.stitch-orders-page .stitch-actions { gap: 8px; }
.stitch-orders-page .stitch-actions .button { min-height: 26px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 2px; font-size: 12px; line-height: 16px; }
.stitch-orders-page .stitch-actions .button .material-symbols-outlined { font-size: 15px; }
.stitch-orders-page .stitch-actions .button.danger { color: #fff; background: #ba1a1a; border-color: #ba1a1a; }
.stitch-orders-page .stitch-actions .button.danger:disabled { color: #ba1a1a; background: #ffdad6; border-color: #eaa19d; opacity: .66; }

.stitch-orders-page .stitch-filter-row { height: 33px; gap: 8px; padding-top: 5px; overflow: visible; }
.stitch-orders-page .stitch-tabs { width: 469.02px; flex: 0 0 469.02px; gap: 4px; overflow: visible; }
.stitch-orders-page .stitch-tabs button { min-height: 24px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 0; border-radius: 2px; font-size: 12px; line-height: 16px; }
.stitch-orders-page .stitch-tabs button.stitch-tab-abnormal { color: #ba1a1a; }
.stitch-orders-page .stitch-tabs button.stitch-tab-abnormal.active { color: #fff; }
.stitch-orders-page .stitch-tabs .material-symbols-outlined { font-size: 14px; }
.stitch-orders-page .stitch-filters { width: 455.38px; flex: 0 0 455.38px; gap: 8px; overflow: visible; }
.stitch-orders-page .stitch-filters label { display: flex; align-items: center; gap: 4px; color: #505f74; font-size: 11px; font-weight: 600; white-space: nowrap; }
.stitch-orders-page .stitch-filters select { width: 90px; min-width: 90px; height: 28px; padding: 0 6px; color: #0f1c2d; border-color: #dce3ec; font-size: 12px; }
.stitch-orders-page .stitch-filters label:nth-child(2) select { width: 109px; min-width: 109px; }
.stitch-orders-page .stitch-filters label:nth-child(3) select { width: 125px; min-width: 125px; }

.stitch-orders-page .stitch-main-grid {
  height: auto;
  grid-template-columns: minmax(0, calc(66.6666667% - 2.6667px)) minmax(0, calc(33.3333333% - 5.3333px));
  gap: 8px;
  align-items: start;
}

.stitch-orders-page .stitch-primary-panel { height: auto; }
.stitch-orders-page .stitch-card-head { flex: 0 0 36px; min-height: 36px; padding: 6px 8px; }
.stitch-orders-page .stitch-card-head > div { display: flex; align-items: center; gap: 6px; }
.stitch-orders-page .stitch-card-head > div > strong { display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; }
.stitch-orders-page .stitch-card-head > div > strong .material-symbols-outlined { flex: 0 0 auto; color: #00479f; font-size: 18px; }
.stitch-orders-page .stitch-card-head > div > small { display: inline; color: #505f74; font: 400 11px/14px var(--mono); }
.stitch-orders-page .stitch-card-head > span { font-size: 11px; line-height: 14px; }

.stitch-orders-page #orders-table { flex: 0 1 auto; }
.stitch-orders-page .stitch-table-scroll { flex: 1 1 auto; overflow-x: auto; overflow-y: auto; scrollbar-gutter: auto; }
.stitch-orders-page .stitch-order-table { width: 100%; min-width: 832.75px; table-layout: fixed; }
.stitch-orders-page .stitch-order-table th:nth-child(1) { width: 108.41px; }
.stitch-orders-page .stitch-order-table th:nth-child(2) { width: 37.44px; }
.stitch-orders-page .stitch-order-table th:nth-child(3) { width: 42.39px; }
.stitch-orders-page .stitch-order-table th:nth-child(4),
.stitch-orders-page .stitch-order-table th:nth-child(5),
.stitch-orders-page .stitch-order-table th:nth-child(6) { width: 50.81px; }
.stitch-orders-page .stitch-order-table th:nth-child(7) { width: 71.69px; }
.stitch-orders-page .stitch-order-table th:nth-child(8) { width: 57.77px; }
.stitch-orders-page .stitch-order-table th:nth-child(9) { width: 110.09px; }
.stitch-orders-page .stitch-order-table th:nth-child(10) { width: 110px; }
.stitch-orders-page .stitch-order-table th:nth-child(11) { width: 99.53px; }
.stitch-orders-page .stitch-order-table th:nth-child(12) { width: 42px; }
.stitch-orders-page .stitch-order-table th { height: 28px; padding: 4px 8px; font-size: 11px; line-height: 14px; font-weight: 600; white-space: nowrap; }
.stitch-orders-page .stitch-order-table th:nth-child(2),
.stitch-orders-page .stitch-order-table th:nth-child(9),
.stitch-orders-page .stitch-order-table th:nth-child(12) { text-align: center; }
.stitch-orders-page .stitch-order-table th:nth-child(4),
.stitch-orders-page .stitch-order-table th:nth-child(5),
.stitch-orders-page .stitch-order-table th:nth-child(6),
.stitch-orders-page .stitch-order-table th:nth-child(7),
.stitch-orders-page .stitch-order-table th:nth-child(8) { text-align: right; }
.stitch-orders-page .stitch-order-table td { height: 32px; padding: 1px 8px; font-size: 12px; line-height: 16px; overflow-wrap: normal; }
.stitch-orders-page .stitch-order-table tbody tr.selected { background: #eff4ff; border-left: 2px solid #00479f; }
.stitch-orders-page .stitch-center { text-align: center; }
.stitch-orders-page .stitch-code-cell > div { display: flex; align-items: center; gap: 4px; }
.stitch-orders-page .stitch-code-cell strong { flex: 0 0 auto; color: #0f1c2d; font: 600 13px/16px var(--mono); }
.stitch-orders-page .stitch-code-cell small { display: inline; margin: 0; color: #0f1c2d; font: 400 12px/16px var(--sans); white-space: normal; }
.stitch-orders-page .stitch-strategy-cell { color: #505f74; font: 400 11px/14px var(--mono); }
.stitch-orders-page .stitch-number { font-size: 12px; line-height: 14px; }
.stitch-orders-page .stitch-time-cell { color: #505f74; font-size: 11px !important; white-space: nowrap; }
.stitch-orders-page .stitch-cell-wrap { display: block; max-width: 118px; overflow: hidden; color: #505f74; font: 400 11px/14px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.stitch-orders-page .stitch-side { min-width: 0; padding: 1px 5px; font-size: 11px; line-height: 14px; }
.stitch-orders-page .stitch-row-button { min-height: 20px; padding: 2px 6px; color: #505f74; background: #fff; border: 1px solid #dce3ec; border-radius: 2px; font: 400 11px/14px var(--mono); white-space: nowrap; }
.stitch-orders-page .stitch-row-button:hover { color: #0f1c2d; background: #eff4ff; }
.stitch-orders-page .stitch-row-button.stitch-row-cancel { color: #ba1a1a; border-color: #ef9a9a; }
.stitch-orders-page .stitch-row-button:disabled { color: #737784; background: #f5f6f9; border-color: #dce3ec; opacity: .65; }

.stitch-orders-page .stitch-table-summary { min-height: 31px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; font: 400 11px/14px var(--mono); }
.stitch-orders-page .stitch-table-summary > div { display: flex; align-items: center; gap: 12px; }
.stitch-orders-page .stitch-table-summary span { white-space: nowrap; }
.stitch-orders-page .stitch-table-summary strong { color: #0f1c2d; font-weight: 500; }
.stitch-orders-page .stitch-table-summary strong.negative { color: #ba1a1a; }
.stitch-orders-page .stitch-table-empty { min-height: 114px; }

.stitch-orders-page .stitch-detail-column { height: auto; gap: 8px; }
.stitch-orders-page .stitch-order-trace-card { height: 518px; flex: 0 0 518px; padding: 8px; gap: 8px; overflow: hidden; }
.stitch-orders-page .stitch-order-trace-card > .stitch-card-head { flex: 0 0 25px; min-height: 25px; padding: 0 0 4px; background: #fff; }
.stitch-orders-page .stitch-order-trace-card > .stitch-card-head > div > strong { font-size: 14px; }
.stitch-orders-page .stitch-order-trace-card.is-empty > .empty { flex: 1 1 auto; display: grid; place-content: center; }
.stitch-orders-page .stitch-order-identity { min-height: 80px; display: block; padding: 8px; background: #eff4ff; border: 1px solid #dce3ec; border-radius: 2px; }
.stitch-orders-page .stitch-order-identity-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stitch-orders-page .stitch-order-identity-line > div { min-width: 0; display: flex; align-items: center; gap: 4px; }
.stitch-orders-page .stitch-order-identity-line strong { flex: 0 0 auto; color: #00479f; font: 600 14px/20px var(--mono); }
.stitch-orders-page .stitch-order-identity-line small { display: inline; overflow: hidden; color: #0f1c2d; font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.stitch-orders-page .stitch-order-identity-line b { color: #ba1a1a; font-size: 11px; line-height: 14px; white-space: nowrap; }
.stitch-orders-page .stitch-order-identity-line > span { flex: 0 0 auto; color: #505f74; font: 400 11px/14px var(--mono); white-space: nowrap; }
.stitch-orders-page .stitch-order-identity .stitch-kv-grid { margin-top: 6px; padding: 4px 0 0; border-top: 1px solid #dce3ec; border-bottom: 0; }
.stitch-orders-page .stitch-order-identity .stitch-kv-grid span { color: #505f74; font: 400 11px/14px var(--mono); }
.stitch-orders-page .stitch-order-identity .stitch-kv-grid strong { display: inline; margin-left: 3px; color: #0f1c2d; font: inherit; }

.stitch-orders-page .stitch-trace-list { flex: 1 1 auto; min-height: 0; margin-left: 8px; padding: 4px 0 4px 12px; overflow: auto; border-left: 1px solid #c2c6d5; }
.stitch-orders-page .stitch-trace-event { min-height: 52px; padding: 3px 0 8px 12px; border-left: 0; }
.stitch-orders-page .stitch-trace-event > i { left: -17px; top: 5px; width: 10px; height: 10px; border-width: 2px; }
.stitch-orders-page .stitch-trace-event.stitch-trace-fill > i { background: #ba1a1a; }
.stitch-orders-page .stitch-trace-event.stitch-trace-final > i { background: #07875f; }
.stitch-orders-page .stitch-trace-event strong { font-size: 12px; line-height: 16px; }
.stitch-orders-page .stitch-trace-event small { margin-top: 2px; font: 400 11px/14px var(--mono); }
.stitch-orders-page .stitch-trace-event time { font: 400 11px/14px var(--mono); }
.stitch-orders-page .stitch-inline-empty { flex: 1 1 auto; display: grid; place-content: center; min-height: 120px; padding: 8px; }

.stitch-orders-page .stitch-fills { flex: 0 0 123px; min-height: 123px; display: flex; flex-direction: column; padding-top: 4px; border-top: 1px solid #dce3ec; }
.stitch-orders-page .stitch-subhead { min-height: 20px; padding: 0 0 5px; background: #fff; border: 0; }
.stitch-orders-page .stitch-subhead strong,
.stitch-orders-page .stitch-subhead span { font-size: 11px; line-height: 14px; }
.stitch-orders-page .stitch-mini-table { flex: 1 1 auto; max-height: 70px; border: 1px solid #dce3ec; overflow: auto; }
.stitch-orders-page .stitch-mini-table table { min-width: 360px; }
.stitch-orders-page .stitch-mini-table th { height: 23px; padding: 4px 8px; font-size: 11px; line-height: 14px; }
.stitch-orders-page .stitch-mini-table td { height: 23px; padding: 4px 8px; font: 400 11px/14px var(--mono); }
.stitch-orders-page .stitch-mini-table td:not(:first-child),
.stitch-orders-page .stitch-mini-table th:not(:first-child) { text-align: right; }
.stitch-orders-page .stitch-mini-table .stitch-table-empty { min-height: 46px; }
.stitch-orders-page .stitch-fills-summary { min-height: 22px; margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 8px; color: #505f74; background: #eff4ff; font: 400 11px/14px var(--mono); }
.stitch-orders-page .stitch-fills-summary span { white-space: nowrap; }
.stitch-orders-page .stitch-fills-summary strong { color: #0f1c2d; }
.stitch-orders-page .stitch-fills-summary span:nth-child(2) strong { color: #ba1a1a; }

.stitch-orders-page .stitch-safety-card { height: 161.75px; flex: 0 0 161.75px; min-height: 161.75px; padding: 8px; color: #0f1c2d; background: #fff4f2; border: 1px solid #ba1a1a; border-radius: 2px; overflow: auto; }
.stitch-orders-page .stitch-safety-card.stitch-safety-critical { color: #0f1c2d; background: #fff4f2; border-color: #ba1a1a; }
.stitch-orders-page .stitch-safety-title { display: flex; align-items: center; gap: 6px; color: #ba1a1a; }
.stitch-orders-page .stitch-safety-title .material-symbols-outlined { font-size: 18px; }
.stitch-orders-page .stitch-safety-title strong { font-size: 14px; line-height: 20px; }
.stitch-orders-page .stitch-safety-card p { margin: 8px 0; font-size: 12px; line-height: 18px; }
.stitch-orders-page .stitch-lock-note { padding: 8px; color: #ba1a1a; background: #fff; border: 1px solid #e7a5a5; font: 400 11px/17px var(--mono); }

@media (max-width: 1600px) and (min-width: 1280px) {
  .stitch-orders-page .stitch-primary-panel { height: 794px; }
  .stitch-orders-page #orders-table { flex: 1 1 auto; }
  .stitch-orders-page .stitch-order-table th { height: 30px; padding-top: 0; padding-bottom: 0; white-space: normal; }
  .stitch-orders-page .stitch-order-table tbody tr { height: 56.5px; }
  .stitch-orders-page .stitch-order-trace-card { height: 560px; flex-basis: 560px; }
  .stitch-orders-page .stitch-safety-card { height: 197.63px; flex-basis: 197.63px; min-height: 197.63px; }
  .stitch-orders-page .stitch-table-summary { min-height: 53px; flex-wrap: wrap; }
  .stitch-orders-page .stitch-order-identity { height: 94px; min-height: 94px; }
}

@media (min-width: 1601px) {
  .stitch-orders-page .stitch-primary-panel { height: 385px; }
  .stitch-orders-page #orders-table { flex: 1 1 auto; }
  .stitch-orders-page .stitch-order-table td:nth-child(3) { padding-right: 6px; padding-left: 6px; }
  .stitch-orders-page .stitch-order-table th:nth-child(1) { width: 15.07878853%; }
  .stitch-orders-page .stitch-order-table th:nth-child(2) { width: 6.78289881%; }
  .stitch-orders-page .stitch-order-table th:nth-child(3) { width: 8.96404517%; }
  .stitch-orders-page .stitch-order-table th:nth-child(4),
  .stitch-orders-page .stitch-order-table th:nth-child(5),
  .stitch-orders-page .stitch-order-table th:nth-child(6) { width: 5.70219101%; }
  .stitch-orders-page .stitch-order-table th:nth-child(7) { width: 6.91025193%; }
  .stitch-orders-page .stitch-order-table th:nth-child(8) { width: 7.53087416%; }
  .stitch-orders-page .stitch-order-table th:nth-child(9) { width: 10.61246087%; }
  .stitch-orders-page .stitch-order-table th:nth-child(10) { width: 10.60349235%; }
  .stitch-orders-page .stitch-order-table th:nth-child(11) { width: 9.59453278%; }
  .stitch-orders-page .stitch-order-table th:nth-child(12) { width: 6.81608237%; }
}

@media (max-width: 1320px) and (min-width: 1280px) {
  .stitch-orders-page .stitch-page-command { height: 113px; min-height: 113px; grid-template-rows: 54px 33px; }
  .stitch-orders-page .stitch-command-row { align-content: space-between; align-items: flex-start; flex-wrap: wrap; row-gap: 0; }
  .stitch-orders-page .stitch-command-row > .stitch-page-title { flex: 1 0 100%; height: 26px; }
  .stitch-orders-page .stitch-command-row > .stitch-actions { height: 26px; }
  .stitch-orders-page .stitch-order-trace-card { height: 614px; flex-basis: 614px; }
  .stitch-orders-page .stitch-fills { flex-basis: 137px; min-height: 137px; }
  .stitch-orders-page .stitch-order-identity { height: 106px; min-height: 106px; }
  .stitch-orders-page .stitch-fills-summary { min-height: 36px; }
}

@media (min-width: 1280px) {
  .stitch-orders-page .stitch-main-grid { grid-template-columns: minmax(0, calc(66.6666667% - 2.6667px)) minmax(0, calc(33.3333333% - 5.3333px)); height: auto !important; }
  .stitch-orders-page .stitch-detail-column { height: auto; min-height: 0; }
}

@media (max-width: 1279px) {
  .stitch-orders-page .stitch-main-grid { grid-template-columns: minmax(0, 1fr); height: auto !important; }
  .stitch-orders-page .stitch-primary-panel,
  .stitch-orders-page .stitch-detail-column { height: auto; min-height: 0; }
  .stitch-orders-page .stitch-order-trace-card { height: auto; min-height: 520px; flex-basis: auto; }
}

/* qmt_6 strict Stitch alignment: portfolio and position exit engine */
.workspace.route-positions,
.app-shell.route-positions {
  scrollbar-width: none;
}
.workspace.route-positions::-webkit-scrollbar,
.app-shell.route-positions::-webkit-scrollbar,
html:has(.workspace.route-positions)::-webkit-scrollbar,
body:has(.workspace.route-positions)::-webkit-scrollbar {
  display: none;
}

@font-face {
  font-family: "Material Symbols QMT6";
  src: url("/fonts/material-symbols-outlined-qmt6.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

.stitch-positions-page .material-symbols-outlined {
  display: inline-block;
  overflow: hidden;
  font-family: "Material Symbols QMT6";
  font-style: normal;
  font-weight: 400;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

.workspace.route-positions:has(#page > .stitch-positions-page) #page {
  padding-bottom: 28px;
}

.stitch-positions-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.stitch-positions-page .stitch-position-hero,
.stitch-positions-page .stitch-position-filter,
.stitch-positions-page .stitch-card {
  border: 0;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(15, 35, 63, .08);
}

.stitch-positions-page .stitch-position-hero {
  height: 106px;
  min-height: 106px;
  padding: 12px;
  background: #fff;
}

.stitch-positions-page .stitch-command-row {
  height: 24px;
  align-items: center;
}

.stitch-positions-page .stitch-page-title {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  overflow: hidden;
}

.stitch-positions-page .stitch-page-title > div {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.stitch-positions-page .stitch-page-title > div .material-symbols-outlined {
  color: #00479f;
  font-size: 20px;
}

.stitch-positions-page .stitch-page-title > div strong {
  color: #0f1c2d;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -.005em;
  white-space: nowrap;
}

.stitch-positions-page .stitch-info-chip,
.stitch-positions-page .stitch-demo-tag {
  max-width: none;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 0;
  border-radius: 2px;
  font: 600 11px/14px var(--sans);
}

.stitch-positions-page .stitch-info-chip {
  color: #004397;
  background: #d8e2ff;
}

.stitch-positions-page .stitch-info-chip-warning {
  color: #93000a;
  background: #ffdad6;
}

.stitch-positions-page .stitch-demo-tag {
  color: #783100;
  background: #ffdbcb;
  letter-spacing: .04em;
}

.stitch-positions-page .stitch-actions {
  gap: 4px;
}

.stitch-positions-page .stitch-actions .button {
  min-height: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 0;
  border-radius: 2px;
  color: #0f1c2d;
  background: #e6eeff;
  font: 400 12px/16px var(--sans);
}

.stitch-positions-page .stitch-actions .button.primary {
  color: #fff;
  background: #00479f;
  font-weight: 500;
}

.stitch-positions-page .stitch-actions .button:disabled {
  color: #737784;
  background: #e6e9ef;
  opacity: .72;
}

.stitch-positions-page .stitch-actions .material-symbols-outlined {
  width: 15px;
  font-size: 15px;
}

.stitch-positions-page .stitch-metric-row {
  height: 50px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

.stitch-positions-page .stitch-metric-row article {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px;
  overflow: hidden;
  background: #eff4ff;
  border: 0;
}

.stitch-positions-page .stitch-metric-row article > small {
  display: block;
  overflow: hidden;
  color: #505f74;
  font: 600 11px/14px var(--sans);
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stitch-positions-page .stitch-metric-row article > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.stitch-positions-page .stitch-metric-row article strong {
  min-width: 0;
  overflow: hidden;
  color: #0f1c2d;
  font: 600 18px/22px var(--mono);
  letter-spacing: -.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stitch-positions-page .stitch-metric-row article span {
  flex: 0 0 auto;
  overflow: hidden;
  color: #505f74;
  font: 400 11px/14px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stitch-positions-page .stitch-metric-row article strong.positive,
.stitch-positions-page .stitch-metric-row article span.positive {
  color: #7f3400 !important;
}

.stitch-positions-page .stitch-metric-row article strong.negative,
.stitch-positions-page .stitch-metric-row article span.negative {
  color: #ba1a1a !important;
}

.stitch-positions-page .stitch-position-filter {
  height: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  overflow: hidden;
  background: #fff;
}

.stitch-positions-page .stitch-tabs {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.stitch-positions-page .stitch-tabs::-webkit-scrollbar { display: none; }

.stitch-positions-page .stitch-tabs button {
  min-height: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  color: #505f74;
  background: transparent;
  border: 0;
  border-radius: 2px;
  font: 400 12px/16px var(--sans);
}

.stitch-positions-page .stitch-tabs button.active {
  color: #fff;
  background: #00479f;
  font-weight: 500;
}

.stitch-tab-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #737784;
}
.stitch-tab-triggered { background: #7f3400; }
.stitch-tab-blocked { background: #ba1a1a; }
.stitch-tab-manual { background: #737784; }
.stitch-positions-page .stitch-tabs button.active .stitch-tab-dot { background: currentColor; }

.stitch-positions-page .stitch-filters {
  flex: 0 0 auto;
  gap: 8px;
  overflow: visible;
}

.stitch-position-search {
  width: 178px;
  height: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #eff4ff;
  border-radius: 2px;
}

.stitch-position-search .material-symbols-outlined {
  flex: 0 0 14px;
  color: #505f74;
  font-size: 14px;
}

.stitch-positions-page .stitch-position-search input {
  width: 144px;
  min-width: 0;
  height: 16px;
  padding: 0;
  color: #0f1c2d;
  background: transparent;
  border: 0;
  outline: 0;
  font: 400 12px/16px var(--sans);
}

.stitch-positions-page .stitch-filters > span {
  color: #505f74;
  font: 400 11px/14px var(--mono);
}

.stitch-positions-page .stitch-main-grid {
  height: auto;
  display: grid;
  gap: 8px;
  align-items: start;
}

.stitch-positions-page .stitch-primary-panel {
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stitch-positions-page .stitch-card-head {
  height: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: #eff4ff;
  border: 0;
}

.stitch-positions-page .stitch-card-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stitch-positions-page .stitch-card-head > div > strong {
  color: #0f1c2d;
  font: 600 14px/20px var(--sans);
}

.stitch-positions-page .stitch-card-head > div > small,
.stitch-positions-page .stitch-card-head > span {
  display: inline;
  color: #505f74;
  font: 400 11px/14px var(--mono);
}

.stitch-positions-page #positions-table {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stitch-positions-page .stitch-table-scroll {
  width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.stitch-positions-page .stitch-table-scroll::-webkit-scrollbar { display: none; }
.stitch-positions-page .stitch-table-scroll:focus-visible {
  outline: 2px solid #1d5fc4;
  outline-offset: -2px;
}

.stitch-positions-page .stitch-position-table tbody tr:focus-visible {
  outline: 2px solid #1d5fc4;
  outline-offset: -2px;
}

.stitch-positions-page .stitch-position-table {
  width: 100%;
  min-width: 881.75px;
  border-collapse: collapse;
  table-layout: auto;
}

.stitch-positions-page .stitch-position-table th {
  width: auto !important;
  height: 28px;
  padding: 4px 8px;
  color: #505f74;
  background: #eff4ff;
  border: 0;
  font: 600 11px/14px var(--sans);
  letter-spacing: .04em;
  text-align: left;
  white-space: normal;
}

.stitch-positions-page .stitch-position-table th:nth-child(3),
.stitch-positions-page .stitch-position-table th:nth-child(4),
.stitch-positions-page .stitch-position-table th:nth-child(5),
.stitch-positions-page .stitch-position-table th:nth-child(6),
.stitch-positions-page .stitch-position-table th:nth-child(7),
.stitch-positions-page .stitch-position-table th:nth-child(8),
.stitch-positions-page .stitch-position-table th:nth-child(9),
.stitch-positions-page .stitch-position-table th:nth-child(10) { text-align: right; }
.stitch-positions-page .stitch-position-table th:nth-child(13) { text-align: center; }

.stitch-positions-page .stitch-position-table td {
  height: 32px;
  padding: 4px 8px;
  color: #0f1c2d;
  border-bottom: 1px solid #eff4ff;
  font: 400 12px/16px var(--sans);
  vertical-align: middle;
  overflow-wrap: normal;
}

.stitch-positions-page .stitch-position-table tbody tr {
  height: 32px;
  cursor: pointer;
}

.stitch-positions-page .stitch-position-table tbody tr:hover { background: #eff4ff; }
.stitch-positions-page .stitch-position-table tbody tr.selected { background: #e6eeff; box-shadow: none; }
.stitch-positions-page .stitch-position-table tbody tr.stitch-position-row-manual { background: #fff8f4; }
.stitch-positions-page .stitch-position-table tbody tr.stitch-position-row-blocked { background: #fff2f0; }

.stitch-positions-page .stitch-code-cell {
  min-width: 96px;
  display: table-cell;
}

.stitch-positions-page .stitch-code-cell > .stitch-position-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 50%;
  vertical-align: 8px;
  background: #737784;
}

.stitch-position-dot-normal { background: #07875f !important; }
.stitch-position-dot-triggered { background: #7f3400 !important; }
.stitch-position-dot-blocked { background: #ba1a1a !important; }

.stitch-positions-page .stitch-code-cell > div {
  max-width: calc(100% - 12px);
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  vertical-align: middle;
}

.stitch-positions-page .stitch-code-cell strong {
  color: #00479f;
  font: 600 12px/14px var(--mono);
}

.stitch-positions-page .stitch-code-cell small {
  margin: 0;
  color: #0f1c2d;
  font: 400 12px/16px var(--sans);
}

.stitch-positions-page .stitch-position-table td small {
  display: block;
  margin: 1px 0 0;
  color: #505f74;
  font: 400 10px/12px var(--sans);
}

.stitch-positions-page .stitch-number {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.stitch-positions-page .stitch-number strong { font-weight: 600; }
.stitch-positions-page .stitch-sellable { color: #07875f !important; font-weight: 600; }
.stitch-positions-page .stitch-last-price { color: #7f3400; font-weight: 600; }

.stitch-strategy-tag,
.stitch-stage-tag,
.stitch-related-order,
.stitch-strategy-unassigned {
  display: inline-block;
  max-width: 128px;
  padding: 1px 5px;
  overflow: hidden;
  color: #505f74;
  background: #dce9ff;
  border-radius: 2px;
  font: 400 11px/14px var(--mono);
  text-overflow: ellipsis;
  white-space: normal;
}

.stitch-strategy-tag { color: #00479f; }
.stitch-strategy-unassigned { color: #93000a; background: #ffdad6; font-weight: 600; }
.stitch-related-order { color: #00479f; background: #e6eeff; }
.stitch-related-unverified { color: #505f74; background: #eff4ff; }

.stitch-position-state {
  max-width: 180px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 2px;
  font: 600 11px/14px var(--sans);
  white-space: normal;
}

.stitch-position-state .material-symbols-outlined { flex: 0 0 12px; width: 12px; font-size: 12px; }
.stitch-position-state-normal { color: #075f43; background: #ecf9f2; }
.stitch-position-state-triggered { color: #783100; background: #ffdbcb; }
.stitch-position-state-blocked { color: #fff; background: #ba1a1a; }
.stitch-position-state-manual { color: #93000a; background: #ffdad6; }
.stitch-position-state-unknown { color: #505f74; background: #eff1f5; }

.stitch-positions-page .stitch-center { text-align: center; }
.stitch-positions-page .stitch-table-empty { min-height: 160px; }

.stitch-positions-page .stitch-table-summary {
  min-height: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px;
  color: #505f74;
  background: #eff4ff;
  border: 0;
  font: 400 11px/14px var(--mono);
}

.stitch-positions-page .stitch-table-summary > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.stitch-positions-page .stitch-table-summary span { white-space: nowrap; }
.stitch-positions-page .stitch-table-summary strong { color: #0f1c2d; font-weight: 500; }
.stitch-summary-separator { color: #c2c6d5; }

.stitch-positions-page .stitch-table-summary .text-button {
  min-height: 20px;
  height: 20px;
  margin-left: auto;
  padding: 2px 8px;
  color: #0f1c2d;
  background: #e6eeff;
  border: 0;
  border-radius: 2px;
  font: 500 12px/16px var(--sans);
  white-space: nowrap;
}

.stitch-positions-page .stitch-detail-column {
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stitch-positions-page .stitch-position-detail-card {
  height: 740px;
  min-height: 740px;
  flex: 0 0 740px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
  background: #fff;
}

.stitch-position-inspector-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stitch-position-inspector-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stitch-position-inspector-head > div > .material-symbols-outlined {
  flex: 0 0 20px;
  color: #00479f;
  font-size: 20px;
}

.stitch-position-inspector-head span { min-width: 0; }
.stitch-position-inspector-head strong,
.stitch-position-inspector-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-position-inspector-head strong { color: #0f1c2d; font: 600 14px/20px var(--sans); }
.stitch-position-inspector-head small { color: #505f74; font: 400 11px/14px var(--mono); }
.stitch-position-inspector-head em { flex: 0 0 auto; padding: 2px 6px; color: #00479f; background: #d8e2ff; border-radius: 2px; font: normal 600 11px/14px var(--mono); }

.stitch-positions-page .stitch-t1-notice {
  margin: 0;
  padding: 8px;
  color: #0f1c2d;
  background: #fff1e9;
  border: 0;
  border-radius: 2px;
}

.stitch-positions-page .stitch-t1-notice > div {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #783100;
}
.stitch-positions-page .stitch-t1-notice .material-symbols-outlined { flex: 0 0 18px; font-size: 18px; }
.stitch-positions-page .stitch-t1-notice strong { font: 600 14px/20px var(--sans); }
.stitch-positions-page .stitch-t1-notice p { margin: 4px 0 0; font: 400 12px/18px var(--sans); }

.stitch-liquidity-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: #eff4ff;
  border-radius: 2px;
}
.stitch-liquidity-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stitch-liquidity-card > div:first-child span { color: #505f74; font: 600 11px/14px var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.stitch-liquidity-card > div:first-child strong { color: #00479f; font: 600 12px/14px var(--mono); }
.stitch-positions-page .stitch-progress { width: 100%; height: 12px; margin: 0; border-radius: 2px; }
.stitch-positions-page .stitch-position-split { margin: 0; gap: 4px; }
.stitch-positions-page .stitch-position-split span { padding: 6px; background: #fff; }
.stitch-positions-page .stitch-position-split span > strong { font: 600 13px/16px var(--mono); }
.stitch-positions-page .stitch-position-split span > small { margin: 2px 0 0; color: #505f74; font: 600 10px/12px var(--sans); }

.stitch-position-conditions { display: flex; flex-direction: column; gap: 6px; }
.stitch-position-section-label { color: #505f74; font: 600 11px/14px var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.stitch-position-condition,
.stitch-position-plan-block,
.stitch-position-price-chart { padding: 8px; background: #eff4ff; border-radius: 2px; }
.stitch-position-condition > div:first-child,
.stitch-position-plan-block > div:first-child,
.stitch-position-price-chart > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stitch-position-condition > div:first-child > strong,
.stitch-position-plan-block > div:first-child > strong { display: flex; align-items: center; gap: 6px; font: 600 13px/18px var(--sans); }
.stitch-position-condition > div:first-child > strong i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #737784; }
.stitch-position-condition-normal > div:first-child > strong i { background: #07875f; }
.stitch-position-condition-blocked > div:first-child > strong i { background: #ba1a1a; }
.stitch-position-condition-triggered > div:first-child > strong i { background: #7f3400; }
.stitch-position-condition-unknown > div:first-child > strong i { background: #737784; }
.stitch-condition-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.stitch-condition-grid span { color: #505f74; font: 400 12px/16px var(--sans); }
.stitch-condition-grid strong { display: block; margin-top: 1px; color: #0f1c2d; font: 500 11px/14px var(--mono); }
.stitch-position-condition footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; color: #505f74; font: 400 11px/14px var(--mono); }

.stitch-position-plan-block > div:first-child > strong .material-symbols-outlined { color: #00479f; font-size: 16px; }
.stitch-position-plan-block > div:first-child > span { color: #00479f; font: 500 11px/14px var(--mono); }
.stitch-position-plan-block dl { display: grid; gap: 2px; margin: 5px 0 0; }
.stitch-position-plan-block dl > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stitch-position-plan-block dt { color: #505f74; font: 400 12px/16px var(--sans); }
.stitch-position-plan-block dd { margin: 0; overflow: hidden; color: #0f1c2d; font: 500 11px/14px var(--mono); text-align: right; text-overflow: ellipsis; white-space: nowrap; }

.stitch-position-price-chart > div:first-child > strong { color: #505f74; font: 600 11px/14px var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.stitch-position-price-chart > div:first-child > span { color: #00479f; font: 400 11px/14px var(--mono); }
.stitch-price-canvas { width: 100%; height: 56px; margin-top: 6px; display: flex; align-items: center; padding: 4px 12px; background: #fff; border-radius: 2px; }
.stitch-price-canvas svg { width: 100%; height: 100%; }

.stitch-positions-page .stitch-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}
.stitch-positions-page .stitch-detail-actions .button {
  min-height: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 10px;
  border: 0;
  border-radius: 2px;
  font: 400 12px/16px var(--sans);
}
.stitch-positions-page .stitch-detail-actions .button.primary { flex: 1 1 auto; background: #7f3400; }
.stitch-positions-page .stitch-detail-actions .button:disabled { color: #737784; background: #e6e9ef; opacity: .72; }
.stitch-positions-page .stitch-detail-actions .material-symbols-outlined { font-size: 16px; }

.stitch-position-protection {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px;
  color: #505f74;
  background: #eff4ff;
  border-radius: 2px;
  font: 400 11px/14px var(--mono);
}
.stitch-position-protection strong { color: #7f3400; }

.stitch-positions-page .stitch-position-empty > .empty { flex: 1 1 auto; display: grid; place-content: center; }

.stitch-positions-page .stitch-reassign-card {
  height: 129px;
  min-height: 129px;
  flex: 0 0 129px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  overflow: hidden;
  background: #fff;
}
.stitch-reassign-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stitch-reassign-head > div { min-width: 0; display: flex; align-items: center; gap: 6px; }
.stitch-reassign-head .material-symbols-outlined { flex: 0 0 18px; color: #737784; font-size: 18px; }
.stitch-reassign-head strong { overflow: hidden; color: #0f1c2d; font: 600 14px/20px var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.stitch-reassign-head > span { flex: 0 0 auto; padding: 1px 6px; color: #783100; background: #ffdbcb; border-radius: 2px; font: 600 11px/14px var(--mono); }
.stitch-positions-page .stitch-reassign-card > p { min-height: 32px; margin: 0; overflow: hidden; color: #505f74; font: 400 12px/16px var(--sans); }
.stitch-positions-page .stitch-reassign-card > p strong { color: #0f1c2d; }
.stitch-positions-page .stitch-inline-form { gap: 8px; margin-top: 0; }
.stitch-positions-page .stitch-inline-form select { min-width: 0; height: 25px; flex: 1 1 auto; padding: 4px 8px; color: #0f1c2d; background: #eff4ff; border: 0; font: 400 12px/16px var(--sans); }
.stitch-positions-page .stitch-inline-form .button { min-height: 24px; height: 24px; padding: 4px 12px; border: 0; font: 500 12px/16px var(--sans); }

@media (min-width: 1280px) {
  .stitch-positions-page .stitch-main-grid {
    grid-template-columns: minmax(0, calc(66.6666667% - 2.6667px)) minmax(0, calc(33.3333333% - 5.3333px));
  }
}

@media (min-width: 1601px) {
  .stitch-positions-page .stitch-position-detail-card {
    height: auto;
    min-height: 704px;
    flex-basis: auto;
  }
  .stitch-positions-page .stitch-reassign-card {
    height: auto;
    min-height: 113px;
    flex-basis: auto;
  }
  .stitch-positions-page .stitch-position-table td { padding-block: 1px; }
}

@media (min-width: 1024px) and (max-width: 1320px) {
  .stitch-positions-page .stitch-position-hero {
    height: 138px;
    min-height: 138px;
  }
  .stitch-positions-page .stitch-command-row {
    height: 56px;
    align-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .stitch-positions-page .stitch-command-row > .stitch-page-title { flex: 1 0 100%; }
  .stitch-positions-page .stitch-metric-row { margin-top: 8px; }
  .stitch-positions-page .stitch-position-detail-card {
    height: auto;
    min-height: 788px;
    flex-basis: auto;
  }
  .stitch-positions-page .stitch-reassign-card {
    height: auto;
    min-height: 144px;
    flex-basis: auto;
  }
}

@media (min-width: 1280px) and (max-width: 1600px) {
  .stitch-positions-page .stitch-primary-panel { height: auto; min-height: 558px; }
  .stitch-positions-page #positions-table { flex: 1 1 auto; }
  .stitch-positions-page .stitch-table-scroll { flex: 1 1 auto; }
}

@media (max-width: 1279px) {
  .stitch-positions-page .stitch-main-grid { grid-template-columns: minmax(0, 1fr); }
  .stitch-positions-page .stitch-primary-panel { height: auto; min-height: 342px; }
  .stitch-positions-page .stitch-detail-column { height: auto; min-height: 0; }
  .stitch-positions-page .stitch-position-detail-card { height: auto; min-height: 685px; flex-basis: auto; }
  .stitch-positions-page .stitch-reassign-card { height: auto; min-height: 97px; flex-basis: auto; }
  .stitch-positions-page #positions-table { flex: 1 1 auto; }
  .stitch-positions-page .stitch-table-scroll { flex: 1 1 auto; }
  .stitch-positions-page .stitch-position-table { min-width: 881.75px; }
}

/* qmt_7 strict Stitch alignment: risk controls and audit evidence */
.stitch-risk-page .material-symbols-outlined {
  display: inline-block;
  overflow: hidden;
  font-family: "Material Symbols QMT5";
  font-style: normal;
  font-weight: 400;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

.stitch-risk-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  font-size: 12px;
}

.stitch-risk-page .stitch-risk-command {
  height: 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(28, 45, 70, .06);
}
.stitch-risk-title {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.stitch-risk-title-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  color: #783100;
  background: #ffdbcb;
  border-radius: 2px;
}
.stitch-risk-title-icon .material-symbols-outlined { font-size: 20px; }
.stitch-risk-title > div { min-width: 0; overflow: hidden; }
.stitch-risk-title > div > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.stitch-risk-title strong,
.stitch-risk-title small,
.stitch-risk-title code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-title strong { flex: 0 1 auto; color: #0f1c2d; font: 600 14px/18px var(--sans); }
.stitch-risk-title code {
  max-width: 205px;
  padding: 1px 4px;
  color: #00479f;
  background: #d8e2ff;
  border-radius: 2px;
  font: 500 10px/13px var(--mono);
}
.stitch-risk-title .stitch-demo-tag { flex: 0 0 auto; padding: 2px 6px; font: 600 10px/13px var(--sans); }
.stitch-risk-title small { display: block; margin-top: 1px; color: #505f74; font: 400 10px/13px var(--sans); }
.stitch-risk-page .stitch-actions { min-width: 0; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.stitch-risk-page .stitch-actions .button,
.stitch-risk-page .stitch-actions .stitch-info-chip {
  min-height: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 9px;
  border: 0;
  border-radius: 2px;
  font: 400 11px/16px var(--sans);
  white-space: nowrap;
}
.stitch-risk-page .stitch-actions .stitch-info-chip {
  color: #505f74;
  background: #eff4ff;
  cursor: pointer;
}
.stitch-risk-page .stitch-actions .stitch-info-chip-warning { color: #783100; background: #fff1e9; }
.stitch-risk-page .stitch-actions .button { color: #0f1c2d; background: #eff4ff; }
.stitch-risk-page .stitch-actions .button.primary { color: #fff; background: #00479f; }
.stitch-risk-page .stitch-actions .material-symbols-outlined { flex: 0 0 16px; font-size: 16px; }

.stitch-risk-page .stitch-risk-metrics {
  height: 104px;
  min-height: 104px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  background: transparent;
  border: 0;
}
.stitch-risk-page .stitch-risk-metrics article {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding: 8px;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(28, 45, 70, .06);
}
.stitch-risk-page .stitch-risk-metrics article::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 0;
}
.stitch-risk-page .stitch-risk-metrics article.stitch-risk-metric-danger::after { width: 5px; background: #ba1a1a; }
.stitch-risk-page .stitch-risk-metrics article.stitch-risk-metric-warning::after { width: 5px; background: #7f3400; }
.stitch-risk-page .stitch-risk-metrics article.stitch-risk-metric-success::after { width: 5px; background: #07875f; }
.stitch-risk-page .stitch-risk-metrics article > div:first-child { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.stitch-risk-page .stitch-risk-metrics small {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #505f74;
  font: 600 10px/13px var(--sans);
  letter-spacing: .02em;
  text-transform: none;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.stitch-risk-page .stitch-risk-metrics .material-symbols-outlined { flex: 0 0 18px; color: #00479f; font-size: 18px; }
.stitch-risk-page .stitch-risk-metric-danger .material-symbols-outlined,
.stitch-risk-page .stitch-risk-metric-danger > strong { color: #ba1a1a; }
.stitch-risk-page .stitch-risk-metric-warning .material-symbols-outlined,
.stitch-risk-page .stitch-risk-metric-warning > strong { color: #783100; }
.stitch-risk-page .stitch-risk-metric-success .material-symbols-outlined { color: #07875f; }
.stitch-risk-page .stitch-risk-metrics article > strong {
  display: block;
  overflow: hidden;
  color: #0f1c2d;
  font: 700 16px/20px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stitch-risk-page .stitch-risk-metrics article > span {
  min-height: 22px;
  display: -webkit-box;
  overflow: hidden;
  color: #505f74;
  font: 400 9px/11px var(--sans);
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stitch-risk-page .stitch-risk-main {
  height: 626px;
  min-height: 626px;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 12px;
  align-items: start;
}
.stitch-risk-page .stitch-risk-matrix {
  height: 626px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(28, 45, 70, .06);
}
.stitch-risk-page .stitch-risk-table-tools {
  height: 62px;
  min-height: 62px;
  flex: 0 0 62px;
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  padding: 6px 12px;
  overflow: hidden;
  background: #eff4ff;
}
.stitch-risk-page .stitch-risk-table-tools > div:first-child { min-width: 0; }
.stitch-risk-page .stitch-risk-table-tools > div:first-child > strong {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: #0f1c2d;
  font: 600 13px/18px var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stitch-risk-page .stitch-risk-table-tools > div:first-child > strong > span:not(.material-symbols-outlined) { font: 400 10px/14px var(--mono); }
.stitch-risk-page .stitch-risk-table-tools > div:first-child .material-symbols-outlined {
  flex: 0 0 18px;
  margin-top: 0;
  color: #00479f;
  font-family: "Material Symbols QMT5";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  font-feature-settings: "liga";
}
.stitch-risk-page .stitch-risk-table-tools > div:first-child > small { display: block; margin-top: 2px; color: #505f74; font: 400 9px/12px var(--mono); }
.stitch-risk-tool-actions { min-width: 0; display: flex; align-items: center; gap: 6px; }
.stitch-risk-search {
  width: 192px;
  height: 24px;
  flex: 0 0 192px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(28, 45, 70, .05);
}
.stitch-risk-search .material-symbols-outlined { flex: 0 0 16px; color: #505f74; font-size: 16px; }
.stitch-risk-search input { width: 100%; min-width: 0; height: 20px; padding: 0; color: #0f1c2d; background: transparent; border: 0; outline: 0; font: 400 10px/14px var(--sans); }
.stitch-risk-page .stitch-risk-table-tools .stitch-tabs { width: auto; display: flex; align-items: center; gap: 2px; }
.stitch-risk-page .stitch-risk-table-tools .stitch-tabs button {
  height: 24px;
  padding: 4px 7px;
  color: #505f74;
  background: #e6e9ef;
  border: 0;
  border-radius: 2px;
  font: 500 9px/14px var(--mono);
  white-space: nowrap;
}
.stitch-risk-page .stitch-risk-table-tools .stitch-tabs button.active { color: #fff; background: #00479f; }
.stitch-risk-page .stitch-risk-table-tools .stitch-tabs button[data-stitch-risk-tab="attention"].active { color: #410002; background: #ffdad6; }

.stitch-risk-page #stitch-risk-table { min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.stitch-risk-page #stitch-risk-table > .stitch-table-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  background: #fff;
  scrollbar-gutter: auto;
  scrollbar-width: thin;
}
.stitch-risk-page #stitch-risk-table > .stitch-table-scroll:focus-visible { outline: 2px solid #00479f; outline-offset: -2px; }
.stitch-risk-page .stitch-risk-table {
  width: 100%;
  min-width: 827px;
  table-layout: fixed;
  border-collapse: collapse;
  color: #0f1c2d;
  font: 400 10px/14px var(--sans);
}
.stitch-risk-page .stitch-risk-table th {
  height: 34px;
  padding: 5px 7px;
  color: #505f74;
  background: #e0eaff;
  border: 0;
  font: 600 9px/12px var(--sans);
  letter-spacing: .02em;
  text-align: left;
  text-transform: none;
}
.stitch-risk-page .stitch-risk-table th:nth-child(1) { width: 190px; }
.stitch-risk-page .stitch-risk-table th:nth-child(2) { width: 120px; }
.stitch-risk-page .stitch-risk-table th:nth-child(3) { width: 100px; }
.stitch-risk-page .stitch-risk-table th:nth-child(4) { width: 85px; }
.stitch-risk-page .stitch-risk-table th:nth-child(5) { width: 90px; }
.stitch-risk-page .stitch-risk-table th:nth-child(6) { width: 70px; }
.stitch-risk-page .stitch-risk-table th:nth-child(7) { width: 100px; }
.stitch-risk-page .stitch-risk-table th:nth-child(8) { width: 72px; }
.stitch-risk-page .stitch-risk-table th:nth-child(3),
.stitch-risk-page .stitch-risk-table th:nth-child(4),
.stitch-risk-page .stitch-risk-table th:nth-child(5),
.stitch-risk-page .stitch-risk-table td:nth-child(3),
.stitch-risk-page .stitch-risk-table td:nth-child(4),
.stitch-risk-page .stitch-risk-table td:nth-child(5) { text-align: right; }
.stitch-risk-page .stitch-risk-table th:nth-child(6),
.stitch-risk-page .stitch-risk-table td:nth-child(6) { text-align: center; }
.stitch-risk-page .stitch-risk-table th:nth-child(8),
.stitch-risk-page .stitch-risk-table td:nth-child(8) { text-align: right; }
.stitch-risk-page .stitch-risk-table tr { height: 52px; }
.stitch-risk-page .stitch-risk-table tr[data-stitch-risk-id="RSK-04"] { height: 84px; }
.stitch-risk-page .stitch-risk-table tr[data-stitch-risk-id="RSK-07"],
.stitch-risk-page .stitch-risk-table tr[data-stitch-risk-id="RSK-08"] { height: 62px; }
.stitch-risk-page .stitch-risk-table tr.stitch-risk-row-danger { background: #fff7f6; }
.stitch-risk-page .stitch-risk-table tr.stitch-risk-row-warning { background: #fffaf6; }
.stitch-risk-page .stitch-risk-table tr.selected { box-shadow: inset 2px 0 #00479f; }
.stitch-risk-page .stitch-risk-table tr:focus-visible { outline: 2px solid #00479f; outline-offset: -2px; }
.stitch-risk-page .stitch-risk-table td {
  height: auto;
  padding: 5px 7px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #eef1f6;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.stitch-risk-page .stitch-risk-table tbody tr:last-child td { border-bottom: 0; }
.stitch-risk-page .stitch-risk-name { display: table-cell; }
.stitch-risk-page .stitch-risk-name > i {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  background: #00479f;
  border-radius: 50%;
  vertical-align: middle;
}
.stitch-risk-page .stitch-risk-row-danger .stitch-risk-name > i { background: #ba1a1a; }
.stitch-risk-page .stitch-risk-row-warning .stitch-risk-name > i { background: #7f3400; }
.stitch-risk-page .stitch-risk-name strong {
  width: 46px;
  display: inline-block;
  color: #00479f;
  font: 600 9px/13px var(--mono);
  vertical-align: middle;
}
.stitch-risk-page .stitch-risk-row-danger .stitch-risk-name strong { color: #ba1a1a; }
.stitch-risk-page .stitch-risk-row-warning .stitch-risk-name strong { color: #783100; }
.stitch-risk-page .stitch-risk-name span { width: calc(100% - 62px); display: inline-block; font-weight: 600; vertical-align: middle; }
.stitch-risk-source { display: inline; color: #505f74; background: #e6e9ef; font: 400 9px/12px var(--mono); }
.stitch-risk-page .stitch-number { font-family: var(--mono); }
.stitch-risk-page .stitch-risk-state { display: inline-flex; max-width: 100%; padding: 2px 5px; border-radius: 2px; font: 600 9px/12px var(--sans); text-align: center; }
.stitch-risk-page .stitch-risk-state-success { color: #006c4c; background: #c8f7e5; }
.stitch-risk-page .stitch-risk-state-warning { color: #783100; background: #ffdbcb; }
.stitch-risk-page .stitch-risk-state-danger { color: #fff; background: #ba1a1a; }
.stitch-risk-page .stitch-risk-state-neutral { color: #505f74; background: #e6e9ef; }
.stitch-risk-page .stitch-risk-table .text-button { padding: 0; color: #00479f; font: 500 9px/13px var(--mono); text-align: right; white-space: normal; }
.stitch-risk-page .stitch-risk-table-foot {
  height: 24px;
  min-height: 24px;
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 10px;
  overflow: hidden;
  color: #505f74;
  background: #e0eaff;
  font: 400 8px/12px var(--mono);
}
.stitch-risk-page .stitch-risk-table-foot span { min-width: 0; display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-risk-table-foot .material-symbols-outlined { flex: 0 0 14px; color: #00479f; font-size: 14px; }
.stitch-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.stitch-risk-page .stitch-risk-detail {
  width: 380px;
  height: 626px;
  min-height: 626px;
  max-height: 626px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  overflow: auto;
  background: #fff;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(28, 45, 70, .06);
}
.stitch-risk-detail-head { min-height: 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stitch-risk-detail-head > div { min-width: 0; display: flex; align-items: center; gap: 5px; }
.stitch-risk-detail-head .material-symbols-outlined { flex: 0 0 20px; color: #00479f; font-size: 20px; }
.stitch-risk-detail-head h2 { margin: 0; overflow: hidden; color: #0f1c2d; font: 600 13px/18px var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-detail-head > span { flex: 0 0 auto; padding: 2px 5px; color: #505f74; background: #e6e9ef; font: 600 9px/12px var(--mono); }
.stitch-risk-page .stitch-risk-detail-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  padding: 8px;
  background: #eff4ff;
  border: 0;
  border-radius: 2px;
}
.stitch-risk-page .stitch-risk-detail-title > div { min-width: 0; display: flex; align-items: center; gap: 5px; }
.stitch-risk-page .stitch-risk-detail-title strong { overflow: hidden; font: 600 12px/16px var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-risk-detail-title code { flex: 0 0 auto; color: #505f74; font: 500 9px/12px var(--mono); }
.stitch-risk-page .stitch-risk-detail-title > span:last-child { grid-column: 1 / -1; overflow: hidden; color: #505f74; font: 400 9px/12px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-risk-formula { display: grid; gap: 0; padding: 0 8px; background: #eff4ff; border-radius: 2px; }
.stitch-risk-page .stitch-risk-formula span { min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; color: #505f74; font: 400 9px/13px var(--sans); border-bottom: 1px solid #dfe6f2; }
.stitch-risk-page .stitch-risk-formula span:last-child { border-bottom: 0; }
.stitch-risk-page .stitch-risk-formula strong { max-width: 65%; overflow: hidden; color: #0f1c2d; font: 600 10px/13px var(--mono); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-unknown-block { margin: 0; padding: 8px; color: #505f74; background: #f8f9ff; border: 1px solid #d9e0ec; border-radius: 2px; }
.stitch-risk-page .stitch-unknown-block strong { font: 600 10px/13px var(--sans); }
.stitch-risk-page .stitch-unknown-block p { margin: 4px 0 0; font: 400 9px/14px var(--sans); }
.stitch-risk-page .stitch-subhead { min-height: 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0; }
.stitch-risk-page .stitch-subhead strong { font: 600 10px/14px var(--sans); }
.stitch-risk-page .stitch-subhead span { overflow: hidden; color: #505f74; font: 400 8px/12px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-kv-list { display: grid; gap: 0; padding: 0 8px; background: #eff4ff; border-radius: 2px; }
.stitch-risk-page .stitch-kv-list span { min-height: 21px; padding: 3px 0; font-size: 8px; }
.stitch-risk-page .stitch-kv-list strong { font-size: 8px; }
.stitch-risk-page .stitch-risk-log { display: grid; gap: 3px; padding: 0; }
.stitch-risk-page .stitch-risk-log > div { min-height: 29px; display: grid; grid-template-columns: 105px 1fr; gap: 1px 7px; padding: 4px 6px; background: #eff4ff; }
.stitch-risk-page .stitch-risk-log time { grid-row: span 2; color: #505f74; font: 400 8px/12px var(--mono); }
.stitch-risk-page .stitch-risk-log strong { font: 600 8px/11px var(--mono); text-align: right; }
.stitch-risk-page .stitch-risk-log span { overflow: hidden; color: #505f74; font: 400 8px/11px var(--sans); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-risk-detail > .button.wide { width: 100%; min-height: 28px; height: 28px; margin: 0; padding: 5px 8px; border: 0; border-radius: 2px; font: 500 10px/14px var(--sans); }

.stitch-risk-page .stitch-risk-bottom {
  height: 48px;
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 7px;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(28, 45, 70, .06);
}
.stitch-risk-page .stitch-risk-bottom article { min-width: 0; padding: 0 12px; border-right: 1px solid #d9e0ec; }
.stitch-risk-page .stitch-risk-bottom article:last-child { border-right: 0; }
.stitch-risk-page .stitch-risk-bottom small,
.stitch-risk-page .stitch-risk-bottom strong,
.stitch-risk-page .stitch-risk-bottom span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-risk-bottom small { color: #505f74; font: 400 8px/11px var(--sans); }
.stitch-risk-page .stitch-risk-bottom strong { margin-top: 1px; color: #0f1c2d; font: 600 11px/14px var(--mono); }
.stitch-risk-page .stitch-risk-bottom span { color: #505f74; font: 400 7px/9px var(--sans); }

/* qmt_7 Stitch source typography and internal hierarchy. */
.stitch-risk-page { font: 400 13px/18px var(--sans); }
.stitch-risk-page .material-symbols-outlined { font-family: "Material Symbols QMT5"; font-style: normal; font-weight: 400; line-height: 1; }
.stitch-risk-title strong { font: 600 14px/20px var(--sans); }
.stitch-risk-title code { max-width: 240px; font: 400 11px/14px var(--mono); }
.stitch-risk-title .stitch-demo-tag { font: 600 11px/14px var(--sans); }
.stitch-risk-title small { font: 400 12px/16px var(--sans); }
.stitch-risk-page .stitch-actions .button { font: 400 12px/16px var(--sans); }
.stitch-risk-page .stitch-actions .stitch-info-chip { font: 400 11px/14px var(--mono); }
.stitch-risk-page .stitch-actions .stitch-info-chip { cursor: default; }
.stitch-risk-page .stitch-actions .stitch-info-chip > i { width: 8px; height: 8px; flex: 0 0 8px; background: #00479f; border-radius: 50%; }

.stitch-risk-page .stitch-risk-metrics article { gap: 0; }
.stitch-risk-page .stitch-risk-metrics article.stitch-risk-metric-danger::after,
.stitch-risk-page .stitch-risk-metrics article.stitch-risk-metric-warning::after,
.stitch-risk-page .stitch-risk-metrics article.stitch-risk-metric-success::after { width: 6px; }
.stitch-risk-page .stitch-risk-metric-top { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stitch-risk-page .stitch-risk-metrics .stitch-risk-metric-top small {
  display: block;
  overflow: hidden;
  font: 600 11px/14px var(--sans);
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.stitch-risk-page .stitch-risk-metric-middle { min-width: 0; margin: 4px 0; }
.stitch-risk-page .stitch-risk-metric-middle > strong,
.stitch-risk-page .stitch-risk-metric-value > strong {
  color: #0f1c2d;
  font: 700 18px/22px var(--mono);
  letter-spacing: -.03em;
}
.stitch-risk-page .stitch-risk-metric-overall .stitch-risk-metric-middle > strong {
  display: block;
  overflow: hidden;
  color: #783100;
  font: 700 14px/20px var(--sans);
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stitch-risk-page .stitch-risk-metric-danger .stitch-risk-metric-middle > strong,
.stitch-risk-page .stitch-risk-metric-danger .stitch-risk-metric-value > strong { color: #ba1a1a; }
.stitch-risk-page .stitch-risk-metric-middle > code {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: #505f74;
  font: 400 11px/14px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stitch-risk-page .stitch-risk-metric-value { min-width: 0; display: flex; align-items: baseline; gap: 5px; }
.stitch-risk-page .stitch-risk-metric-value > span {
  min-width: 0;
  overflow: hidden;
  color: #505f74;
  font: 400 11px/14px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stitch-risk-page .stitch-risk-progress { width: 100%; height: 6px; margin-top: 6px; overflow: hidden; background: #dce9ff; border-radius: 12px; }
.stitch-risk-page .stitch-risk-progress > i { width: 0; height: 100%; display: block; background: #00479f; border-radius: inherit; }
.stitch-risk-page .stitch-risk-metric-foot {
  min-width: 0;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px;
  overflow: hidden;
  color: #505f74;
  background: #eff4ff;
  border-radius: 2px;
  font: 400 12px/16px var(--sans);
}
.stitch-risk-page .stitch-risk-metric-foot > span,
.stitch-risk-page .stitch-risk-metric-foot > code,
.stitch-risk-page .stitch-risk-metric-foot > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-risk-metric-foot > code { font: 400 11px/14px var(--mono); }
.stitch-risk-page .stitch-risk-metric-foot > b { color: #00479f; font: 500 13px/16px var(--mono); }
.stitch-risk-page .stitch-risk-metric-danger .stitch-risk-metric-foot > b { color: #ba1a1a; }

.stitch-risk-page .stitch-risk-table-tools > div:first-child { min-width: 0; display: flex; align-items: center; gap: 8px; }
.stitch-risk-page .stitch-risk-table-tools > div:first-child > strong { font: 600 14px/20px var(--sans); }
.stitch-risk-page .stitch-risk-table-tools > div:first-child > strong > span:not(.material-symbols-outlined) { font: 600 14px/20px var(--sans); }
.stitch-risk-page .stitch-risk-table-tools > div:first-child > small {
  display: inline-block;
  margin: 0;
  padding: 2px 4px;
  color: #505f74;
  background: #e6eeff;
  border-radius: 2px;
  font: 400 11px/14px var(--mono);
  white-space: nowrap;
}
.stitch-risk-search input { font: 400 12px/16px var(--sans); }
.stitch-risk-page .stitch-risk-table-tools .stitch-tabs button { font: 400 11px/14px var(--mono); }
.stitch-risk-page .stitch-risk-table {
  min-width: 827px;
  table-layout: auto;
  font: 400 13px/18px var(--sans);
}
.stitch-risk-page .stitch-risk-table th {
  padding: 8px;
  font: 700 11px/14px var(--sans);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.stitch-risk-page .stitch-risk-table th:nth-child(n) { width: auto; }
.stitch-risk-page .stitch-risk-table td { padding: 8px; overflow-wrap: normal; font: 400 11px/14px var(--sans); word-break: normal; }
.stitch-risk-page .stitch-risk-name > i { margin-right: 4px; }
.stitch-risk-page .stitch-risk-name strong { width: auto; margin-right: 4px; font: 600 11px/14px var(--mono); }
.stitch-risk-page .stitch-risk-name span { width: auto; display: inline; font: 500 13px/18px var(--sans); }
.stitch-risk-source { padding: 1px 2px; font: 400 11px/14px var(--mono); }
.stitch-risk-page .stitch-number { font: 500 13px/16px var(--mono); letter-spacing: -.02em; }
.stitch-risk-page .stitch-risk-table td.stitch-number { font: 500 13px/16px var(--mono); letter-spacing: -.02em; }
.stitch-risk-page .stitch-risk-state { padding: 2px 4px; font: 600 11px/14px var(--sans); letter-spacing: .04em; }
.stitch-risk-page .stitch-risk-table .text-button { font: 400 11px/14px var(--mono); }
.stitch-risk-page .stitch-risk-table-foot { font: 400 11px/14px var(--mono); }

.stitch-risk-detail-head h2 { font: 600 14px/20px var(--sans); }
.stitch-risk-detail-head > span { font: 600 11px/14px var(--mono); }
.stitch-risk-page .stitch-risk-detail-title { min-height: 50px; padding: 8px; }
.stitch-risk-page .stitch-risk-detail-title strong { font: 700 14px/20px var(--sans); }
.stitch-risk-page .stitch-risk-detail-title code { font: 400 11px/14px var(--mono); }
.stitch-risk-page .stitch-risk-detail-title > .stitch-risk-detail-meta {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  color: #505f74;
  font: 400 11px/14px var(--mono);
}
.stitch-risk-page .stitch-risk-detail-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-risk-calculation { display: flex; flex-direction: column; gap: 4px; padding: 8px; background: #e6eeff; border-radius: 2px; }
.stitch-risk-page .stitch-risk-calc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #505f74; font: 600 11px/14px var(--mono); text-transform: uppercase; }
.stitch-risk-page .stitch-risk-calc-head > span { overflow: hidden; color: #ba1a1a; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-risk-formula { padding: 0; background: transparent; }
.stitch-risk-page .stitch-risk-formula span { min-height: 24px; padding: 4px 0; font: 400 11px/14px var(--mono); }
.stitch-risk-page .stitch-risk-formula strong { font: 500 13px/16px var(--mono); letter-spacing: -.02em; }
.stitch-risk-page .stitch-risk-config-hint { padding: 5px; color: #505f74; background: #fff; border: 1px solid #c2c6d5; border-radius: 2px; }
.stitch-risk-page .stitch-risk-config-hint > div { display: flex; align-items: center; gap: 4px; color: #0f1c2d; }
.stitch-risk-page .stitch-risk-config-hint .material-symbols-outlined { flex: 0 0 14px; color: #00479f; font-size: 14px; }
.stitch-risk-page .stitch-risk-config-hint strong { font: 600 11px/14px var(--sans); }
.stitch-risk-page .stitch-risk-config-hint p { margin: 2px 0 0; font: 400 11px/16px var(--mono); }
.stitch-risk-page .stitch-risk-log-section,
.stitch-risk-page .stitch-risk-flow { display: flex; flex-direction: column; gap: 4px; }
.stitch-risk-page .stitch-subhead strong { color: #505f74; font: 600 11px/14px var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.stitch-risk-page .stitch-subhead span { font: 400 11px/14px var(--mono); }
.stitch-risk-page .stitch-risk-log { gap: 4px; }
.stitch-risk-page .stitch-risk-log > div { min-height: 42px; display: flex; align-items: flex-start; gap: 5px; padding: 5px; }
.stitch-risk-page .stitch-risk-log > div > .material-symbols-outlined { flex: 0 0 14px; margin-top: 1px; color: #505f74; font-size: 14px; }
.stitch-risk-page .stitch-risk-log > div > div { min-width: 0; flex: 1 1 auto; }
.stitch-risk-page .stitch-risk-log > div > div > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stitch-risk-page .stitch-risk-log time,
.stitch-risk-page .stitch-risk-log strong,
.stitch-risk-page .stitch-risk-log span { font: 400 11px/14px var(--mono); text-align: left; }
.stitch-risk-page .stitch-risk-log strong { color: #00479f; font-weight: 500; }
.stitch-risk-page .stitch-risk-log span { display: block; overflow: hidden; color: #0f1c2d; text-overflow: ellipsis; white-space: nowrap; }
.stitch-risk-page .stitch-risk-log > div > .material-symbols-outlined { font-family: "Material Symbols QMT5"; font-size: 14px; font-weight: 400; line-height: 1; }
.stitch-risk-page .stitch-risk-flow > div:last-child { padding: 6px; background: #eff4ff; border: 1px solid #d9e0ec; border-radius: 2px; }
.stitch-risk-page .stitch-risk-flow p { margin: 0 0 5px; color: #505f74; font: 400 12px/16px var(--sans); }
.stitch-risk-page .stitch-risk-flow .button.wide { width: 100%; min-height: 28px; height: 28px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 4px; font: 500 12px/16px var(--sans); }
.stitch-risk-page .stitch-risk-flow .button.wide .material-symbols-outlined { font-size: 16px; }
.stitch-risk-page .stitch-risk-lock-note { min-height: 14px; display: flex; align-items: center; justify-content: center; gap: 4px; color: #505f74; font: 400 10px/14px var(--mono); text-align: center; }
.stitch-risk-page .stitch-risk-lock-note .material-symbols-outlined { flex: 0 0 12px; font-size: 12px; }

.stitch-risk-page .stitch-risk-bottom { padding: 8px; }
.stitch-risk-page .stitch-risk-bottom article { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0; border-right: 0; }
.stitch-risk-page .stitch-risk-bottom article > .material-symbols-outlined {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  color: #00479f;
  background: #e6eeff;
  border-radius: 2px;
  font-family: "Material Symbols QMT5";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  font-feature-settings: "liga";
  letter-spacing: normal;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}
.stitch-risk-page .stitch-risk-bottom article:nth-child(3) > .material-symbols-outlined { color: #ba1a1a; }
.stitch-risk-page .stitch-risk-bottom article > div { min-width: 0; }
.stitch-risk-page .stitch-risk-bottom small { font: 600 11px/14px var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.stitch-risk-page .stitch-risk-bottom strong { margin: 0; font: 600 13px/16px var(--mono); letter-spacing: -.02em; }

.stitch-risk-manager { width: min(860px, calc(100vw - 30px)); }
.stitch-risk-manager form { padding: 12px; }
.stitch-risk-manager .notice { margin-bottom: 10px; }
.stitch-risk-manager .stitch-switch-grid { margin-bottom: 8px; }
.stitch-risk-manager .stitch-risk-input-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stitch-risk-manager .stitch-risk-emergency {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 9px;
  color: #410002;
  background: #ffdad6;
  border: 1px solid #ba1a1a;
}
.stitch-risk-manager .stitch-risk-emergency > div { min-width: 0; }
.stitch-risk-manager .stitch-risk-emergency strong,
.stitch-risk-manager .stitch-risk-emergency span { display: block; }
.stitch-risk-manager .stitch-risk-emergency strong { font-size: 11px; }
.stitch-risk-manager .stitch-risk-emergency span { margin-top: 3px; font-size: 9px; }
.stitch-risk-manager .stitch-risk-emergency .button { flex: 0 0 auto; }
.stitch-risk-manager .stitch-risk-manager-spacer { flex: 1 1 auto; }

@media (min-width: 1601px) {
  .stitch-risk-page .stitch-risk-main { height: 590.5px; min-height: 590.5px; }
  .stitch-risk-page .stitch-risk-matrix { height: auto; min-height: 0; }
  .stitch-risk-page .stitch-risk-table-tools { height: 38px; min-height: 38px; flex-basis: 38px; padding-block: 4px; }
  .stitch-risk-page .stitch-risk-table-tools > div:first-child { display: flex; align-items: center; gap: 8px; }
  .stitch-risk-page .stitch-risk-table-tools > div:first-child > small { margin: 0; }
  .stitch-risk-page .stitch-risk-table { min-width: 100%; }
  .stitch-risk-page .stitch-risk-table thead tr,
  .stitch-risk-page .stitch-risk-table th { height: 30px; }
  .stitch-risk-page .stitch-risk-table tbody tr { height: 34px; }
  .stitch-risk-page .stitch-risk-table tr[data-stitch-risk-id="RSK-04"] { height: 42px; }
  .stitch-risk-page .stitch-risk-table tr[data-stitch-risk-id="RSK-07"],
  .stitch-risk-page .stitch-risk-table tr[data-stitch-risk-id="RSK-08"] { height: 38px; }
  .stitch-risk-page .stitch-risk-table td { padding-block: 3px; }
  .stitch-risk-page .stitch-risk-detail { height: 590.5px; min-height: 590.5px; max-height: 590.5px; }
}

@media (min-width: 1024px) and (max-width: 1280px) {
  .stitch-risk-page .stitch-risk-metrics { height: 118px; min-height: 118px; }
  .stitch-risk-title code { max-width: 160px; }
  .stitch-risk-page .stitch-actions { gap: 5px; }
  .stitch-risk-page .stitch-actions .button { padding-inline: 7px; font: 400 12px/16px var(--sans); }
  .stitch-risk-page .stitch-actions .stitch-info-chip { padding-inline: 7px; font: 400 11px/14px var(--mono); }
}

@media (max-width: 1600px) {
  .stitch-risk-page .stitch-risk-table-tools { align-items: flex-start; flex-direction: column; justify-content: center; }
  .stitch-risk-page .stitch-risk-table-tools > div:first-child,
  .stitch-risk-tool-actions { width: 100%; }
  .stitch-risk-tool-actions { justify-content: space-between; }
  .stitch-risk-page .stitch-risk-table-tools .stitch-tabs { flex: 0 0 auto; overflow: visible; }
  .stitch-risk-page .stitch-risk-table-tools > div:first-child > small { display: inline-block; }
  .stitch-risk-page .stitch-risk-table thead tr,
  .stitch-risk-page .stitch-risk-table th { height: 72px; }
  .stitch-risk-page .stitch-risk-table tr:is([data-stitch-risk-id="RSK-01"], [data-stitch-risk-id="RSK-02"], [data-stitch-risk-id="RSK-03"], [data-stitch-risk-id="RSK-07"]) td { padding-block: 7px; }
  .stitch-risk-page .stitch-risk-table tr:is([data-stitch-risk-id="RSK-05"], [data-stitch-risk-id="RSK-06"]) td { padding-block: 2px; }
  .stitch-risk-page .stitch-risk-detail { height: 590.5px; min-height: 590.5px; max-height: 590.5px; }
}

@media (min-width: 1100px) and (max-width: 1279px) {
  .stitch-risk-page .stitch-risk-main,
  .stitch-risk-page .stitch-risk-matrix { height: 638px; min-height: 638px; }
  .stitch-risk-page .stitch-risk-table-foot { height: 36px; min-height: 36px; flex-basis: 36px; }
}

@media (max-width: 1099px) {
  .stitch-risk-page .stitch-risk-command { height: auto; min-height: 52px; flex-wrap: wrap; overflow: visible; }
  .stitch-risk-page .stitch-risk-main { height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .stitch-risk-page .stitch-risk-matrix { height: 626px; }
  .stitch-risk-page .stitch-risk-detail { width: 100%; height: auto; min-height: 590px; max-height: none; }
}

@media (max-width: 1023px) {
  .stitch-risk-page .stitch-risk-metrics { height: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stitch-risk-page .stitch-risk-metrics article { min-height: 104px; }
  .stitch-risk-manager .stitch-risk-input-grid,
  .stitch-risk-manager .stitch-switch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .stitch-risk-title > div > div { flex-wrap: wrap; }
  .stitch-risk-page .stitch-actions { width: 100%; flex-wrap: wrap; }
  .stitch-risk-page .stitch-risk-metrics { grid-template-columns: minmax(0, 1fr); }
  .stitch-risk-tool-actions { align-items: stretch; flex-direction: column; }
  .stitch-risk-search { width: 100%; flex-basis: 24px; }
  .stitch-risk-page .stitch-risk-table-tools { height: auto; min-height: 96px; overflow: visible; }
  .stitch-risk-page .stitch-risk-bottom { height: auto; grid-template-columns: minmax(0, 1fr); }
  .stitch-risk-page .stitch-risk-bottom article { padding: 6px; border-right: 0; border-bottom: 1px solid #d9e0ec; }
  .stitch-risk-manager .stitch-risk-input-grid,
  .stitch-risk-manager .stitch-switch-grid { grid-template-columns: minmax(0, 1fr); }
  .stitch-risk-manager .stitch-risk-emergency { align-items: stretch; flex-direction: column; }
}
