/**
 * layout.css: page grids. index.html is a single reading column; viewer.html uses layout C
 * (stage and controls on the left, narration/code/input/about on the right).
 */
.toc {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem;
}

.viewer {
  display: grid;
  grid-template-columns: minmax(0, 64fr) minmax(0, 36fr);
  gap: 1rem;
  max-width: 90rem;
  margin: 0 auto;
  padding: 1rem;
}

.stage-col,
.side-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

@media (max-width: 900px) {
  .viewer {
    grid-template-columns: minmax(0, 1fr);
  }
  /* About five lines of narration on narrow screens. */
  .log {
    max-height: 9.5em;
  }
  .viewer.show-code #log-panel {
    display: none;
  }
}

@media (min-width: 901px) {
  .viewer.show-code .log,
  .viewer.show-code .code {
    max-height: 30vh;
  }
}
