/* Desktop frame tuned to the approved 1672x941 V1 reference screens.
 * Data remains API-backed; the compact profile changes geometry only. */
/* Use the bounded cockpit canvas at both supported desktop capture sizes.
   The shared shell already enables this mode at 1200x760; keeping detail
   pages on an unbounded grid at 1536x864 pushes their panels below the fold. */
@media (min-width: 1200px) and (min-height: 760px) {
  html, body { height: 100%; overflow: hidden; }
  .shell { height: 100vh; min-height: 0; }
  .topbar {
    height: 52px; min-height: 52px; flex: 0 0 52px;
    gap: 11px; padding: 0 14px;
  }
  .brand { min-width: 205px; gap: 8px; }
  .brand-symbol { width: 38px; height: 38px; font-size: 27px; }
  .top-nav { gap: 2px; min-width: 0; }
  .top-nav button { min-height: 34px; padding: 7px 9px; font-size: 11px; }
  .top-actions { gap: 7px; }

  .workspace {
    height: calc(100vh - 82px); min-height: 0; flex: 1 1 auto;
    overflow: hidden;
  }
  .sidebar {
    display: flex; flex: 0 0 162px; flex-direction: column;
    width: 162px; padding: 8px 7px 10px; overflow-y: auto;
  }
  .side-heading { margin: 13px 8px 6px; font-size: 9px; letter-spacing: 1.3px; }
  .side-link { gap: 7px; margin: 1px 0; padding: 8px; font-size: 11px; }
  .side-icon { width: 16px; font-size: 14px; }
  .sidebar-note { margin: auto 4px 0; padding: 9px 8px; font-size: 9px; line-height: 1.55; }

  .main {
    width: calc(100% - 162px); height: 100%; min-width: 0;
    max-width: none; margin: 0; padding: 9px 13px;
    overflow: auto; overscroll-behavior: contain;
  }
  /* The active primary tab names the page; keep the H1 for assistive tech
     while matching the references' compact content start. */
  .page-heading {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important;
    white-space: nowrap !important; border: 0 !important;
  }
  .kpis, .overview-cockpit .kpis, .detail-cockpit .kpis,
  .factory-cockpit .kpis, .validation-cockpit .kpis,
  .money-cockpit .kpis, .risk-cockpit .kpis,
  .ops-cockpit .kpis, .audit-cockpit .kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px; margin-bottom: 10px;
  }
  .metric { min-height: 82px; padding: 10px 11px; }
  .metric .label { font-size: 10px; }
  .metric .value { margin: 7px 0 3px; font-size: 21px; }
  .metric small { font-size: 9px; }
  .panel { min-height: 0; padding: 11px 12px 12px; border-radius: 9px; }
  .panel-header { padding-bottom: 8px; }
  .panel h2 { font-size: 13px; }
  .panel-header small { padding: 4px 6px; font-size: 9px; }
  .panel-body { padding-top: 8px; }
  .empty { min-height: 98px; padding: 11px; }
  .empty small { font-size: 9px; }
  .data-table th, .data-table td { padding: 7px; font-size: 10px; }
  .footer { min-height: 30px; height: 30px; padding: 5px 13px; font-size: 9px; }

  .overview-cockpit .kpis { margin-bottom: 9px; }
  .overview-cockpit .metric { min-height: 82px; }
  .overview-grid { gap: 9px; }
  .overview-grid .hero-research,
  .overview-grid .hero-funnel,
  .overview-grid .hero-money { min-height: 350px; }
  .overview-grid .overview-agent,
  .overview-grid .overview-feed,
  .overview-grid .overview-holdings { min-height: 230px; }
  .overview-grid .overview-risk,
  .overview-grid .overview-market,
  .overview-grid .overview-events,
  .overview-grid .overview-actions { min-height: 130px; }
  .overview-grid .panel-body { padding-top: 9px; }
  .overview-cockpit .table-wrap { max-height: 135px; }

  .detail-layout, .money-layout, .risk-layout, .ops-layout, .audit-layout {
    gap: 9px;
  }
  .detail-cockpit .kpis { margin-bottom: 9px; }
  .detail-layout .panel-body { padding-top: 8px; }
  .detail-cockpit .table-wrap { max-height: 175px; }
  .detail-cockpit .brain-svg { min-height: 210px; max-height: 240px; }
  .research-source-empty { min-height: 110px; }
  .research-step { min-height: 72px; padding: 9px 6px; }
  .research-step .step-index { width: 20px; height: 20px; }
  .research-step strong { margin-top: 7px; font-size: 10px; }
  .research-step small { margin-top: 4px; font-size: 9px; }
  .factory-layout .panel { min-height: 0; }
  .factory-stage { min-height: 88px; padding: 11px 9px; }
  .factory-template { min-height: 78px; padding: 10px; }
  .factory-field { min-height: 56px; padding: 9px; }
  .factory-scatter { height: 170px; }
  .validation-empty-plot { height: 170px; padding: 14px; }
  .factory-sensitivity { max-height: 150px; }

  .money-cockpit .money-banner, .risk-cockpit .money-banner {
    gap: 8px; margin-bottom: 9px; padding: 6px 10px;
  }
  .money-cockpit .money-banner small, .risk-cockpit .money-banner small { font-size: 9px; }
  .money-curve-frame { min-height: 190px; }
  .money-attribution-empty { min-height: 155px; }
  .money-donut { width: 142px; height: 142px; }
  .money-donut-core { width: 96px; height: 96px; }
  .money-layout .table-wrap, .risk-layout .table-wrap { max-height: 170px; }
  .risk-gate-tile { padding: 10px; }
  .risk-flow-step { min-height: 76px; padding: 10px 8px; }
  .risk-quick button { min-height: 38px; }

  .live-mode-strip { gap: 8px; margin-bottom: 9px; padding: 7px 10px; }
  .live-mode-strip .live-badge, .live-mode-strip .paper-mode { padding: 5px 8px; font-size: 10px; }
  .live-cockpit .live-asset-watch { gap: 7px; }
  .live-watch-item { padding: 8px; }
  .live-watch-item .watch-price { margin-top: 6px; font-size: 16px; }
  .live-watch-item .watch-state { margin-top: 5px; }
  .live-chart-frame { min-height: 245px; }
  .live-chart-empty { min-height: 165px; padding: 12px; }
  .orderbook-shell { grid-template-rows: 22px repeat(4, 24px) 40px repeat(4, 24px); }
  .live-quick-actions { gap: 6px; }
  .live-quick-actions button { min-height: 38px; }

  .ops-graph-wrap { min-height: 265px; }
  .ops-time-plot { min-height: 140px; }
  .audit-table { max-height: 315px; }
  .audit-json { min-height: 130px; }
  .audit-chain-step { min-height: 72px; padding: 10px 6px; }

  /* Bound the desktop canvas to the viewport. CJK fallback fonts have taller
     normal line boxes: explicit leading keeps the KPI strip at 82px. Long
     records scroll inside each panel, with the heading always visible. */
  .main { line-height: 1.4; }
  .main > .overview-cockpit, .main > .detail-cockpit {
    height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 9px;
  }
  .main .kpis { flex: 0 0 82px; height: 82px; margin: 0; }
  .main .metric { min-height: 0; height: 82px; padding: 9px 11px; }
  .metric .label { line-height: 14px; }
  .metric .value { line-height: 26px; margin: 4px 0 2px; }
  .metric small { display: block; line-height: 13px; }
  .overview-grid, .detail-layout, .money-layout, .risk-layout,
  .ops-layout, .audit-layout {
    flex: 1 1 0; min-height: 0; grid-template-columns: repeat(24, minmax(0, 1fr));
  }
  .main .panel {
    min-height: 0; min-width: 0; display: flex; flex-direction: column;
    padding: 9px 10px; border-radius: 7px;
    border-color: #17618a;
    background: linear-gradient(135deg, #041d2d, #031522);
  }
  .main .panel-header { flex: 0 0 auto; gap: 7px; padding-bottom: 7px; }
  .main .panel-header h2 { line-height: 1.3; }
  .main .panel-header small { max-width: 45%; line-height: 1.35; padding: 2px 5px; }
  .main .panel-body {
    flex: 1 1 0; min-height: 0; min-width: 0; overflow: auto;
    padding-top: 8px; scrollbar-width: thin; scrollbar-color: #246184 #071a29;
  }
  .main .panel-body:has(> .empty:only-child) { display: grid; }
  .main .empty { min-height: 72px; gap: 5px; padding: 10px; align-content: center; }
  .main .empty .illustration { font-size: 22px; }
  .main .empty small { font-size: 10px; line-height: 1.5; }
  .main .message, .main .research-note, .main .factory-quiet-note,
  .main .money-proof, .main .ops-page-note, .main .ops-diagram-note {
    font-size: 10px; line-height: 1.5; padding: 7px 9px;
  }
  .main .paper-notice { font-size: 10px; line-height: 1.5; padding: 8px 10px; margin-bottom: 8px; }
  .main .factory-quiet-note { margin: 6px 0 0; }
  .main .overview-line { padding: 6px 8px; }
  .main .table-wrap { max-height: none; }
  .main .money-banner, .main .live-mode-strip {
    flex: 0 0 auto; min-height: 32px; margin: 0; padding: 5px 9px;
  }
  .main .money-pill { padding: 4px 7px; }

  /* 01 Overview: research / funnel / money, followed by matching columns. */
  .overview-grid { grid-template-rows: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, .72fr); }
  .overview-grid .hero-research { grid-area: 1 / 1 / 2 / 11; }
  .overview-grid .hero-funnel { grid-area: 1 / 11 / 2 / 17; }
  .overview-grid .hero-money { grid-area: 1 / 17 / 2 / 25; border-color: #6651a0; }
  .overview-grid .overview-agent { grid-area: 2 / 1 / 3 / 11; }
  .overview-grid .overview-feed { grid-area: 2 / 11 / 3 / 17; }
  .overview-grid .overview-holdings { grid-area: 2 / 17 / 3 / 25; }
  .overview-grid .overview-risk { grid-area: 3 / 1 / 4 / 6; }
  .overview-grid .overview-market { grid-area: 3 / 6 / 4 / 11; }
  .overview-grid .overview-events { grid-area: 3 / 11 / 4 / 17; }
  .overview-grid .overview-actions { grid-area: 3 / 17 / 4 / 25; }
  .hero-research .panel-body { display: flex; flex-direction: column; }
  .hero-research .panel-body > .empty, .hero-research .brain-svg { flex: 1; min-height: 120px; }
  .cockpit-panel-head { margin-bottom: 6px; }
  .cockpit-mini-flow { flex-shrink: 0; padding: 5px; font-size: 9px; }
  .cockpit-mini-flow .mini-stage { padding: 3px 4px; }
  .cockpit-funnel { gap: 7px; padding: 7px 2px; }
  .cockpit-funnel .funnel-row {
    height: 31px; flex-shrink: 0;
    clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
  }
  .cockpit-money-value { margin: 7px 0 3px; font-size: 25px; }
  .cockpit-money-divider { margin: 8px 0; }
  .cockpit-money-meta { gap: 7px; margin-bottom: 8px; }
  .cockpit-money-meta strong { margin-top: 2px; }
  .cockpit-money-plot { min-height: 62px; padding: 7px; font-size: 10px; }
  .hero-money .panel-body { display: flex; flex-direction: column; }
  .hero-money .cockpit-money-divider { flex-shrink: 0; }
  .hero-money .cockpit-money-plot { flex: 1 1 65px; min-height: 22px; padding: 4px; }
  .hero-money .cockpit-money-plot .paper-line-chart { height: 100%; min-height: 0; }
  .overview-risk .panel-body { display: grid; grid-template-columns: 84px 1fr; gap: 7px; }
  .cockpit-gauge { padding: 0; }
  .cockpit-gauge-ring { width: 70px; height: 70px; border-width: 6px; }
  .cockpit-gauge-ring strong { font-size: 10px; }
  .cockpit-gauge small { font-size: 9px; margin-top: 3px; }
  .overview-risk .overview-line { flex-wrap: wrap; gap: 3px; padding: 4px; }
  .overview-market .cockpit-tags { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
  .overview-market .tag { padding: 5px; font-size: 9px; }
  .overview-market .tag small { display: block; font-size: 9px; }
  .cockpit-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .cockpit-actions .cockpit-action { padding: 8px 5px; min-height: 30px; font-size: 10px; }
  .cockpit-actions .action-caption { grid-column: 1 / -1; font-size: 9px; }

  /* 02 Research: large graph, source feed and a vertical evidence pipeline. */
  .research-cockpit .detail-layout { grid-template-rows: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, .85fr); }
  .research-cockpit .detail-layout > .panel:nth-child(1) { grid-area: 1 / 1 / 2 / 13; }
  .research-cockpit .detail-layout > .panel:nth-child(2) { grid-area: 1 / 13 / 2 / 19; }
  .research-cockpit .detail-layout > .panel:nth-child(3) { grid-area: 1 / 19 / 2 / 25; }
  .research-cockpit .detail-layout > .panel:nth-child(4) { grid-area: 2 / 1 / 3 / 7; }
  .research-cockpit .detail-layout > .panel:nth-child(5) { grid-area: 2 / 7 / 3 / 13; }
  .research-cockpit .detail-layout > .panel:nth-child(6) { grid-area: 2 / 13 / 3 / 19; }
  .research-cockpit .detail-layout > .panel:nth-child(7) { grid-area: 2 / 19 / 3 / 25; }
  .research-cockpit .detail-layout > .panel:nth-child(8) { grid-area: 3 / 1 / 4 / 7; }
  .research-cockpit .detail-layout > .panel:nth-child(9) { grid-area: 3 / 7 / 4 / 19; }
  .research-cockpit .detail-layout > .panel:nth-child(10) { grid-area: 3 / 19 / 4 / 25; }
  .research-cockpit .brain-svg { min-height: 0; max-height: none; height: 100%; }
  .research-pipeline { grid-template-columns: 1fr; gap: 6px; }
  .research-step { min-height: 37px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 6px 9px; }
  .research-step strong, .research-step small { margin: 0; }
  .research-step:after { content: none; }

  /* 03 Alpha Factory: pipeline, three workbenches, registries and evidence. */
  .factory-cockpit .detail-layout { grid-template-rows: minmax(0, .95fr) minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr); }
  .factory-layout > .panel:nth-child(1) { grid-area: 1 / 1 / 2 / 25; }
  .factory-layout > .panel:nth-child(2) { grid-area: 2 / 1 / 3 / 9; }
  .factory-layout > .panel:nth-child(3) { grid-area: 2 / 9 / 3 / 17; }
  .factory-layout > .panel:nth-child(4) { grid-area: 2 / 17 / 3 / 25; }
  .factory-layout > .panel:nth-child(5) { grid-area: 3 / 1 / 4 / 9; }
  .factory-layout > .panel:nth-child(6) { grid-area: 4 / 1 / 5 / 7; }
  .factory-layout > .panel:nth-child(7) { grid-area: 3 / 9 / 4 / 17; }
  .factory-layout > .panel:nth-child(8) { grid-area: 3 / 17 / 4 / 25; }
  .factory-layout > .panel:nth-child(9) { grid-area: 4 / 7 / 5 / 13; }
  .factory-layout > .panel:nth-child(10) { grid-area: 4 / 13 / 5 / 19; }
  .factory-layout > .panel:nth-child(11) { grid-area: 4 / 19 / 5 / 25; }
  .factory-stage { min-height: 60px; padding: 7px 9px; }
  .factory-pipeline { padding: 0; }
  .factory-stage .icon { float: left; width: 25px; height: 25px; margin-right: 8px; }
  .factory-stage strong { margin-top: 2px; font-size: 11px; }
  .factory-stage small { margin-top: 7px; }
  .factory-stage:not(:last-child):after { top: 14px; }
  .factor-mini-card { min-height: 66px; padding: 7px; }
  .factor-mini-card .factor-symbol { width: 23px; height: 23px; float: left; margin-right: 6px; }
  .factor-mini-card b { margin-top: 1px; }
  .factor-mini-card small { margin-top: 6px; }
  .factory-template { min-height: 62px; padding: 7px; }
  .factory-template .template-icon { width: 22px; height: 22px; float: left; margin: 0 7px 0 0; }
  .factory-template b { margin-top: 0; font-size: 11px; }
  .factory-template span { margin-top: 5px; }
  .factory-field { min-height: 48px; padding: 7px; }
  .factory-scatter { height: 100%; min-height: 115px; }

  /* 04 Validation: evidence inventory / series / stress, then review results. */
  .validation-cockpit .detail-layout { grid-template-rows: minmax(0, 1.4fr) minmax(0, 1.25fr) minmax(0, 1fr) 70px; }
  .validation-layout > .panel:nth-child(1) { grid-area: 1 / 1 / 2 / 8; }
  .validation-layout > .panel:nth-child(2) { grid-area: 1 / 8 / 2 / 18; }
  .validation-layout > .panel:nth-child(3) { grid-area: 2 / 1 / 3 / 8; }
  .validation-layout > .panel:nth-child(4) { grid-area: 1 / 18 / 2 / 25; }
  .validation-layout > .panel:nth-child(5) { grid-area: 3 / 8 / 4 / 18; }
  .validation-layout > .panel:nth-child(6) { grid-area: 2 / 18 / 3 / 25; }
  .validation-layout > .panel:nth-child(7) { grid-area: 2 / 8 / 3 / 18; }
  .validation-layout > .panel:nth-child(8) { grid-area: 3 / 1 / 4 / 8; }
  .validation-layout > .panel:nth-child(9) { grid-area: 3 / 18 / 4 / 25; }
  .validation-layout > .panel:nth-child(10) { grid-area: 4 / 1 / 5 / 25; }
  .validation-layout > .panel:nth-child(10) { flex-direction: row; align-items: center; gap: 15px; }
  .validation-layout > .panel:nth-child(10) .panel-header { width: 250px; padding: 0; border: 0; }
  .validation-layout > .panel:nth-child(10) .panel-body { flex: 1; padding: 0; }
  .validation-layout > .panel:nth-child(10) .factory-quiet-note { margin: 0; }
  .validation-empty-plot { height: calc(100% - 28px); min-height: 90px; padding: 10px; }
  .validation-stress { padding: 7px 9px; }
  .validation-stress-list { gap: 6px; }
  .validation-gate { gap: 6px; }
  .validation-gate-item { padding: 7px; }
  .validation-gate-item strong { font-size: 11px; }
  .validation-gate-item span { margin-top: 4px; }
  .validation-gate-lock { margin-top: 6px; padding: 7px; }
  .validation-layout .factory-sensitivity { height: 125px; grid-auto-rows: minmax(0, 1fr); padding: 0; }
  .validation-layout .factory-sensitivity .blank { height: auto; min-height: 0; }

  /* 05 Portfolio: the reference has three rows of three cards.
     The read-only order journal remains available in Account Proof details. */
  .money-cockpit .money-layout { grid-template-rows: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr); }
  .money-cockpit .money-layout > .panel:nth-child(1) { grid-area: 1 / 1 / 2 / 11; }
  .money-cockpit .money-layout > .panel:nth-child(2) { grid-area: 1 / 11 / 2 / 18; }
  .money-cockpit .money-layout > .panel:nth-child(3) { grid-area: 1 / 18 / 2 / 25; }
  .money-cockpit .money-layout > .panel:nth-child(4) { grid-area: 2 / 1 / 3 / 9; }
  .money-cockpit .money-layout > .panel:nth-child(5) { grid-area: 2 / 9 / 3 / 17; }
  .money-cockpit .money-layout > .panel:nth-child(6) { grid-area: 2 / 17 / 3 / 25; }
  .money-cockpit .money-layout > .panel:nth-child(7) { grid-area: 3 / 1 / 4 / 11; }
  .money-cockpit .money-layout > .panel:nth-child(8) { grid-area: 3 / 11 / 4 / 19; }
  .money-cockpit .money-layout > .panel:nth-child(9) { grid-area: 3 / 19 / 4 / 25; }
  .money-curve-frame { min-height: 0; height: 148px; }
  .money-waterfall-svg { height: 80px; margin: 0; }
  .strategy-weight-chart { height: 80px; margin: 0; }
  .money-cockpit .money-tabs { margin-bottom: 6px; gap: 4px; }
  .money-cockpit .money-tab { padding: 5px 9px; }
  .money-cockpit .money-details { margin-top: 3px; }
  .money-cockpit .money-alloc { grid-template-columns: 142px minmax(0,1fr); gap: 12px; }
  .money-cockpit .money-banner { flex: 0 0 auto; }
  .money-cockpit .money-banner small { margin-top: 1px; }
  .quality-panel .live-status-tiles { gap: 5px; }
  .quality-panel .live-status-tile { min-height: 0; padding: 6px; }
  .quality-panel .live-status-tile strong { font-size: 12px; margin-top: 5px; }
  .quality-panel .quality-chart-frame { height: 100px!important; }
  .money-attribution-empty { min-height: 80px; height: 100%; }
  .money-rebalance-item { padding: 7px; }
  .money-rebalance-item small { margin-top: 3px; }

  /* 06 Risk: preserve the three monitor rows and the disabled control bank. */
  .risk-cockpit .risk-layout { grid-template-rows: minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 1fr); }
  .risk-cockpit .risk-layout > .panel:nth-child(1) { grid-area: 1 / 1 / 2 / 11; }
  .risk-cockpit .risk-layout > .panel:nth-child(2) { grid-area: 1 / 11 / 2 / 18; }
  .risk-cockpit .risk-layout > .panel:nth-child(3) { grid-area: 1 / 18 / 2 / 25; }
  .risk-cockpit .risk-layout > .panel:nth-child(4) { grid-area: 2 / 1 / 3 / 9; }
  .risk-cockpit .risk-layout > .panel:nth-child(5) { grid-area: 2 / 9 / 3 / 19; }
  .risk-cockpit .risk-layout > .panel:nth-child(6) { grid-area: 2 / 19 / 3 / 25; }
  .risk-cockpit .risk-layout > .panel:nth-child(7) { grid-area: 3 / 1 / 4 / 10; }
  .risk-cockpit .risk-layout > .panel:nth-child(8) { grid-area: 3 / 10 / 4 / 18; }
  .risk-cockpit .risk-layout > .panel:nth-child(9) { grid-area: 3 / 18 / 4 / 25; }
  .risk-gate-grid { gap: 7px; }
  .risk-gate-tile { padding: 7px; }
  .risk-gate-tile strong { margin-top: 5px; font-size: 14px; }
  .risk-gateway-tile { padding: 8px; }
  .risk-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .risk-quick button { padding: 7px 4px; font-size: 10px; }

  /* 07 Live: watch/risk/account strip, positions beside chart and book,
     then orders, signal path and logs. No order controls are enabled. */
  .live-cockpit .detail-layout { grid-template-rows: minmax(0, 1.2fr) minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr); }
  .live-cockpit .detail-layout > .panel:nth-child(1) { grid-area: 1 / 1 / 2 / 10; }
  .live-cockpit .detail-layout > .panel:nth-child(2) { grid-area: 2 / 10 / 3 / 20; }
  .live-cockpit .detail-layout > .panel:nth-child(3) { grid-area: 2 / 20 / 3 / 25; }
  .live-cockpit .detail-layout > .panel:nth-child(4) { grid-area: 1 / 10 / 2 / 18; }
  .live-cockpit .detail-layout > .panel:nth-child(5) { grid-area: 1 / 18 / 2 / 25; }
  .live-cockpit .detail-layout > .panel:nth-child(6) { grid-area: 3 / 10 / 4 / 17; }
  .live-cockpit .detail-layout > .panel:nth-child(7) { grid-area: 2 / 1 / 3 / 10; }
  .live-cockpit .detail-layout > .panel:nth-child(8) { grid-area: 3 / 1 / 5 / 10; }
  .live-cockpit .detail-layout > .panel:nth-child(9) { grid-area: 3 / 17 / 4 / 25; }
  .live-cockpit .detail-layout > .panel:nth-child(10) { grid-area: 4 / 10 / 5 / 18; }
  .live-cockpit .detail-layout > .panel:nth-child(11) { grid-area: 4 / 18 / 5 / 25; }
  .live-watch-item { padding: 6px; }
  .live-watch-item strong { font-size: 10px; }
  .live-watch-item .watch-price { margin-top: 4px; }
  .live-watch-item .watch-state { font-size: 9px; }
  .live-status-tile { padding: 7px; }
  .live-chart-frame { height: 100%; min-height: 0; display: flex; flex-direction: column; }
  .live-chart-head { flex-shrink: 0; padding: 8px; flex-wrap: wrap; }
  .live-chart-empty { flex: 1; min-height: 0; padding: 8px; }
  .live-chart-empty .center { padding: 12px; }
  .orderbook-shell { grid-template-rows: 18px repeat(4, 15px) 27px repeat(4, 15px); }
  .live-steps { gap: 5px; }
  .live-step { min-height: 55px; padding: 5px; }
  .live-step .num { width: 18px; height: 18px; font-size: 10px; }
  .live-step strong { font-size: 10px; margin-top: 4px; }
  .live-step small { margin-top: 3px; font-size: 9px; }
  .live-quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .live-quick-actions button { min-height: 30px; padding: 5px; font-size: 10px; }

  /* 08 Agents: topology spans two rows, with queue and telemetry alongside. */
  .ops-cockpit .ops-layout { grid-template-rows: minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, .9fr); }
  .ops-cockpit .ops-layout > .panel:nth-child(1) { grid-area: 1 / 1 / 3 / 11; }
  .ops-cockpit .ops-layout > .panel:nth-child(2) { grid-area: 1 / 11 / 2 / 18; }
  .ops-cockpit .ops-layout > .panel:nth-child(3) { grid-area: 1 / 18 / 2 / 25; }
  .ops-cockpit .ops-layout > .panel:nth-child(4) { grid-area: 2 / 11 / 3 / 18; }
  .ops-cockpit .ops-layout > .panel:nth-child(5) { grid-area: 2 / 18 / 3 / 25; }
  .ops-cockpit .ops-layout > .panel:nth-child(6) { grid-area: 3 / 18 / 4 / 25; }
  .ops-cockpit .ops-layout > .panel:nth-child(7) { grid-area: 3 / 1 / 4 / 11; }
  .ops-cockpit .ops-layout > .panel:nth-child(8) { grid-area: 3 / 11 / 4 / 18; }
  .ops-cockpit .ops-layout > .panel:nth-child(9) { grid-area: 4 / 1 / 5 / 11; }
  .ops-cockpit .ops-layout > .panel:nth-child(10) { grid-area: 4 / 11 / 5 / 18; }
  .ops-cockpit .ops-layout > .panel:nth-child(11) { grid-area: 4 / 18 / 5 / 25; }
  .ops-graph-wrap { min-height: 0; height: calc(100% - 49px); }
  .ops-graph-svg { height: 100%; max-height: none; }
  .ops-time-plot { min-height: 75px; padding: 10px; }
  .ops-snapshot-line { padding: 5px 8px; margin: 5px 0; }
  .ops-command { padding: 8px; }
  .ops-command small { margin-top: 5px; }
  .ops-command button { margin-top: 6px; padding: 5px 8px; }
  .ops-boundary-grid { gap: 6px; }
  .ops-boundary-tile { padding: 7px; }
  .ops-boundary-tile small { margin-top: 4px; }
  .ops-cockpit .ops-layout > .panel:nth-child(9) .ops-boundary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* 09 Audit: long event stream on the left, chain and evidence on the right. */
  .audit-cockpit .audit-layout { grid-template-rows: minmax(0, 1.3fr) minmax(0, 1.35fr) minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, .8fr); }
  .audit-cockpit .audit-layout > .panel:nth-child(1) { grid-area: 1 / 1 / 2 / 11; }
  .audit-cockpit .audit-layout > .panel:nth-child(2) { grid-area: 1 / 11 / 2 / 25; }
  .audit-cockpit .audit-layout > .panel:nth-child(3) { grid-area: 2 / 1 / 5 / 11; }
  .audit-cockpit .audit-layout > .panel:nth-child(4) { grid-area: 2 / 11 / 3 / 18; }
  .audit-cockpit .audit-layout > .panel:nth-child(5) { grid-area: 2 / 18 / 4 / 25; }
  .audit-cockpit .audit-layout > .panel:nth-child(6) { grid-area: 3 / 11 / 4 / 18; }
  .audit-cockpit .audit-layout > .panel:nth-child(7) { grid-area: 4 / 18 / 5 / 25; }
  .audit-cockpit .audit-layout > .panel:nth-child(8) { grid-area: 4 / 11 / 5 / 18; }
  .audit-cockpit .audit-layout > .panel:nth-child(9) { grid-area: 5 / 1 / 6 / 11; }
  .audit-cockpit .audit-layout > .panel:nth-child(10) { grid-area: 5 / 11 / 6 / 25; }
  .audit-filter-block { padding: 7px; }
  .audit-search { padding: 7px; margin-bottom: 6px; }
  .audit-filter-row label { margin-bottom: 3px; }
  .audit-filter-row select, .audit-filter-row button { padding: 6px; }
  .audit-filter-note { margin-top: 5px; }
  .audit-chain { margin: 0 0 5px; }
  .audit-chain-step { min-height: 61px; padding: 5px; }
  .audit-chain-step strong, .audit-chain-step small { margin-top: 4px; }
  .audit-integrity { grid-template-columns: 103px 1fr; gap: 9px; }
  .audit-integrity-ring { width: 96px; height: 96px; border-width: 9px; }
  .audit-integrity-ring strong { font-size: 12px; }
  .audit-integrity .audit-check { padding: 3px 4px; font-size: 9px; line-height: 13px; }
  .audit-check-list { gap: 0; }
  .audit-table { max-height: none; }
  .audit-unknown-row { padding: 6px; margin: 4px 0; }
  .audit-disabled-actions { gap: 5px; }
  .audit-disabled-actions button { font-size: 9px; padding: 5px; }
}

@media (min-width: 1200px) and (min-height: 760px) and (max-height: 900px) {
  .money-cockpit .money-curve-frame { height: 122px; }
  .money-cockpit .money-waterfall-svg, .money-cockpit .strategy-weight-chart { height: 64px; }
  .quality-panel .live-status-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quality-panel .live-status-tile { padding: 5px; }
  .quality-panel .live-status-tile strong { font-size: 10px; }
  .quality-panel .quality-chart-frame { height: 77px!important; }
}
