/* Part 21 — walk on the left, figure fills the rest of the window. */

body.cl-page {
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.cl-page .ai-header,
body.cl-page .mt-series-mount,
body.cl-page .topo-cluster,
body.cl-page .ai-site-footer { flex-shrink: 0; }

body.cl-page .ai-site-footer {
    margin-top: 0;
    padding: 4px 12px 6px;
}

body.cl-page .control-loops-series-nav--bottom { display: none; }

body.cl-page .topo-cluster {
    max-width: none;
    margin: 0;
    padding: 4px 16px 0;
    justify-content: flex-start;
}

body.cl-page .cl-workspace {
    flex: 1 1 auto;
    min-height: 0;
    max-width: none;
    overflow: hidden;
    align-items: stretch;
}

body.cl-page .cl-walk { max-height: 100%; }

body.cl-page .cl-lab {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.hold-panel {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--ai-gray-200);
    border-radius: var(--ai-radius-lg);
    box-shadow: var(--ai-shadow-sm);
    padding: 8px 10px;
}

.hold-panel .im-panel-head { margin: 0; flex-shrink: 0; }
.hold-panel .im-panel-head h2 { font-size: 0.98rem; margin: 0; }
.hold-panel .im-panel-sub { font-size: 0.74rem; margin: 0; }

.hold-panel .topo-knobs,
.hold-panel .topo-opts,
.hold-panel .topo-transport,
.hold-panel .topo-row,
.hold-panel .topo-mode-btns,
.hold-panel .topo-warn,
.hold-panel .im-readouts,
.hold-panel .im-eq-note,
.hold-panel .xf-calc { flex-shrink: 0; }

@media (min-width: 1101px) {
    /* The figure fills this screen. The same-core solver sits under it and the lab scrolls to it. */
    body.cl-page .cl-lab > .hold-panel {
        flex: 0 0 auto;
        height: 100%;
        max-height: 100%;
        overflow: hidden;
    }
    body.cl-page .cl-lab > .xf-calc {
        flex: 0 0 auto;
        margin-top: 8px;
    }
}

.hold-panel .im-canvas-wrap {
    flex: 1 1 auto;
    min-height: 180px;
    max-width: none;
    margin: 0;
    overflow: auto;
}

.hold-panel .im-canvas-wrap canvas {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 900px;
    height: 400px;
}

@media (max-width: 1100px) {
    body.cl-page { height: auto; max-height: none; overflow: auto; }
    body.cl-page .cl-workspace { overflow: visible; height: auto; }
    .hold-panel .im-canvas-wrap { min-height: 400px; height: 400px; overflow: auto; }
}
