/* Page compositions: command center, market chart, cockpit cards, pages 02-08, responsive layout. */

/* ================================================================ layout helpers */
.slot { display: flex; flex-direction: column; min-width: 0; }
.slot > .panel { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack > .slot { flex: 1; }
.grid-2, .grid-4, .grid-5-7, .grid-8-4, .grid-2-1, .cc-row3 { display: grid; gap: 16px; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.grid-8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.panel.flush-body > .panel-body { padding: 0; }
.tab-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tab-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: var(--fs-sm); color: var(--text-2); }
.page-tools.inline { margin-left: auto; }
.prose { margin: 0; color: var(--text); font-size: var(--fs-md); line-height: 1.55; max-width: 80ch; }
.kv-left dd { text-align: left; }
.kv-left { grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); }

/* top bar links */
a.tb-item { text-decoration: none; color: inherit; border-radius: var(--radius-sm); padding: 2px 6px; margin: -2px -6px; }
a.tb-item:hover { background: var(--surface-hover); }
.tb-mt5 { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; }

/* ================================================================ command center */
.ev-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.ev-seg { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: baseline; padding: 9px 16px; text-decoration: none; color: inherit; border-left: 1px solid var(--line-soft); min-width: 0; transition: background var(--dur) var(--ease); }
.ev-seg:first-child { border-left: 0; }
.ev-seg:hover { background: var(--surface-hover); }
.ev-k { grid-row: 1 / 3; align-self: center; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.ev-main { font-size: var(--fs-md); font-weight: 700; letter-spacing: 0.02em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-sub { font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-seg.tone-warn .ev-sub { color: var(--warn); }
.cc-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 400px); gap: 16px; min-width: 0; }
.cc-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* market chart panel */
.mc .panel-head { padding: 10px 14px; }
.mc-body { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cc-chart.fill { flex: 1; height: auto; min-height: 400px; }
.mc-foot { justify-content: space-between; }
.mc-legend { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lgd { display: inline-block; width: 10px; height: 7px; border-radius: 1px; margin-left: 6px; }
.lgd.rb-ACCEPT { background: var(--accept); }
.lgd.rb-REJECT { background: var(--reject); }
.lgd.rb-WAIT { background: var(--wait); opacity: 0.45; }
.mc-status { display: inline-flex; align-items: center; gap: 4px; }

.cc-chart { position: relative; width: 100%; min-height: 220px; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.cc-svg { display: block; width: 100%; height: 100%; cursor: crosshair; }
.cc-svg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }
.cc-grid { stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.cc-grid.day { stroke: var(--line); }
.cc-axis { fill: var(--text-3); font-size: var(--fs-axis); font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.cc-wick { stroke-width: 1; fill: none; shape-rendering: crispEdges; }
.cc-wick.up { stroke: var(--candle-up); }
.cc-wick.down { stroke: var(--candle-down); }
.cc-body.up { fill: var(--candle-up); }
.cc-body.down { fill: var(--candle-down); }
.cc-rib { shape-rendering: crispEdges; }
.cc-rib.rb-ACCEPT { fill: var(--accept); }
.cc-rib.rb-REJECT { fill: var(--reject); }
.cc-rib.rb-WAIT { fill: var(--wait); opacity: 0.32; }
.cc-rib.rb-OBSERVE { fill: var(--info); opacity: 0.5; }
.cc-span { fill: var(--accent); opacity: 0.045; }
.cc-level { stroke-width: 1; shape-rendering: crispEdges; }
.cc-level.lv-entry { stroke: var(--accent); }
.cc-level.lv-sl { stroke: var(--crit); stroke-dasharray: 5 4; opacity: 0.85; }
.cc-level.lv-tp { stroke: var(--ok); stroke-dasharray: 5 4; opacity: 0.85; }
.cc-level.lv-last { stroke: var(--text-2); stroke-dasharray: 1 3; }
.cc-level.lv-last.stale { stroke: var(--crit); }
.cc-tag rect { fill: var(--surface-3); stroke: var(--line-strong); }
.cc-tag text { fill: var(--text); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-tag.tag-entry rect { fill: var(--accent); stroke: none; }
.cc-tag.tag-entry text { fill: #15120a; }
.cc-tag.tag-sl rect { fill: var(--crit-soft); stroke: var(--crit); }
.cc-tag.tag-sl text { fill: var(--crit); }
.cc-tag.tag-tp rect { fill: var(--ok-soft); stroke: var(--ok); }
.cc-tag.tag-tp text { fill: var(--ok); }
.cc-tag.tag-last rect { fill: var(--text); stroke: none; }
.cc-tag.tag-last text { fill: var(--bg); }
.cc-tag.tag-last.stale rect { fill: var(--crit); }
.cc-cross line { stroke: var(--chart-cross); stroke-width: 1; stroke-dasharray: 3 3; shape-rendering: crispEdges; pointer-events: none; }
.cc-cross-tag { fill: var(--surface-3); stroke: var(--line-strong); }
.cc-cross-text { fill: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; }
.cc-mark { cursor: pointer; outline: none; }
.cc-mark .cc-hit { fill: transparent; }
.cc-mark path { stroke-width: 1.5; }
.cc-mark.mk-acc-buy path, .cc-mark.mk-acc-sell path { fill: var(--accept); stroke: var(--bg); }
.cc-mark.mk-rej path { stroke: var(--reject); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.cc-mark.mk-trade-in path { fill: var(--accent); stroke: var(--bg); }
.cc-mark.mk-trade-out path { fill: var(--text); stroke: var(--bg); }
.cc-mark:hover .cc-hit, .cc-mark:focus-visible .cc-hit { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: var(--accent); stroke-width: 1; }
.cc-trade-link { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.8; }
.cc-legend { position: absolute; left: 12px; top: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: var(--fs-xs); color: var(--text-2); pointer-events: none; max-width: calc(100% - 200px); padding: 3px 8px; border-radius: 4px; background: color-mix(in srgb, var(--surface) 82%, transparent); }
.cc-lg-sym { font-weight: 700; color: var(--text); letter-spacing: 0.04em; }
.cc-lg-time { color: var(--text-3); }
.cc-lg-kv { font-variant-numeric: tabular-nums; color: var(--text); }
.cc-lg-kv i { font-style: normal; color: var(--text-3); margin-right: 3px; }
.cc-lg-status { color: var(--crit); font-weight: 700; }
.cc-tools { position: absolute; right: 78px; top: 6px; display: flex; gap: 2px; background: color-mix(in srgb, var(--surface) 85%, transparent); border-radius: var(--radius); }
.cc-tools .icon-btn { width: 28px; height: 28px; }
.cc-tip { position: absolute; z-index: 3; max-width: 260px; padding: 7px 10px; border-radius: var(--radius); background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: var(--fs-xs); line-height: 1.4; pointer-events: none; }
.cc-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.cc-chart.compact .cc-legend { max-width: calc(100% - 220px); }

/* decision engine */
.cc-decision .panel-body { display: flex; flex-direction: column; gap: 14px; }
.dec-hero { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.dec-word { font-size: var(--fs-hero); line-height: 1; font-weight: 750; letter-spacing: 0.06em; font-family: var(--font-sans); }
.dec-WAIT { border-color: color-mix(in srgb, var(--wait) 35%, transparent); background: var(--wait-soft); }
.dec-WAIT .dec-word { color: var(--wait); }
.dec-ACCEPT { border-color: color-mix(in srgb, var(--accept) 55%, transparent); background: var(--accept-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accept) 25%, transparent), 0 0 24px color-mix(in srgb, var(--accept) 14%, transparent); }
.dec-ACCEPT .dec-word { color: var(--accept); }
.dec-REJECT { border-color: color-mix(in srgb, var(--reject) 50%, transparent); background: var(--reject-soft); }
.dec-REJECT .dec-word { color: var(--reject); }
.dec-OBSERVE .dec-word { color: var(--info); }
.dec-when { margin-left: auto; text-align: right; font-size: var(--fs-sm); display: flex; flex-direction: column; gap: 2px; }
.dec-focus { display: flex; flex-direction: column; gap: 4px; }
.dec-focus-k { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.dec-focus-v { font-size: var(--fs-lg); font-weight: 600; line-height: 1.35; }
.dec-missing { font-size: var(--fs-sm); }
.dec-order { display: flex; flex-direction: column; gap: 8px; }
.dec-order-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.kvc { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kvc-k { font-size: 11.5px; color: var(--text-3); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.kvc-v { font-size: var(--fs-md); font-weight: 650; }
.kvc.strong .kvc-v { color: var(--accent); }
.dec-note { font-size: var(--fs-xs); color: var(--text-3); }
.dec-checks-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: var(--fs-sm); }
.dec-checks-head b { font-size: var(--fs-lg); }
.segs { display: flex; gap: 3px; }
.seg { flex: 1; height: 6px; border-radius: 2px; }
.seg.pass { background: var(--ok); opacity: 0.75; }
.seg.fail { background: var(--crit); }
.dec-strats { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.dec-strat { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 12px; background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); text-align: left; cursor: pointer; font-size: var(--fs-sm); color: inherit; }
.dec-strat:last-child { border-bottom: 0; }
.dec-strat:hover { background: var(--surface-hover); }
.dec-strat-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dec-strat .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.dec-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.dec-entries { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: var(--fs-sm); color: var(--text-2); }
.dec-entries-v { font-weight: 750; letter-spacing: 0.06em; color: var(--text); }
.dec-entries.tone-ok .dec-entries-v { color: var(--ok); }

/* position monitor */
.cc-position .panel-body { padding: 16px; }
.cc-position.is-empty .panel-body { padding: 0; }
.pos { display: grid; grid-template-columns: minmax(200px, auto) minmax(0, 1fr); grid-template-areas: "id figs" "lad lad"; gap: 14px 24px; align-items: center; }
.pos-id { grid-area: id; display: flex; align-items: center; gap: 14px; }
.pos-sym { font-size: var(--fs-lg); font-weight: 700; letter-spacing: 0.03em; }
.pos-sub { font-size: var(--fs-sm); }
.pos-figs { grid-area: figs; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px 16px; }
.pos-fig { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pos-v { font-size: var(--fs-lg); font-weight: 650; white-space: nowrap; }
.pos-fig.pnl .pos-v { font-size: var(--fs-xl); }
.side-badge { display: inline-grid; place-items: center; min-width: 56px; height: 34px; padding: 0 10px; border-radius: var(--radius); font-weight: 800; letter-spacing: 0.1em; font-size: var(--fs-sm); border: 1px solid; }
.side-badge.side-SELL, .side-badge.side-BUY { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.side-badge.sm { min-width: 42px; height: 22px; font-size: 11px; padding: 0 6px; }
.ladder-track { grid-area: lad; position: relative; height: 42px; margin: 6px 10px 0; }
.lad-line { position: absolute; left: 0; right: 0; top: 20px; height: 2px; background: var(--line); border-radius: 1px; }
.lad-band { position: absolute; top: 17px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--text-2) 22%, transparent); }
.lad-mark { position: absolute; top: 10px; width: 2px; height: 22px; margin-left: -1px; border-radius: 1px; }
.lad-label { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }
.lad-sl { background: var(--crit); } .lad-sl .lad-label { color: var(--crit); top: 24px; }
.lad-tp { background: var(--ok); } .lad-tp .lad-label { color: var(--ok); top: 24px; }
.lad-entry { background: var(--accent); } .lad-entry .lad-label { color: var(--accent); }
.lad-last { background: var(--text); width: 10px; height: 10px; top: 16px; margin-left: -5px; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface); } .lad-last .lad-label { color: var(--text); top: -14px; }

/* evidence cards */
.fw-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.fw-count .big, .q-count .big { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.fw-count .of, .q-count .of, .rd-big-v .of { font-size: var(--fs-lg); color: var(--text-3); font-weight: 500; }
.fw-label { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); }
.fw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin-top: 14px; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-v { font-size: var(--fs-lg); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-note { margin-top: 12px; font-size: var(--fs-xs); color: var(--text-3); line-height: 1.45; }
.rladder { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.rl-head, .rl-row { display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr) 56px; align-items: center; gap: 10px; }
.rl-head { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: 2px; }
.rl-head > span:last-child { text-align: right; }
.rl-axis { display: flex; justify-content: space-between; }
.rl-axis i { font-style: normal; }
.rl-row { min-height: 22px; font-size: var(--fs-xs); }
.rl-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.rl-what b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.rl-track { position: relative; height: 10px; }
.rl-track::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--line-strong); }
.rl-bar { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.rl-bar.pos { left: 50%; background: var(--ok); }
.rl-bar.neg { right: 50%; background: var(--crit); }
.rl-val { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.q-head { display: flex; gap: 28px; margin-bottom: 12px; }
.q-count { display: flex; flex-direction: column; gap: 4px; }
.q-rows { display: flex; flex-direction: column; gap: 2px; }
.q-row { display: flex; flex-direction: column; gap: 5px; padding: 7px 0; }
.q-row-top { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); min-width: 0; }
.q-label { font-weight: 650; white-space: nowrap; }
.q-gid { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.q-row-top .status { margin-left: auto; font-size: 11px; }
.q-row-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.q-val { color: var(--text-2); font-size: var(--fs-xs); white-space: nowrap; }
.q-lockv { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.05em; color: var(--text-2); white-space: nowrap; }
.q-lockv svg { width: 13px; height: 13px; }
.q-row-btn { display: block; width: 100%; background: none; border: 0; padding: 0 6px; margin: 0 -6px; border-radius: var(--radius-sm); text-align: left; color: inherit; cursor: pointer; }
.q-row-btn:hover { background: var(--surface-hover); }
.rv-verdict { font-size: var(--fs-2xl); font-weight: 750; letter-spacing: 0.02em; line-height: 1.1; }
.rv-detail { margin-top: 8px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; }
.rv-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; margin-top: 16px; }

/* health strip */
.health-strip { flex-direction: row; align-items: stretch; text-decoration: none; color: inherit; overflow: hidden; }
.health-strip:hover { border-color: var(--line-strong); }
.hs-summary { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 16px; min-width: 210px; max-width: 260px; border-right: 1px solid var(--line-soft); color: inherit; }
.hs-title { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: var(--fs-md); }
.hs-summary.tone-ok .hs-title { color: var(--ok); }
.hs-summary.tone-warn .hs-title { color: var(--warn); }
.hs-summary.tone-crit .hs-title { color: var(--crit); }
.hs-text { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-items { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; }
.hs-item { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 9px 14px; border-left: 1px solid var(--line-soft); color: inherit; min-width: 0; }
.hs-items .hs-item:first-child { border-left: 0; }
.hs-k { font-size: 11.5px; color: var(--text-3); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.hs-v { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; color: var(--text); }
.hs-item.tone-crit .hs-v { color: var(--crit); }
.hs-item.tone-warn .hs-v { color: var(--warn); }

/* ================================================================ market page */
.quote-big { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.quote-big > div { display: flex; flex-direction: column; gap: 2px; }
.qv { font-size: 24px; font-weight: 650; }
.inst-list { display: flex; flex-direction: column; gap: 10px; }
.inst { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.inst-sym { font-weight: 700; letter-spacing: 0.04em; }
.inst-note { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.45; border-top: 1px solid var(--line-soft); padding-top: 10px; }

/* ================================================================ trades page */
.ti-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ti-fig { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ti-v { font-size: var(--fs-lg); font-weight: 650; white-space: nowrap; }
.ti-chart { border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }

/* ================================================================ performance */
.tabs button.ds-demo[aria-selected="true"] { border-bottom-color: var(--accent); }
.tabs button.ds-backtest[aria-selected="true"] { border-bottom-color: var(--text-2); border-bottom-style: dashed; }
.tabs button.ds-shadow[aria-selected="true"] { border-bottom-color: var(--text); }
.tabs button.ds-locked[aria-selected="true"] { border-bottom-color: var(--text-3); }
.lock-state { font-size: var(--fs-2xl); font-weight: 750; letter-spacing: 0.06em; margin-bottom: 12px; }
.shadow-views { display: flex; flex-direction: column; gap: 18px; }
.shadow-view { display: flex; flex-direction: column; gap: 8px; }
.shadow-view .fw-stats { margin-top: 2px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reason-bars { display: flex; flex-direction: column; gap: 5px; }
.reason-bar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: var(--fs-xs); }
.share-bar.wide { width: 100%; }

/* ================================================================ research */
.lab-summary { flex-direction: row; align-items: stretch; }
.lab-verdict { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; min-width: 280px; max-width: 420px; border-right: 1px solid var(--line-soft); }
.lab-verdict-v { font-size: var(--fs-2xl); font-weight: 750; letter-spacing: 0.02em; }
.lab-verdict-d { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; }
.lab-tiles { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lab-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: inherit; }
.lab-tile-v { font-size: var(--fs-2xl); font-weight: 700; color: var(--text); }
.lab-tile.tone-crit .lab-tile-v { color: var(--crit); }
.lab-tile.tone-warn .lab-tile-v { color: var(--warn); }
.lab-tile.tone-info .lab-tile-v { color: var(--info); }
.hyp-title { font-weight: 550; color: var(--text); }
.fam-list { display: flex; flex-direction: column; gap: 12px; }
.fam { flex-direction: row; gap: 18px; padding: 16px 18px; }
.fam-num { font-size: var(--fs-xl); font-weight: 700; color: var(--text-3); min-width: 40px; }
.fam-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.fam-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fam-name { margin: 0; font-size: var(--fs-md); font-weight: 700; letter-spacing: 0.02em; }
.fam-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; }
.fam-grid p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; }
.fam-hyps { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.fam-hyp { display: grid; grid-template-columns: 130px 120px minmax(0, 1fr); gap: 10px; align-items: center; background: none; border: 0; padding: 5px 6px; margin: 0 -6px; border-radius: var(--radius-sm); cursor: pointer; text-align: left; color: inherit; font-size: var(--fs-sm); }
.fam-hyp:hover { background: var(--surface-hover); }
.fam-hyp .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-table { margin-bottom: 12px; }
.stat-table .eyebrow { margin-bottom: 6px; display: block; }
.verdicts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.verdict-line { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }

/* ================================================================ readiness */
.rd-head { flex-direction: row; align-items: stretch; flex-wrap: wrap; }
.rd-big, .rd-live { display: flex; flex-direction: column; gap: 4px; padding: 16px 22px; border-right: 1px solid var(--line-soft); }
.rd-big-v { font-size: 34px; font-weight: 700; line-height: 1.05; }
.rd-live-v { font-size: 34px; font-weight: 750; line-height: 1.05; letter-spacing: 0.04em; }
.rd-live { max-width: 360px; }
.rd-live .faint { font-size: var(--fs-sm); }
.rd-legend { flex: 1; display: flex; flex-wrap: wrap; align-content: center; gap: 8px 16px; padding: 16px 20px; }
.gate-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.gate-tile { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); text-align: left; cursor: pointer; color: inherit; min-height: 112px; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.gate-tile:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.gate-tile.tone-ok { box-shadow: inset 3px 0 0 var(--ok); }
.gate-tile.tone-info { box-shadow: inset 3px 0 0 var(--info); }
.gate-tile.tone-warn { box-shadow: inset 3px 0 0 var(--warn); }
.gate-tile.tone-crit { box-shadow: inset 3px 0 0 var(--crit); }
.gate-tile.tone-neutral { box-shadow: inset 3px 0 0 var(--line-strong); opacity: 0.85; }
.gt-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.gt-id { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-sm); color: var(--text); }
.gt-top .status { font-size: 11px; }
.gt-name { font-size: var(--fs-sm); font-weight: 650; letter-spacing: 0.02em; }
.gt-detail { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gt-prog { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: var(--fs-xs); }
.blk-ids { display: flex; flex-wrap: wrap; gap: 6px; }
.link-chip { cursor: pointer; font-family: var(--font-mono); height: 24px; }
.link-chip:hover { border-color: var(--accent); color: var(--text); }
.blk-text { margin: 10px 0 0; font-size: var(--fs-sm); }

/* ================================================================ system */
.sys-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.sys-summary, .sys-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius-lg); border: 1px solid var(--line-soft); background: var(--surface); color: inherit; min-width: 0; }
.sys-summary { grid-column: span 2; }
.sys-summary-v { display: flex; align-items: center; gap: 8px; font-size: var(--fs-lg); font-weight: 700; }
.sys-summary.tone-ok .sys-summary-v { color: var(--ok); }
.sys-summary.tone-warn .sys-summary-v { color: var(--warn); }
.sys-summary.tone-crit .sys-summary-v { color: var(--crit); }
.sys-tile-v { display: flex; align-items: center; gap: 7px; font-size: var(--fs-md); font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sys-tile.tone-crit .sys-tile-v { color: var(--crit); }
.sys-tile.tone-warn .sys-tile-v { color: var(--warn); }
.sys-tile-d { font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.alert-list { display: flex; flex-direction: column; gap: 8px; }

/* ================================================================ responsive */
@media (max-width: 1560px) {
  .pos-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1400px) {
  .cc-top { grid-template-columns: minmax(0, 1fr) 360px; }
  .fam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  .cc-row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-row3 > .slot:last-child { grid-column: 1 / -1; }
  .grid-2-1, .grid-8-4 { grid-template-columns: minmax(0, 1fr); }
  .tb-items .tb-item:not(.tb-system) { display: none; }
  .lab-summary { flex-direction: column; }
  .lab-verdict { max-width: none; border-right: 0; border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 1100px) {
  .cc-top { grid-template-columns: minmax(0, 1fr); }
  .grid-5-7 { grid-template-columns: minmax(0, 1fr); }
  .pos { grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "figs" "lad"; }
  .health-strip { flex-direction: column; }
  .hs-summary { max-width: none; border-right: 0; border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 900px) {
  .ev-strip { grid-template-columns: minmax(0, 1fr); }
  .ev-seg { border-left: 0; border-top: 1px solid var(--line-soft); }
  .ev-seg:first-child { border-top: 0; }
  :root { --topbar-h: 54px; }
  .sidebar { transform: translateX(-100%); width: min(290px, 86vw); box-shadow: none; }
  .app.menu-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .app.rail .sidebar { width: min(290px, 86vw); }
  .app.rail .brand-name, .app.rail .nav-label, .app.rail .nav-num, .app.rail .side-status, .app.rail .side-meta .build { display: revert; }
  .app.rail .nav a { justify-content: flex-start; padding: 0 10px; }
  .app.rail .nav-icon { display: none; }
  .app.rail .side-compact { display: none; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.5); }
  .main, .app.rail .main { margin-left: 0; }
  .menu-btn { display: inline-grid; margin-left: -8px; }
  .topbar { gap: 10px; padding: 0 12px; }
  .tb-sep, .tb-items, .tb-quote-label, .tb-mt5 { display: none; }
  .tb-price { font-size: 18px; }
  .tb-right { gap: 6px; }
  .tb-right > .icon-btn { display: none; }
  .view { padding: 14px 12px 32px; gap: 12px; }
  .alerts { padding: 10px 12px 0; }
  .grid-2, .grid-4, .cc-row3 { grid-template-columns: minmax(0, 1fr); }
  .cc-row3 > .slot:last-child { grid-column: auto; }
  .fam { flex-direction: column; gap: 6px; }
  .fam-grid { grid-template-columns: minmax(0, 1fr); }
  .fam-hyp { grid-template-columns: minmax(0, 1fr); }
  .lab-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ti-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dec-order-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-head { flex-direction: column; }
  .rd-big, .rd-live { border-right: 0; border-bottom: 1px solid var(--line-soft); max-width: none; }
  .filter-bar .control { flex: 1 1 45%; justify-content: space-between; }
  .filter-bar .select, .filter-bar .input { max-width: calc(100vw - 150px); }
  .page-tools { margin-left: 0; width: 100%; }
  .select { max-width: calc(100vw - 110px); }
  .strategy-grid { grid-template-columns: minmax(0, 1fr); }
  .strategy { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .ladder-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ladder-detail { grid-column: 1 / -1; white-space: normal; }
  .sys-summary { grid-column: 1 / -1; }
  .kv { grid-template-columns: minmax(80px, max-content) minmax(0, 1fr); }
  .feature-list { columns: 1; }
  .cc-legend { max-width: calc(100% - 110px); }
  .cc-tools { right: 74px; }
}
@media (max-width: 560px) {
  .badge-demo, .fresh .age { display: none; }
  .tb-instrument { gap: 8px; }
  .tb-price { font-size: 17px; }
  .cc-legend .cc-lg-kv:nth-child(3), .cc-legend .cc-lg-kv:nth-child(4), .cc-legend .cc-lg-kv:nth-child(5) { display: none; }
  .badge-live { padding: 0 8px; }
  .tb-change { display: none; }
  .pos-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dec-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fw-stats, .rv-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dec-hero { flex-wrap: wrap; }
  .dec-when { margin-left: 0; text-align: left; }
  .q-head { gap: 20px; }
  .fw-count .big, .q-count .big { font-size: 28px; }
  .cc-legend .cc-lg-time { display: none; }
  .check { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .check-stage { display: none; }
}
#panel-hypotheses td.wrap { min-width: 150px; max-width: 320px; }
#panel-hypotheses th:nth-child(3), #panel-hypotheses td:nth-child(3) { white-space: normal; min-width: 120px; }

/* position overlay on the market chart */
.mc-pos { position: absolute; left: 12px; bottom: 44px; z-index: 2; display: inline-flex; align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border-radius: var(--radius); border: 1px solid var(--accent-line); background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: var(--shadow); cursor: pointer; font-size: var(--fs-sm); color: var(--text); }
.mc-pos:hover { border-color: var(--accent); }
.mc-pos.none { border-color: var(--line-strong); padding: 6px 12px; box-shadow: none; }
.mc-pos.stale { border-color: var(--crit); }
.mc-pos-k { font-size: 11.5px; color: var(--text-3); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mc-pos-v { font-weight: 650; }
.mc-pos.none .mc-pos-v { font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--text-2); }
.mc-pos-kv i { font-style: normal; color: var(--text-3); margin-right: 5px; font-size: var(--fs-xs); }
.mc-pos-kv b { font-weight: 650; }
.mc-pos-stale { color: var(--crit); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.06em; }
@media (max-height: 820px) and (min-width: 1101px) {
  .dec-hero { padding: 10px 14px; }
  .dec-word { font-size: 30px; }
  .cc-decision .panel-body { gap: 11px; }
  .dec-facts { gap: 8px 12px; }
}
@media (max-width: 560px) { .mc-pos { gap: 8px; font-size: var(--fs-xs); } .mc-pos-kv:nth-of-type(3) { display: none; } }

/* ---------------------------------------------------------------- v2.1: explanations, chart, forward ladder */
.fw-meter-cap { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.rv-plain { margin: 6px 0 4px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; }
.ex { margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.ex-toggle { cursor: pointer; font-size: var(--fs-xs); color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.ex-toggle::-webkit-details-marker { display: none; }
.ex-toggle::before { content: "?"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--accent-line); font-size: 10px; font-weight: 700; }
.ex[open] > .ex-toggle { color: var(--text-2); }
.ex-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.ex-body { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.ex-body p { margin: 0; }
.ex-h { margin: 0 0 4px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); }
.ex-values { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ex-v { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr); gap: 2px 12px; }
.ex-v dt { color: var(--text-3); font-size: var(--fs-xs); }
.ex-v dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.ex-v .ex-note { grid-column: 2; color: var(--text-3); font-size: var(--fs-xs); }
.ex-terms { display: flex; flex-direction: column; gap: 4px; }
.ex-term summary { cursor: pointer; font-size: var(--fs-sm); }
.ex-term summary b { color: var(--text); font-weight: 650; }
.ex-tech { margin: 4px 0 6px 12px !important; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-3); }
.ex-src { font-size: var(--fs-xs); overflow-wrap: anywhere; }
.ex-param { font-size: var(--fs-xs); }
.ex-unknown { color: var(--text-3); }
.ex-wait { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; }
.ex-sum .ex-title { font-weight: 650; color: var(--text); }
/* Lightweight Charts host */
.lw-chart { position: relative; width: 100%; min-height: 260px; }
.lw-chart.fill { height: 100%; min-height: 380px; }
.lw-host { position: absolute; inset: 0; }
.lw-legend { position: absolute; top: 8px; left: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-xs); color: var(--text-2); pointer-events: none; font-variant-numeric: tabular-nums; max-width: calc(100% - 90px); }
.lw-legend .lw-l-sym { font-weight: 700; color: var(--text); }
.lw-legend i { font-style: normal; color: var(--text-3); margin-right: 3px; }
.lw-legend b { font-weight: 600; color: var(--text); }
.lw-attr { font-size: 11px; color: var(--text-3); text-decoration: none; margin-left: auto; white-space: nowrap; }
.lw-attr:hover { color: var(--text-2); text-decoration: underline; }
.layer-toggles { display: flex; flex-wrap: wrap; gap: 4px; }
.layer-chip { cursor: pointer; background: transparent; border: 1px solid var(--line); height: 24px; }
.layer-chip.on { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.lgd-accent { background: var(--accent); }
@media (max-width: 720px) { .lw-attr { margin-left: 0; white-space: normal; } .ex-v { grid-template-columns: 1fr; } }
.xray-guide { padding: 10px 16px; }
.xray-guide .ex-body { max-width: 900px; }
.focus-card .focus-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.trace-chart { margin-top: 8px; align-self: flex-start; }
.ti-actions { display: flex; justify-content: flex-end; margin: 8px 0 4px; }
.gt-tech { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); letter-spacing: 0.02em; }
.blk-chip { align-self: flex-start; height: 18px; font-size: 11px; }
.blk-REAL_TIME { background: var(--info-soft); color: var(--info); }
.blk-OWNER_ACTION { background: var(--warn-soft); color: var(--warn); }
.blk-RESEARCH, .blk-EXTERNAL_DATA { background: var(--accent-soft); color: var(--accent); }
.blk-PROTECTED_HOLDOUT, .blk-LIVE_FUTURE { background: var(--neutral-soft); color: var(--text-2); }
.blk-ENGINEERING { background: var(--crit-soft); color: var(--crit); }
.lw-chart .cc-empty[hidden] { display: none; }
/* decision card: session / broker / feed / bot as four separate facts */
.dec-states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 2px; }
.dec-state { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.dec-state-v { font-weight: 650; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.dec-state.tone-ok .dec-state-v { color: var(--ok); }
.dec-state.tone-crit .dec-state-v { color: var(--crit); }
.dec-state.tone-warn .dec-state-v { color: var(--warn); }
.tb-broker.tone-ok .v { color: var(--ok); }
.tb-broker.tone-warn .v { color: var(--warn); }
@media (max-width: 520px) { .dec-states { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lw-tip { position: absolute; z-index: 4; max-width: 250px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--line-strong); color: var(--text); font-size: var(--fs-xs); line-height: 1.4; white-space: pre-line; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.chart-tools { display: flex; gap: 2px; }
.chart-tools .btn { min-width: 30px; padding: 0 8px; }
.lgd-dot { border-radius: 50%; }

/* Readiness: what GoldBot is working toward (presentation groups) */
.tw-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.tw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tw-group { border: 1px solid var(--line-soft); border-left: 3px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tw-group.tw-tone-ok { border-left-color: var(--ok); } .tw-group.tw-tone-info { border-left-color: var(--info); }
.tw-group.tw-tone-warn { border-left-color: var(--warn); } .tw-group.tw-tone-crit { border-left-color: var(--crit); }
.tw-group-title.tone-ok { color: var(--ok); } .tw-group-title.tone-info { color: var(--info); }
.tw-group-title.tone-warn { color: var(--warn); } .tw-group-title.tone-crit { color: var(--crit); }
.tw-group-head { display: flex; justify-content: space-between; align-items: baseline; }
.tw-group-title { font-weight: 700; font-size: var(--fs-sm); letter-spacing: 0.04em; text-transform: uppercase; }
.tw-meaning { margin: 0; font-size: var(--fs-xs); }
.tw-items { display: flex; flex-direction: column; gap: 8px; }
.tw-item { all: unset; box-sizing: border-box; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 6px; background: var(--line-soft); min-width: 0; }
.tw-item:hover, .tw-item:focus-visible { outline: 1px solid var(--accent); }
.tw-item-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tw-name { font-weight: 650; font-size: var(--fs-sm); flex: 1; min-width: 0; }
.tw-ver { height: 18px; font-size: 11px; }
.tw-rows { display: flex; flex-direction: column; gap: 8px; }
.tw-row .meter-head { font-size: var(--fs-xs); flex-wrap: wrap; }
.tw-sub { font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.tw-reason, .tw-context, .tw-stale { margin: 0; font-size: var(--fs-xs); line-height: 1.4; overflow-wrap: anywhere; }
.tw-stale { color: var(--warn); }
.tw-fresh { font-size: 11px; }
@media (max-width: 640px) { .tw-grid { grid-template-columns: 1fr; } }

/* Market v2.2: chart + read-only side column, chart filters */
.mk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.mk-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mk-state dd { overflow-wrap: anywhere; }
.mc-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 8px 16px; border-bottom: 1px solid var(--line-soft); }
.mc-filter { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-3); }
.mc-sel { background: var(--surface-2, transparent); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: var(--fs-xs); max-width: 180px; }
.mc-na { height: 22px; font-size: 11px; color: var(--text-3); }
@media (max-width: 1100px) { .mk-layout { grid-template-columns: 1fr; } }
/* long meta chips (e.g. decision counts) wrap inside the panel instead of widening the page on phones */
.panel-meta { min-width: 0; flex-wrap: wrap; }
.panel-meta .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* Strategy Lab (v2.2) */
.lab-head { display: flex; flex-wrap: wrap; gap: 16px 24px; padding: 16px 20px; align-items: flex-start; }
.lab-head .lab-verdict { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.lab-head .lab-verdict-v { font-size: 28px; font-weight: 750; letter-spacing: 0.04em; }
.lab-cc { flex: 1; min-width: 260px; }
.lab-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr) 320px; gap: 16px; align-items: start; margin-top: 12px; }
.lab-list { display: flex; flex-direction: column; gap: 12px; max-height: 80vh; overflow-y: auto; }
.lab-cat { display: flex; flex-direction: column; gap: 4px; }
.lab-item { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 6px 8px; border-radius: 6px; font-size: var(--fs-xs); }
.lab-item .code { grid-column: 2; font-size: 10.5px; }
.lab-item.on, .lab-item:hover, .lab-item:focus-visible { background: var(--line-soft); outline: 1px solid var(--accent); }
.lab-item-n { font-weight: 600; color: var(--text); }
.lab-center, .lab-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lab-hist { width: 100%; height: auto; }
.lab-hist .bar-pos { fill: var(--ok); } .lab-hist .bar-neg { fill: var(--crit); }
.lab-round h3 { font-size: var(--fs-sm); margin: 12px 0 6px; }
@media (max-width: 1200px) { .lab-grid { grid-template-columns: 240px minmax(0, 1fr); } .lab-right { grid-column: 1 / -1; } }
@media (max-width: 760px) { .lab-grid { grid-template-columns: 1fr; } .lab-list { max-height: 40vh; } }

/* ===================================================================== Bot City sections (2026-10-07 redesign) */
.sx { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.sx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-4); }
.sx-title { font-size: var(--fs-xl); font-weight: 650; letter-spacing: .01em; margin: 0; }
.sx-sub { color: var(--text-3); font-size: var(--fs-sm); margin: 0; max-width: 90ch; }
.sx-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; background: var(--bg); }
.sx-tabs.nested { border-bottom-style: dashed; position: static; }
.sx-tab { flex: none; border: 0; background: transparent; color: var(--text-2); padding: 8px 14px; font: 500 var(--fs-sm) var(--font-sans); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.sx-tab:hover { color: var(--text); background: var(--surface-hover); }
.sx-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 650; }
.sx-tabs.nested .sx-tab { padding: 6px 10px; font-size: var(--fs-xs); }
.sx-host { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.sx-host > .cv { padding: 0; }
.sx-error { border: 1px solid var(--crit); background: color-mix(in srgb, var(--crit) 8%, var(--surface)); border-radius: var(--radius); padding: var(--sp-4); }
.sx-error p { margin: 6px 0; }

.dk-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-3) var(--sp-4); min-width: 0; }
.dk-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-2); }
.dk-h { margin: 0; font-size: var(--fs-md); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.dk-h2 { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-sm); font-weight: 700; letter-spacing: .08em; color: var(--text-2); }
.dk-h2 small { font-weight: 400; letter-spacing: 0; color: var(--text-3); }
.dk-sub { margin: var(--sp-3) 0 var(--sp-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; color: var(--text-3); }
.dk-status { margin-left: auto; font-size: var(--fs-xs); }
.dk-degraded { color: var(--warn); font-weight: 600; }
.dk-unavail { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 10px 12px; color: var(--text-2); font-size: var(--fs-sm); }
.dk-unavail strong { color: var(--warn); letter-spacing: .04em; }
.dk-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font: 600 var(--fs-xs) var(--font-mono); letter-spacing: .03em; border: 1px solid var(--line); color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.dk-pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.dk-pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.dk-pill.crit { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 55%, transparent); background: color-mix(in srgb, var(--crit) 10%, var(--surface-2)); }
.dk-pill.info { color: var(--info); border-color: color-mix(in srgb, var(--info) 45%, transparent); }

.dk-modes { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); padding: var(--sp-2) 0 var(--sp-3); border-bottom: 1px solid var(--line-soft); }
.dk-mode { display: inline-flex; flex-direction: column; gap: 3px; }
.dk-mode small { font-size: 10px; letter-spacing: .08em; color: var(--text-3); }
.dk-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-2); margin-top: var(--sp-3); }
.dk-kpi { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dk-kpi-l { font-size: 10px; letter-spacing: .08em; color: var(--text-3); }
.dk-kpi-v { font: 650 var(--fs-lg) var(--font-mono); overflow-wrap: anywhere; }
.dk-kpi-s { font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
.dk-kpi.t-ok .dk-kpi-v { color: var(--ok); } .dk-kpi.t-crit .dk-kpi-v { color: var(--crit); } .dk-kpi.t-warn .dk-kpi-v { color: var(--warn); }

.dk-markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-3); }
.dk-market { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: border-color var(--dur) var(--ease); }
.dk-market:hover, .dk-market:focus-visible { border-color: var(--accent-line); outline: none; }
.dk-market > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.dk-sym { font: 700 var(--fs-lg) var(--font-mono); }
.dk-px { font: 600 var(--fs-md) var(--font-mono); }
.dk-market > header .dk-pill { margin-left: auto; }
.dk-mline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--fs-xs); color: var(--text-3); }
.dk-best { border-top: 1px solid var(--line-soft); padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.dk-best-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dk-ready { font: 600 var(--fs-xs) var(--font-mono); color: var(--text-2); margin-left: auto; }
.dk-detail { margin: 0; font-size: var(--fs-sm); color: var(--text); overflow-wrap: anywhere; }
.dk-miss { margin: 0; padding-left: 0; list-style: none; font-size: var(--fs-xs); color: var(--warn); }
.dk-miss small { color: var(--text-3); }
.dk-ok { margin: 0; font-size: var(--fs-xs); color: var(--ok); overflow-wrap: anywhere; }
.dk-next, .dk-exec { margin: 0; font-size: var(--fs-xs); color: var(--text-2); overflow-wrap: anywhere; }
.dk-next small, .dk-exec small { color: var(--text-3); letter-spacing: .06em; }
.dk-market > footer { font-size: var(--fs-xs); color: var(--text-3); margin-top: auto; }

.dk-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); }
.dk-brokers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-3); }
.dk-broker { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dk-broker > header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.dk-kv { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-sm); padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
.dk-kv span { color: var(--text-3); }
.dk-kv strong { font: 600 var(--fs-sm) var(--font-mono); text-align: right; overflow-wrap: anywhere; }

.dk-scroll { overflow-x: auto; max-width: 100%; }
.dk-tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dk-tbl th { text-align: left; font-size: 10px; letter-spacing: .08em; color: var(--text-3); font-weight: 650; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dk-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; vertical-align: top; }
.dk-tbl td small { color: var(--text-3); }
.dk-click { cursor: pointer; } .dk-click:hover td { background: var(--surface-hover); }

.dk-health { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-hc { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--fs-xs); background: var(--surface-2); }
.dk-hc i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.dk-hc small { color: var(--text-3); font-family: var(--font-mono); }
.dk-hc.s-ok i { background: var(--ok); } .dk-hc.s-degraded i, .dk-hc.s-stale i { background: var(--warn); } .dk-hc.s-down i, .dk-hc.s-error i, .dk-hc.s-failed i { background: var(--crit); }
.dk-overall { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.dk-risk { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--sp-3); }
.dk-risk > p { grid-column: 1 / -1; }
.dk-perf-block .dk-kpis { margin-top: 0; }

@media (max-width: 900px) {
  .dk-two, .dk-brokers { grid-template-columns: minmax(0, 1fr); }
  .dk-markets { grid-template-columns: minmax(0, 1fr); }
  .sx-title { font-size: var(--fs-lg); }
}
.bc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-3); }
.bc-global { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); padding: 8px 10px; margin: var(--sp-2) 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.bc-global > span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); letter-spacing: .06em; color: var(--text-2); }
.bc-sw { min-width: 52px; height: 26px; border-radius: 999px; border: 1px solid var(--line-strong); font: 700 var(--fs-xs) var(--font-mono); cursor: pointer; background: var(--surface-3); color: var(--text-2); }
.bc-sw.on { background: color-mix(in srgb, var(--ok) 18%, var(--surface-2)); border-color: color-mix(in srgb, var(--ok) 55%, transparent); color: var(--ok); }
.bc-sw.off { background: color-mix(in srgb, var(--crit) 14%, var(--surface-2)); border-color: color-mix(in srgb, var(--crit) 55%, transparent); color: var(--crit); }
.bc-sw:disabled { cursor: not-allowed; opacity: .65; }
.bc-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dk-nw { white-space: nowrap; }
.dk-miss b, .dk-ok b { font-size: 10px; letter-spacing: .06em; }
.cv-focus .cv > [hidden], .cv-focus [hidden] { display: none !important; }
.mw-main > *, .mw-bottom > *, .sx-host > * { min-width: 0; }

/* ===================================================================== Trading Hall positions (positions-1.0.0, 2026-10-08) */
.hp-controls { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: end; margin-bottom: var(--sp-3); }
.hp-filter { display: inline-flex; flex-direction: column; gap: 2px; }
.hp-filter small, .hp-l { font-size: 10px; letter-spacing: .08em; color: var(--text-3); font-weight: 650; }
.hp-search { min-width: 220px; flex: 1 1 220px; max-width: 360px; }
.hp-summary { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); align-items: center; padding: 10px 14px; margin-bottom: var(--sp-3);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.hp-sum-main { display: flex; flex-direction: column; } .hp-sum-main strong { font: 700 var(--fs-2xl) var(--font-mono); line-height: 1; }
.hp-sum-ccy, .hp-sum-by { display: flex; flex-wrap: wrap; gap: 4px var(--sp-3); align-items: baseline; font: 600 var(--fs-sm) var(--font-mono); }
.hp-sum-ccy small, .hp-sum-by small { font-family: var(--font-sans); color: var(--text-3); font-weight: 500; }
.hp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.hp-card { border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hp-card.open.d-long { border-left-color: var(--ok); } .hp-card.open.d-short { border-left-color: var(--crit); }
.hp-card.closed { opacity: .97; }
.hp-head { display: flex; flex-direction: column; gap: 4px; }
.hp-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hp-sym { font: 700 var(--fs-xl) var(--font-mono); letter-spacing: .02em; margin-right: 4px; }
.hp-broker { margin-left: auto; font: 650 var(--fs-xs) var(--font-mono); color: var(--text-2); letter-spacing: .04em; }
.hp-who { font-size: var(--fs-sm); color: var(--text-2); overflow-wrap: anywhere; } .hp-who small { color: var(--text-3); }
.hp-main { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.hp-pnl { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line-soft); }
.hp-pnl strong { font: 750 var(--fs-2xl) var(--font-mono); line-height: 1.1; overflow-wrap: anywhere; }
.hp-pnl small { color: var(--text-2); font-size: var(--fs-xs); }
.hp-pnl.tone-ok strong { color: var(--ok); } .hp-pnl.tone-crit strong { color: var(--crit); }
.hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.hp-tile { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-soft); min-width: 0; }
.hp-v { font: 700 var(--fs-md) var(--font-mono); overflow-wrap: anywhere; }
.hp-s { font-size: 11px; color: var(--text-3); overflow-wrap: anywhere; line-height: 1.3; }
.hp-tile.t-crit { border-left: 3px solid var(--crit); } .hp-tile.t-ok { border-left: 3px solid var(--ok); } .hp-tile.t-warn { border-left: 3px solid var(--warn); }
.hp-tile.t-crit .hp-v { color: var(--crit); } .hp-tile.t-ok .hp-v { color: var(--ok); } .hp-tile.t-warn .hp-v { color: var(--warn); }
.hp-nostop .hp-v { letter-spacing: .04em; }
.hp-opt { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px 10px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: var(--radius); font: 600 var(--fs-sm) var(--font-mono); }
.hp-opt span { display: flex; flex-direction: column; } .hp-opt small { font: 650 10px var(--font-sans); letter-spacing: .06em; color: var(--text-3); }
.hp-time { display: flex; flex-wrap: wrap; gap: 4px var(--sp-4); font: 600 var(--fs-sm) var(--font-mono); }
.hp-time small { font: 650 10px var(--font-sans); letter-spacing: .06em; color: var(--text-3); }
.hp-recon { display: flex; flex-wrap: wrap; gap: 6px var(--sp-3); align-items: center; padding: 6px 10px; border-radius: var(--radius); background: var(--surface-2); font: 600 var(--fs-sm) var(--font-mono); }
.hp-recon small { font: 650 10px var(--font-sans); color: var(--text-3); letter-spacing: .06em; }
.hp-recon.bad { border: 2px solid var(--crit); background: color-mix(in srgb, var(--crit) 12%, var(--surface-2)); }
.hp-why { font-size: var(--fs-sm); } .hp-why small { font: 650 10px var(--font-sans); letter-spacing: .08em; color: var(--text-3); }
.hp-why ul, .hp-why-full { margin: 4px 0 0; padding-left: 18px; } .hp-why li { margin: 1px 0; }
.hp-missing { margin: 0; color: var(--warn); font-size: var(--fs-xs); font-weight: 600; }
.hp-card > footer { display: flex; justify-content: flex-end; }
.hp-open { font-weight: 700; letter-spacing: .04em; }
.hp-tbl td.mono, .hp-tbl .mono { font-family: var(--font-mono); }
.hp-sort { border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; padding: 0; text-transform: inherit; }
.hp-sort:focus-visible { outline: 2px solid var(--accent); }
.hp-detail { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.hp-detail-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: var(--sp-4); align-items: start; }
.hp-chart-wrap { min-width: 0; }
.hp-chart { height: min(62vh, 560px); min-height: 320px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hp-chart-note { margin: 4px 0 0; }
.hp-panel { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.hp-panel .hp-title { margin-bottom: 6px; }
.hp-below { display: flex; flex-direction: column; gap: var(--sp-3); }
.hp-audit { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 var(--sp-4); }
@media (max-width: 900px) {
  .hp-main, .hp-detail-top { grid-template-columns: minmax(0, 1fr); }
  .hp-chart { height: 46vh; min-height: 260px; }
  .hp-search { max-width: none; }
}
.hp-controls { align-items: flex-end; }
.hp-filter select, .hp-controls .v62-in { height: 32px; min-height: 0; padding-top: 0; padding-bottom: 0; }
.hp-filter select { flex: none; }
.hp-tbl td, .hp-tbl th { white-space: nowrap; }
.dk-wrap { white-space: normal; overflow-wrap: anywhere; }
/* probation-1.0.0 (2026-10-12): owner alerts + probation criteria above the positions */
.hp-probation { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.hp-probation .hp-recon.bad { display: grid; gap: 4px; }

/* ---------------------------------------------------------------- TRADING CITY V2 (city-v2-1.0.0): towers, floor, replay */
.c2 { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.c2-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.c2-head h1 { margin: 0; font-size: var(--fs-xl); letter-spacing: .06em; }
.c2-sp { flex: 1 1 auto; }
.c2-faint { color: var(--text-3); font-size: var(--fs-xs); }
.c2-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; white-space: nowrap; color: var(--text-2); background: var(--surface-2); }
.c2-badge.ok { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.c2-badge.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.c2-badge.crit { color: var(--crit); border-color: var(--crit); background: var(--crit-soft); }
.c2-badge.proven { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.c2-badge.exp { color: var(--info); border-color: var(--info); background: var(--info-soft); }
.c2-badge.shadow { color: var(--wait); border-color: var(--wait); background: var(--wait-soft); }
.c2-badge.off { color: var(--text-3); border-style: dashed; }
.c2-badge.live { color: var(--ok); border-color: var(--ok); }
.c2-badge.replay { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.c2-badge.paper { color: var(--info); border-color: var(--info); }
.c2-badge.cf { color: var(--warn); border-color: var(--warn); border-style: dashed; }
.c2-badge.owner { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); }
.c2-modes { display: inline-flex; gap: var(--sp-1); }
.c2-kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface-2); }
.c2-kv span { color: var(--text-3); font-size: 11px; letter-spacing: .06em; }
.c2-kv b { font-weight: 600; font-size: var(--fs-sm); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.c2-kv.wide { grid-column: 1 / -1; }
.c2-kv.c2-owner b, .c2-kv.c2-blk b { color: var(--accent-strong); }
.tone-up, .c2-kv.tone-up b { color: var(--text); } .tone-down, .c2-kv.tone-down b { color: var(--text); }
.c2-sys { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sp-4); }
.c2-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.c2-card header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.c2-card h2 { margin: 0; font-size: var(--fs-sm); letter-spacing: .12em; color: var(--text-2); }
.c2-bn { border-left: 3px solid var(--crit); }
.c2-bn-id strong { font-family: var(--font-mono); font-size: var(--fs-lg); }
.c2-bn-sym { margin: 0; font-size: var(--fs-md); }
.c2-card details p { margin: 6px 0; font-size: var(--fs-sm); color: var(--text-2); }
.c2-card summary { cursor: pointer; color: var(--text-3); font-size: var(--fs-xs); }
.c2-cap-grid, .c2-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.c2-sky-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--surface-3), var(--surface)); padding: var(--sp-3) var(--sp-4) 0; }
.c2-sky { width: 100%; height: auto; display: block; max-height: 190px; }
.c2-sky-ground { stroke: var(--line-strong); stroke-width: 1; }
.c2-sky-t { cursor: pointer; outline: none; }
.c2-sky-body { fill: var(--surface-3); stroke: var(--line-strong); }
.c2-sky-t.proven .c2-sky-body { stroke: var(--ok); fill: var(--ok-soft); }
.c2-sky-t.exp .c2-sky-body { stroke: var(--info); fill: var(--info-soft); }
.c2-sky-t.shadow .c2-sky-body { stroke: var(--wait); fill: var(--wait-soft); }
.c2-sky-t.off .c2-sky-body { stroke-dasharray: 3 3; }
.c2-sky-t:hover .c2-sky-body, .c2-sky-t:focus-visible .c2-sky-body { stroke: var(--accent); stroke-width: 2; }
.c2-sky-win { fill: var(--line-strong); opacity: .55; }
.c2-sky-t.proven .c2-sky-win, .c2-sky-t.exp .c2-sky-win { fill: var(--accent); opacity: .5; }
.c2-sky-light { fill: var(--text-3); } .c2-sky-light.ok { fill: var(--ok); } .c2-sky-light.warn { fill: var(--warn); } .c2-sky-light.crit { fill: var(--crit); }
.c2-sky-label { fill: var(--text-2); font-size: 12px; font-weight: 600; letter-spacing: .08em; font-family: var(--font-mono); }
.c2-towers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-3); }
.c2-tower { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--line); border-top: 3px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); color: inherit; text-decoration: none; min-width: 0; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.c2-tower:hover, .c2-tower:focus-visible { background: var(--surface-hover); border-color: var(--accent-line); }
.c2-tower.proven { border-top-color: var(--ok); } .c2-tower.exp { border-top-color: var(--info); } .c2-tower.shadow { border-top-color: var(--wait); } .c2-tower.off { border-top-style: dashed; }
.c2-tower-h { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.c2-tower-h strong { font-size: var(--fs-xl); font-family: var(--font-mono); letter-spacing: .04em; }
.c2-tower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-1); }
.c2-sim { font-size: var(--fs-xs); color: var(--wait); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 4px 8px; }
.c2-blocker { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.c2-blocker span { font-size: 11px; color: var(--text-3); letter-spacing: .08em; } .c2-blocker b { font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.c2-sec { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: var(--sp-3) var(--sp-4); min-width: 0; }
.c2-sec-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--sp-3); margin-bottom: var(--sp-2); }
.c2-sec-h h2 { margin: 0; font-size: var(--fs-sm); letter-spacing: .12em; }
.c2-sec-h span { color: var(--text-3); font-size: var(--fs-xs); }
.c2-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-4); }
.c2-status { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); }
.c2-desk { display: flex; flex-direction: column; gap: var(--sp-2); }
.c2-desk-tf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.c2-tf { display: flex; flex-direction: column; gap: 3px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface-2); }
.c2-tf > span { font-family: var(--font-mono); color: var(--text-3); font-size: var(--fs-xs); }
.c2-tf b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.c2-an { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-2); }
.c2-an-c { display: flex; flex-direction: column; gap: 3px; padding: var(--sp-2); border: 1px solid var(--line-soft); border-radius: var(--radius); font-size: var(--fs-sm); min-width: 0; }
.c2-an-c.bad { border-color: var(--warn); }
.c2-an-h { display: flex; align-items: center; gap: var(--sp-1); }
.c2-funnel { display: flex; flex-direction: column; gap: 4px; }
.c2-fn { display: grid; grid-template-columns: 120px 1fr 32px; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); }
.c2-fn-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.c2-fn-bar i { display: block; height: 100%; background: var(--accent); opacity: .7; }
.c2-fn b { text-align: right; font-variant-numeric: tabular-nums; }
.c2-pos { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--sp-2); }
.c2-pos.broker { border-left: 3px solid var(--info); } .c2-pos.sim { border-style: dashed; } .c2-pos.cf { border: 1px dashed var(--warn); } .c2-pos.owner { border-left: 3px solid var(--accent); }
.c2-pos-h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.c2-pos p { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.c2-strats, .c2-bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-2); }
.c2-strat { display: flex; flex-direction: column; gap: 3px; padding: var(--sp-2); border: 1px solid var(--line-soft); border-radius: var(--radius); min-width: 0; font-size: var(--fs-sm); }
.c2-strat small { overflow-wrap: anywhere; }
.c2-tbl-wrap { overflow-x: auto; max-width: 100%; }
.c2-tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.c2-tbl th { text-align: left; color: var(--text-3); font-weight: 600; font-size: 11px; letter-spacing: .06em; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.c2-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.c2-tbl td.mono { font-family: var(--font-mono); white-space: nowrap; }
.c2-tbl tr.dim td { color: var(--text-3); }
.c2-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.c2-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.c2-days { display: flex; flex-direction: column; gap: 4px; }
.c2-day { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; } .c2-day b { font-family: var(--font-mono); min-width: 96px; font-size: var(--fs-sm); }
.c2-chart-wrap { display: flex; flex-direction: column; gap: 4px; }
.c2-chart { width: 100%; min-height: 220px; }
.c2-svg { display: block; }
.c2-grid { stroke: var(--chart-grid); }
.c2-ax { fill: var(--text-3); font-size: 11px; font-family: var(--font-mono); }
.c2-wick { stroke-width: 1; } .c2-wick.up { stroke: var(--candle-up); } .c2-wick.dn { stroke: var(--candle-down); }
.c2-body.up { fill: var(--candle-up); } .c2-body.dn { fill: var(--candle-down); }
.c2-lv { stroke-width: 1.5; } .c2-lv.dash { stroke-dasharray: 5 4; }
.c2-lv.entry { stroke: var(--info); } .c2-lv.stop { stroke: var(--crit); } .c2-lv.target { stroke: var(--ok); } .c2-lv.exit { stroke: var(--accent); }
.c2-lv.mfe { stroke: var(--ok); opacity: .7; } .c2-lv.mae { stroke: var(--crit); opacity: .6; } .c2-lv.zone { stroke: var(--text-3); }
.c2-lv.cf, .c2-lv.cf-stop { stroke: var(--warn); }
.c2-lv-t { font-size: 11px; font-family: var(--font-mono); fill: var(--text-2); }
.c2-lv-t.entry { fill: var(--info); } .c2-lv-t.stop, .c2-lv-t.mae { fill: var(--crit); } .c2-lv-t.target, .c2-lv-t.mfe { fill: var(--ok); }
.c2-lv-t.exit, .c2-lv-t.trail { fill: var(--accent); } .c2-lv-t.cf, .c2-lv-t.cf-stop { fill: var(--warn); }
.c2-trail { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 2 3; }
.c2-cursor { stroke: var(--accent); stroke-width: 1; opacity: .8; }
.c2-exit { fill: var(--accent); stroke: var(--bg); } .c2-fillpt { fill: var(--info); stroke: var(--bg); }
.c2-ev { fill: var(--text-3); } .c2-ev.fill { fill: var(--info); } .c2-ev.rej { fill: var(--warn); } .c2-ev.arm { fill: var(--text-2); } .c2-ev.close { fill: var(--accent); }
.c2-legend { display: flex; flex-wrap: wrap; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--text-3); }
.c2-lg::before { content: ""; display: inline-block; width: 14px; height: 2px; margin-right: 5px; vertical-align: middle; background: var(--text-3); }
.c2-lg.entry::before { background: var(--info); } .c2-lg.stop::before { background: var(--crit); } .c2-lg.target::before, .c2-lg.mfe::before { background: var(--ok); }
.c2-lg.trail::before, .c2-lg.exit::before { background: var(--accent); } .c2-lg.cf::before { background: var(--warn); }
.c2-play { margin-top: var(--sp-2); }
.c2-scrub { flex: 1 1 200px; min-width: 140px; accent-color: var(--accent); }
.c2-clock { font-family: var(--font-mono); font-size: var(--fs-sm); }
.c2-frame { display: flex; flex-direction: column; gap: var(--sp-2); }
.c2-evs { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-xs); }
.c2-evl { display: grid; grid-template-columns: 100px 140px 150px 1fr; gap: var(--sp-2); padding: 3px 6px; border-radius: var(--radius-sm); background: var(--surface-2); }
.c2-evl b { font-family: var(--font-mono); } .c2-evl span { overflow-wrap: anywhere; }
.c2-evl.order_filled, .c2-evl.manual_close { border-left: 3px solid var(--info); } .c2-evl.risk_rejected { border-left: 3px solid var(--warn); }
.c2-entry { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); border: 1px solid var(--accent-line); border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--text); text-decoration: none; }
.c2-entry b { letter-spacing: .1em; color: var(--accent-strong); } .c2-entry span { color: var(--text-2); font-size: var(--fs-sm); }
.c2-entry:hover { border-color: var(--accent); }
@media (max-width: 1100px) { .c2-sys, .c2-two { grid-template-columns: 1fr; } .c2-cap-grid, .c2-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .c2-towers { grid-template-columns: 1fr; } .c2-desk-tf { grid-template-columns: 1fr; } .c2-sec { padding: var(--sp-2) var(--sp-3); }
  .c2-evl { grid-template-columns: 1fr; } .c2-fn { grid-template-columns: 96px 1fr 28px; } .c2-head h1 { font-size: var(--fs-lg); }
}

/* owner 2026-10-16: execution pipeline per opportunity card */
.bd-pipe { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.bd-stage { font-size: 11px; padding: 1px 6px; border-radius: 8px; border: 1px solid currentColor; white-space: nowrap; }
.bd-stage.tone-ok { color: var(--ok); }
.bd-stage.tone-warn { color: var(--warn); }

/* TRADING CITY team towers: a team's market desks, its workers and the enter cue */
.c2-desks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-2); }
.c2-enter { align-self: flex-end; font-size: var(--fs-xs); letter-spacing: .1em; color: var(--accent-strong); }
.c2-worker { text-decoration: none; color: inherit; }
a.c2-worker:hover, a.c2-worker:focus-visible { border-color: var(--accent-line); background: var(--surface-hover); }

/* ---------------------------------------------------------------- TRADING FLOOR (trading-floor-1.0.0): a team's room of bot desks */
.tf-room { position: relative; display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-4); border-radius: var(--radius-lg);
  border: 1px solid var(--line); overflow: hidden; min-width: 0;
  background: radial-gradient(120% 60% at 50% 0%, var(--surface-3), transparent 70%), linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); }
.tf-room::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(90deg, transparent 0 63px, var(--line-soft) 63px 64px), linear-gradient(180deg, transparent, var(--surface-3)); }
.tf-room > * { position: relative; z-index: 1; }
.tf-room-h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.tf-room-h strong { font-size: var(--fs-lg); letter-spacing: .08em; }
.tf-row { display: flex; flex-direction: column; gap: var(--sp-2); }
.tf-row-h { display: flex; align-items: baseline; gap: var(--sp-3); font-size: var(--fs-xs); letter-spacing: .12em; color: var(--text-3); }
.tf-floor-link { color: var(--text-3); }
.tf-desks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-4) var(--sp-3); }
.tf-desk { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: var(--sp-2) var(--sp-2) var(--sp-3);
  color: inherit; text-decoration: none; border-radius: var(--radius-lg); transition: transform var(--dur, .15s) var(--ease, ease), background var(--dur, .15s); }
a.tf-desk:hover, a.tf-desk:focus-visible { background: var(--surface-hover); transform: translateY(-2px); outline: none; }
a.tf-desk:focus-visible { box-shadow: 0 0 0 2px var(--accent-line); }
.tf-monitor { display: flex; flex-direction: column; align-items: center; }
.tf-screen { width: 100%; min-height: 128px; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 6px;
  background: var(--bg); border: 2px solid var(--line-strong); box-shadow: inset 0 0 0 1px var(--line-soft); font-family: var(--font-mono); font-size: 11px; }
.tf-stand { width: 34px; height: 12px; background: linear-gradient(180deg, var(--line-strong), var(--surface-3)); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.tf-surface { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 4px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); box-shadow: var(--shadow-sm); }
.tf-surface b { font-size: var(--fs-sm); letter-spacing: .06em; }
.tf-surface small { color: var(--text-3); font-size: 11px; overflow-wrap: anywhere; }
.tf-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.tf-chair { align-self: center; width: 46px; height: 10px; margin-top: 6px; border-radius: 0 0 14px 14px; background: var(--line); opacity: .7; }
.tf-open { font-size: 11px; letter-spacing: .1em; color: var(--accent-strong); margin-top: 6px; text-align: center; }
.tf-open.tf-quiet { color: var(--text-3); letter-spacing: 0; text-align: left; }
.tf-screen-top { display: flex; justify-content: space-between; gap: 6px; }
.tf-state { font-weight: 700; letter-spacing: .08em; color: var(--text-2); }
.tf-dir { font-weight: 700; }
.tf-dir.tone-up, .tf-pos .tone-up { color: var(--ok); } .tf-dir.tone-down, .tf-pos .tone-down { color: var(--crit); } .tf-dir.tone-flat { color: var(--text-3); }
.tf-spark { width: 100%; height: 40px; display: block; }
.tf-spark-line { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.tf-spark.up .tf-spark-line { stroke: var(--ok); } .tf-spark.down .tf-spark-line { stroke: var(--crit); }
.tf-spark-none { color: var(--text-3); height: 40px; display: flex; align-items: center; }
.tf-kvs { display: grid; grid-template-columns: 1fr; gap: 1px; color: var(--text-2); }
.tf-pos { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; border-radius: 4px; background: var(--info-soft); }
.tf-progress { position: relative; height: 14px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.tf-progress i { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); border-right: 1px solid var(--accent-line); }
.tf-progress small { position: relative; padding: 0 6px; font-size: 10px; color: var(--text-2); line-height: 14px; }
.tf-screen-foot { display: flex; justify-content: space-between; gap: 6px; color: var(--text-3); font-size: 10px; }
.tf-next { color: var(--text-2); }
/* desk states: a restrained screen border / glow, never flashing */
.tf-desk.st-POSITION .tf-screen, .tf-desk.st-PROFIT_LOCK .tf-screen { border-color: var(--info); box-shadow: 0 0 14px var(--info-soft); }
.tf-desk.st-PROFIT_LOCK .tf-state { color: var(--ok); }
.tf-desk.st-READY .tf-screen { border-color: var(--ok); } .tf-desk.st-READY .tf-state { color: var(--ok); }
.tf-desk.st-FORMING .tf-screen { border-color: var(--accent-line); } .tf-desk.st-FORMING .tf-state { color: var(--accent-strong); }
.tf-desk.st-BLOCKED .tf-state { color: var(--warn); }
.tf-desk.st-WAITING_FOR_SESSION .tf-state { color: var(--info); }
.tf-desk.st-RESEARCH .tf-screen { border-style: dashed; } .tf-desk.st-RESEARCH .tf-state { color: var(--wait); }
.tf-desk.st-DISABLED { opacity: .55; } .tf-desk.st-DISABLED .tf-screen { border-style: dotted; filter: grayscale(.7); }
.tf-desk.st-FAULT .tf-screen { border-color: var(--crit); } .tf-desk.st-FAULT .tf-state { color: var(--crit); }
/* entering the team: one short, subtle transition (the room settles in) */
.tf-enter { animation: tf-in .38s var(--ease, ease-out) both; }
@keyframes tf-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tf-enter { animation: none; } a.tf-desk:hover { transform: none; } }
/* team personality: a hairline accent per team, one design system */
.tf-team-QQQ { border-top: 3px solid var(--info); } .tf-team-SPY { border-top: 3px solid var(--ok); } .tf-team-IWM { border-top: 3px solid var(--wait); }
.tf-team-XAU { border-top: 3px solid var(--accent); } .tf-team-STOCKS { border-top: 3px solid var(--accent-strong); } .tf-team-OPTIONS { border-top: 3px solid var(--line-strong); }
.c2-tower.has-pos { box-shadow: 0 0 0 1px var(--info), 0 0 18px var(--info-soft); }
@media (max-width: 640px) {
  .tf-room { padding: var(--sp-3); } .tf-desks { grid-template-columns: 1fr; gap: var(--sp-3); }
  .tf-chair { display: none; } .tf-screen { min-height: 110px; }
}
.c2-tower-pnl { display: flex; align-items: baseline; gap: var(--sp-2); }
.c2-tower-pnl b { font-family: var(--font-mono); font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.c2-tower-pnl small { color: var(--text-3); font-size: var(--fs-xs); }
.c2-sky-pos { fill: var(--info); font-size: 10px; font-weight: 700; letter-spacing: .1em; font-family: var(--font-mono); }
.c2-sky-t.has-pos .c2-sky-body { stroke: var(--info); stroke-width: 2; }

/* ---------------------------------------------------------------- BOT WORKSTATION (#/worker/...): a trading screen */
.ws-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.ws-id { display: flex; flex-direction: column; min-width: 0; }
.ws-id h1 { margin: 0; font-size: var(--fs-xl); letter-spacing: .06em; }
.ws-id small { color: var(--text-3); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.ws-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: var(--sp-3); align-items: start; }
.ws-chart, .ws-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: var(--sp-3); min-width: 0; }
.ws-chart-h { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.ws-chart h2, .ws-panel h2 { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); letter-spacing: .12em; color: var(--text-2); }
.ws-chart-h h2 { margin: 0; }
.ws-side { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.ws-kvs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-1); }
.ws-trade.broker { border-left: 3px solid var(--info); padding-left: var(--sp-2); }
.ws-trade.sim { border-left: 3px dashed var(--wait); padding-left: var(--sp-2); }
.ws-smart { margin-top: var(--sp-2); border-top: 1px solid var(--line, rgba(127,127,127,.25)); padding-top: var(--sp-2); }
.ws-timeline { margin: var(--sp-2) 0 0; padding-left: 1.2em; font-size: .85em; max-height: 16em; overflow-y: auto; overflow-wrap: anywhere; }
.ws-timeline li { margin: 2px 0; }
.ws-log { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; font-size: var(--fs-xs); }
.ws-ev { display: grid; grid-template-columns: 92px 1fr; gap: 0 var(--sp-2); padding: 3px 6px; border-radius: var(--radius-sm); background: var(--surface-2); }
.ws-ev b { font-family: var(--font-mono); font-weight: 500; color: var(--text-3); }
.ws-ev span { font-weight: 600; letter-spacing: .04em; }
.ws-ev small { grid-column: 1 / -1; color: var(--text-2); overflow-wrap: anywhere; }
.ws-ev.k-order_filled, .ws-ev.k-order_submitted { border-left: 3px solid var(--info); }
.ws-ev.k-risk_rejected { border-left: 3px solid var(--warn); }
.ws-ev.k-position_closed { border-left: 3px solid var(--accent); }
.ws-tabs { display: flex; flex-wrap: wrap; gap: var(--sp-1); border-bottom: 1px solid var(--line); padding-bottom: var(--sp-2); }
.ws-tab-body { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.ws-curve { width: 100%; max-width: 640px; height: 120px; display: block; }
.ws-zero { stroke: var(--line-strong); stroke-dasharray: 3 3; }
.ws-c-broker { fill: none; stroke: var(--info); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ws-c-sim { fill: none; stroke: var(--wait); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
@media (max-width: 1000px) { .ws-main { grid-template-columns: 1fr; } }

/* ===================================================== TRADING CITY SCENE (city-scene-2.0.0): night city, command core, team towers */
.cx { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.cx-stage { position: relative; border: 1px solid #2b1f55; border-radius: var(--radius-lg); overflow: hidden; background: #0b0620; touch-action: pan-y; }
.cx-scene { cursor: grab; user-select: none; -webkit-user-select: none; }
.cx-scene:active { cursor: grabbing; }
.cx-svg { display: block; width: 100%; height: auto; }
.cx-star { fill: #cfc6ff; opacity: .55; }
.cx-far { fill: #1a1238; opacity: .9; }
.cx-far-win { fill: #6c5bb3; opacity: .55; }
.cx-road { stroke: #1c1840; stroke-width: 26; stroke-linecap: round; }
.cx-road-mark { stroke: #3a3170; stroke-width: 2; stroke-dasharray: 10 12; }
.cx-ring-road { fill: none; stroke: #1c1840; stroke-width: 22; }
.cx-plaza { fill: #120d2b; stroke-width: 1.5; stroke-opacity: .55; }
.cx-plaza.active { fill: #12243a; }
.cx-face { stroke: #05060f; stroke-width: .6; }
.cx-roof { stroke-width: 1.2; stroke-opacity: .8; }
.cx-edge { stroke-width: 1.4; stroke-opacity: .7; }
.cx-win { opacity: .9; }
.cx-win.on { opacity: .85; }
.cx-orn { stroke-width: 1.4; }
.cx-t { cursor: pointer; outline: none; }
.cx-t .cx-hit { fill: transparent; stroke: transparent; stroke-width: 2; pointer-events: all; }
.cx-t:hover .cx-hit, .cx-t:focus-visible .cx-hit { fill: rgba(255, 255, 255, .035); stroke: rgba(223, 243, 255, .45); stroke-dasharray: 6 6; }
.cx-t:hover .cx-face, .cx-t:focus-visible .cx-face { filter: brightness(1.35); }
.cx-t.st-OFF .cx-face, .cx-t.st-OFF .cx-roof { filter: saturate(.35) brightness(.8); }
.cx-plate { fill: rgba(9, 7, 26, .88); stroke-width: 1.2; stroke-opacity: .6; }
.cx-p-name, .cx-core-t { font-family: var(--font-mono); font-weight: 700; letter-spacing: .06em; }
.cx-core-t { fill: #dff3ff; }
.cx-p-pnl { font-family: var(--font-mono); font-weight: 700; fill: #dfe3f5; }
.cx-p-pnl.tone-up { fill: var(--ok); } .cx-p-pnl.tone-down { fill: var(--crit); }
.cx-p-sub, .cx-p-next { fill: #a9a6c9; font-family: var(--font-mono); }
.cx-p-next { fill: #c9c3f0; }
.cx-chip { fill: #23203d; } .cx-chip.live { fill: #0e3a4a; } .cx-chip.ok { fill: #0f3a2a; } .cx-chip.info { fill: #1a2a55; } .cx-chip.warn { fill: #4a3410; } .cx-chip.crit { fill: #4a1218; } .cx-chip.off { fill: #1b1a26; }
.cx-chip-t { font-family: var(--font-mono); font-weight: 700; letter-spacing: .06em; fill: #b9b6d6; }
.cx-chip-t.live { fill: #38e1ff; } .cx-chip-t.ok { fill: var(--ok); } .cx-chip-t.info { fill: #9fb4ff; } .cx-chip-t.warn { fill: var(--warn); } .cx-chip-t.crit { fill: var(--crit); } .cx-chip-t.off { fill: #6b6880; }
.cx-beacon { fill: #6b6880; } .cx-beacon.h-HEALTHY, .cx-beacon.h-OK { fill: var(--ok); } .cx-beacon.h-DEGRADED, .cx-beacon.h-STALE { fill: var(--warn); } .cx-beacon.h-FAULT { fill: var(--crit); }
.cx-flag { font-family: var(--font-mono); font-weight: 700; font-size: 14px; letter-spacing: .08em; }
.cx-pulse { fill: none; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: cx-pulse 2.4s ease-out infinite; }
@keyframes cx-pulse { 0% { opacity: .9; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.25); } }
.cx-t.st-TRADE_ACTIVE .cx-beacon { animation: cx-blink 1.6s ease-in-out infinite; }
@keyframes cx-blink { 50% { opacity: .35; } }
.cx-ring { animation: cx-spin 14s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes cx-spin { 50% { stroke-opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .cx-pulse, .cx-ring, .cx-t.st-TRADE_ACTIVE .cx-beacon { animation: none; } }
.cx-ctrl { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.cx-ctrl .btn { background: rgba(9, 7, 26, .8); min-width: 36px; }
.cx-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.cx-legend { display: flex; flex-wrap: wrap; gap: 10px; font: 600 10px/1.2 var(--font-mono); letter-spacing: .06em; color: #a9a6c9; }
.cx-lg i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; background: #6b6880; vertical-align: -1px; }
.cx-lg.live i { background: #38e1ff; } .cx-lg.ok i { background: var(--ok); } .cx-lg.info i { background: #9fb4ff; } .cx-lg.warn i { background: var(--warn); } .cx-lg.off i { background: #3a384a; }
.cx-hint { margin: 0; color: var(--text-3); font-size: 12px; }
.cx-hud { display: grid; gap: 6px; padding: var(--sp-3); border: 1px solid #3a2f73; border-radius: var(--radius-lg); background: linear-gradient(180deg, #160f33, #0c0a1f); color: inherit; text-decoration: none; }
.cx-hud:hover, .cx-hud:focus-visible { border-color: #dff3ff; }
.cx-hud-h { display: flex; flex-direction: column; margin-bottom: 4px; }
.cx-hud-h b { font: 700 15px/1.3 var(--font-mono); letter-spacing: .1em; color: #dff3ff; }
.cx-hud-h small { color: var(--text-3); }
.cx-hud-r { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; border-bottom: 1px dashed #2a2350; padding-bottom: 4px; }
.cx-hud-r span { color: var(--text-3); letter-spacing: .05em; }
.cx-hud-r b { font-family: var(--font-mono); text-align: right; overflow-wrap: anywhere; }
.cx-hud-go { margin-top: 4px; font: 700 11px/1.2 var(--font-mono); letter-spacing: .08em; color: var(--accent); }
@media (max-width: 1100px) { .cx { grid-template-columns: minmax(0, 1fr); } .cx-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; } .cx-hud-h, .cx-hud-go { grid-column: 1 / -1; } }
@media (max-width: 520px) { .cx-hud { grid-template-columns: minmax(0, 1fr); } }

/* trading-floor-1.1.0: the room (back wall + wall screen, perspective floor), desks with their bot, the team heatmap */
.tf-room { background: linear-gradient(180deg, #120c2a 0, #0d0a22 150px, #0b0d1e 151px, #0a0c1a 100%); border-color: #2b2257; }
.tf-room::before { content: ""; position: absolute; left: -20%; right: -20%; top: 150px; bottom: -40%; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(90deg, rgba(120, 100, 220, .10) 0 1px, transparent 1px 90px), repeating-linear-gradient(0deg, rgba(120, 100, 220, .10) 0 1px, transparent 1px 70px);
  transform: perspective(700px) rotateX(58deg); transform-origin: 50% 0; }
.tf-room::after { display: none; }
.tf-wall { display: flex; justify-content: center; }
.tf-wall-screen { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: min(560px, 100%); padding: 10px 18px; border-radius: 8px;
  border: 1px solid #3a2f73; background: linear-gradient(180deg, #08061a, #140d33); box-shadow: 0 0 24px rgba(90, 60, 200, .25), inset 0 0 0 3px #0b0820; text-align: center; }
.tf-wall-screen b { font: 700 20px/1.2 var(--font-mono); letter-spacing: .16em; }
.tf-wall-screen span { font: 600 12px/1.3 var(--font-mono); color: #c9c3f0; letter-spacing: .06em; }
.tf-wall-screen small { color: var(--text-3); font-size: 11px; max-width: 70ch; }
.tf-team-QQQ .tf-wall-screen b { color: #38e1ff; } .tf-team-SPY .tf-wall-screen b { color: #7d98ff; } .tf-team-IWM .tf-wall-screen b { color: #ffb347; }
.tf-team-XAU .tf-wall-screen b { color: #e9c46a; } .tf-team-STOCKS .tf-wall-screen b { color: #a78bfa; } .tf-team-OPTIONS .tf-wall-screen b { color: #f472b6; }
.tf-floor { display: flex; flex-direction: column; gap: var(--sp-4); }
.tf-desk { background: transparent; border: 0; }
.tf-screen { background: #05060f; border: 2px solid #2a2d48; box-shadow: inset 0 0 18px rgba(56, 225, 255, .06); font-family: var(--font-mono); font-size: 11px; }
.tf-surface { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: -2px; border: 0; border-radius: 4px 4px 10px 10px;
  background: linear-gradient(180deg, #3a3150 0, #251f38 10px, #1a1629 100%); box-shadow: 0 10px 18px rgba(0, 0, 0, .45); clip-path: polygon(3% 0, 97% 0, 100% 100%, 0 100%); padding: 10px 14px; }
.tf-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tf-bot { width: 40px; height: 52px; display: block; }
.tf-bot-head, .tf-bot-body { fill: #4a4568; stroke: #7a74a3; stroke-width: 1; }
.tf-bot-seat { fill: #15121f; stroke: #2e2945; }
.tf-bot-ant { stroke: #7a74a3; stroke-width: 1.5; }
.tf-bot-eye, .tf-bot-led { fill: #6b6880; }
.tf-bot.st-SCANNING .tf-bot-eye, .tf-bot.st-FORMING .tf-bot-eye { fill: #9fb4ff; }
.tf-bot.st-READY .tf-bot-eye, .tf-bot.st-READY .tf-bot-led { fill: var(--ok); }
.tf-bot.st-POSITION .tf-bot-eye, .tf-bot.st-POSITION .tf-bot-led, .tf-bot.st-PROFIT_LOCK .tf-bot-eye { fill: #38e1ff; }
.tf-bot.st-WAITING_FOR_SESSION .tf-bot-eye { fill: #7d98ff; opacity: .6; }
.tf-bot.st-BLOCKED .tf-bot-eye { fill: var(--warn); } .tf-bot.st-FAULT .tf-bot-eye, .tf-bot.st-FAULT .tf-bot-led { fill: var(--crit); }
.tf-bot.st-RESEARCH .tf-bot-eye { fill: #a78bfa; opacity: .7; } .tf-bot.st-DISABLED .tf-bot-eye { fill: #2b2838; }
.tf-bot.st-POSITION .tf-bot-led, .tf-bot.st-SCANNING .tf-bot-led { animation: cx-blink 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .tf-bot .tf-bot-led { animation: none; } }
.tf-heat-btn { margin-left: var(--sp-2); }
.tf-heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.tf-heat-c { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 6px; border: 1px solid #2a2d48; background: #12102a; color: inherit; text-decoration: none; }
.tf-heat-c b { font: 700 12px/1.3 var(--font-mono); letter-spacing: .05em; } .tf-heat-c span { font: 700 11px/1.3 var(--font-mono); } .tf-heat-c small { color: var(--text-3); font-size: 11px; }
.tf-heat-c.st-POSITION, .tf-heat-c.st-PROFIT_LOCK { background: #0d2c3a; border-color: #38e1ff; } .tf-heat-c.st-READY { background: #0f2e22; border-color: var(--ok); }
.tf-heat-c.st-FORMING, .tf-heat-c.st-SCANNING { background: #16204a; } .tf-heat-c.st-WAITING_FOR_SESSION { background: #141a3a; }
.tf-heat-c.st-BLOCKED { background: #33260c; } .tf-heat-c.st-FAULT { background: #3a1015; border-color: var(--crit); }
.tf-heat-c.st-RESEARCH { background: #1d1638; border-style: dashed; } .tf-heat-c.st-DISABLED { opacity: .55; }
a.tf-heat-c:hover { border-color: var(--accent-line); }
@media (max-width: 640px) { .tf-room::before { top: 130px; } .tf-wall-screen b { font-size: 16px; } }
/* BOT WORKSTATION: TEAM XAU status + TEAM OPTIONS underlying signal vs option expression (worker.js) */
.ws-extra { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.ws-extra:empty, .ws-wide:empty { display: none; }
.ws-wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--sp-3); align-items: start; }
.ws-wide h3 { margin: var(--sp-2) 0 var(--sp-1); font-size: var(--fs-xs); letter-spacing: .1em; color: var(--text-2); }
.ws-panel small { display: block; overflow-wrap: anywhere; }
.ws-ev.k-decision_reject, .ws-ev.k-option_rejected { border-left: 3px solid var(--warn); }
.ws-ev.k-demo_opened, .ws-ev.k-option_candidate { border-left: 3px solid var(--info); }
.ws-ev.k-demo_closed { border-left: 3px solid var(--accent); }
@media (max-width: 1000px) { .ws-wide { grid-template-columns: 1fr; } }

/* Monday gap closure: routed desks waiting for their strategy window (by design) */
.tf-desk.st-WAITING_FOR_WINDOW .tf-screen { border-color: #7d98ff; } .tf-desk.st-WAITING_FOR_WINDOW .tf-state { color: #9fb4ff; }
.tf-desk.st-WINDOW_CLOSED .tf-state { color: var(--muted, #8a93b8); }
.tf-window { display: block; color: #9fb4ff; font-size: 11px; margin-top: 2px; }
.tf-bot.st-WAITING_FOR_WINDOW .tf-bot-eye { fill: #9fb4ff; }
.tf-heat-c.st-WAITING_FOR_WINDOW { background: #18234f; border-color: #7d98ff; } .tf-heat-c.st-WINDOW_CLOSED { background: #141a3a; }

/* TEAM / BOT COMPETITION (#/competition, competition-1.0.0): tables scroll inside .c2-tbl-wrap, never the page */
.cmp { max-width: 100%; overflow-x: hidden; }
.cmp .c2-head .c2-seg { margin-left: auto; }
.cmp-basis { margin: 0; color: var(--text-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.cmp-totms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-3); }
.cmp-totm { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.cmp-totm.won { border-color: var(--ok); background: var(--ok-soft); }
.cmp-totm strong { font-size: var(--fs-lg); letter-spacing: .04em; }
.cmp-totm small { overflow-wrap: anywhere; }
.cmp-totm-k { color: var(--text-3); font-size: var(--fs-xs); letter-spacing: .1em; }
.cmp-totm .c2-badge { align-self: flex-start; }
.cmp-bots { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.cmp-bot { min-width: 0; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 4px var(--sp-3); }
.cmp-bot summary { cursor: pointer; padding: 4px 0; overflow-wrap: anywhere; }
.cmp-conf { white-space: nowrap; }
.cmp-formula { overflow-wrap: anywhere; font-size: var(--fs-xs); }
.cmp-ex { margin: 4px 0; padding-left: 18px; font-size: var(--fs-xs); overflow-wrap: anywhere; }
.cmp-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: var(--sp-2) 0 0; }

/* dashboard-semantics-1.0.0: FAILED by evidence = analysis only (awake, never routes); NOT_BUILT = no strategy */
.tf-desk.st-FAILED_SHADOW .tf-screen { border-style: dashed; } .tf-desk.st-NOT_BUILT { opacity: .55; } .tf-desk.st-NOT_BUILT .tf-screen { border-style: dotted; filter: grayscale(.7); }
.tf-bot.st-FAILED_SHADOW .tf-bot-eye { fill: #a78bfa; opacity: .5; } .tf-bot.st-NOT_BUILT .tf-bot-eye { fill: #2b2838; }
.tf-heat-c.st-FAILED_SHADOW { background: #1d1638; border-style: dashed; opacity: .8; } .tf-heat-c.st-NOT_BUILT { opacity: .55; }
.cx-chip.shadow { fill: #241a40; } .cx-chip-t.shadow { fill: #b9a3ff; } .cx-lg.shadow i { background: #a78bfa; }
/* performance-r-1.0.0: R first; NORMALIZED / HYPOTHETICAL columns are visibly a display only */
.pr-sums { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.pr-sum { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.pr-big { font-size: 26px; font-family: var(--mono, monospace); }
.pr-norm, .pr-hyp { color: var(--text-2); font-style: italic; } .pr-norm { font-size: 11px; overflow-wrap: anywhere; }
.pr-h { font-size: 12px; letter-spacing: .05em; margin: 14px 0 6px; color: var(--text-2); overflow-wrap: anywhere; }

/* LEADERBOARD (#/leaderboard, leaderboard-1.0.0): tables scroll inside .c2-tbl-wrap, never the page */
.lb .c2-head { flex-wrap: wrap; }
.lb .c2-head .c2-seg + .c2-seg { margin-left: 0; }
.lb-review { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.lb-kv { display: grid; grid-template-columns: minmax(140px, max-content) minmax(0, 1fr); gap: 4px var(--sp-3); margin: 0; font-size: var(--fs-sm); }
.lb-kv dt { color: var(--text-3); font-size: var(--fs-xs); letter-spacing: .06em; }
.lb-kv dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 600px) { .lb-kv { grid-template-columns: 1fr; } .lb-kv dd { margin-bottom: 4px; } }
.lb-strat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lb-strat .mono { font-size: var(--fs-xs); overflow-wrap: anywhere; }
.lb-small { font-style: italic; opacity: .75; }
.lb-desc { display: inline-block; min-width: 16ch; max-width: 60ch; white-space: normal; overflow-wrap: anywhere; }
.lb-reg, .lb-vh { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.lb-reg-team h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); letter-spacing: .06em; }
.lb-reg-bot p, .lb-vh-one p { margin: 0 0 var(--sp-2); overflow-wrap: anywhere; }
.lb-chal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.lb-chal li { border-left: 2px solid var(--line); padding-left: var(--sp-2); min-width: 0; }
.lb-chal-h { display: flex; flex-wrap: wrap; gap: 4px var(--sp-2); align-items: center; margin: 0 0 4px; }
.lb-chal-d { margin: 0 0 2px; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.lb-cmp { display: flex; flex-wrap: wrap; gap: 4px var(--sp-2); align-items: center; }
