/* Split-pane source panel — loaded by both the creator review screen and the
   taker's paper, so the two views cannot drift apart visually. */
/* ---------- split-pane source panel (review + taker) ---------- */
/* Two panes, each scrolling on its own: the reader compares rather than
   remembers. Collapses to one column on narrow screens, where a side-by-side
   would make both halves unreadable. */
.review-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 1rem; align-items: start; }
/* Folded away by default now ("Show original code"), so the cards take the width. */
.review-split.is-collapsed { grid-template-columns: minmax(0, 1fr); }
.review-split.is-collapsed .code-panel { display: none; }
.review-split.is-collapsed #questions { grid-column: 1; }
@media (max-width: 1100px) {
  .review-split,
  .review-split.is-collapsed { grid-template-columns: minmax(0, 1fr); }
}

.code-panel { position: sticky; top: 1rem; max-height: calc(100vh - 3rem);
  display: flex; flex-direction: column; border: 1px solid var(--line, #d8d8d8);
  border-radius: 10px; background: var(--surface, #fff); overflow: hidden; }
.code-panel-head { display: flex; gap: .5rem; align-items: center;
  padding: .5rem; border-bottom: 1px solid var(--line, #d8d8d8); }
.code-panel-head .fig-select { flex: 1; min-width: 0; }
.code-panel-hint { margin: 0; padding: .4rem .6rem; border-bottom: 1px solid var(--line, #eee);
  color: var(--muted, #666); }
.code-panel-body { flex: 1; overflow: auto; font-size: .82rem; }
.code-panel-show { margin-top: .6rem; }

.code-unit-head { position: sticky; top: 0; z-index: 1; padding: .25rem .6rem;
  background: var(--surface-2, #f3f3f3); color: var(--muted, #666);
  font-size: .75rem; letter-spacing: .02em; border-bottom: 1px solid var(--line, #e6e6e6); }
.code-lines { list-style: none; margin: 0; padding: 0; }
.code-line { display: flex; gap: .6rem; padding: 0 .6rem; white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-line code { background: none; padding: 0; font: inherit; }
.code-ln { flex: 0 0 3ch; text-align: right; color: var(--muted, #999);
  user-select: none; }

/* The two classes that keep the panel honest. `is-certified` is the band the
   evidence proves; `is-mention` is merely the same text somewhere else, and
   must never look like proof. */
.code-line.is-certified { background: transparent; box-shadow: inset 3px 0 #839eb3; }
.code-line.is-active { outline: 2px solid #839eb3; outline-offset: -2px; }
.code-line.is-active.is-mention { outline-color: rgba(150, 150, 150, .85);
  background: rgba(150, 150, 150, .14); }

.code-jump { font: inherit; color: inherit; background: rgba(56, 142, 60, .12);
  border: 0; border-bottom: 1px dotted currentColor; border-radius: 3px;
  padding: 0 .15em; cursor: pointer; }
.code-jump:hover, .code-jump:focus { background: rgba(56, 142, 60, .26); }

@media (prefers-color-scheme: dark) {
  .code-line.is-certified { background: transparent; box-shadow: inset 3px 0 #6f93ab; }
  .code-line.is-active.is-mention { background: rgba(180, 180, 180, .18); }
  .code-jump { background: rgba(129, 199, 132, .18); }
  .code-jump:hover, .code-jump:focus { background: rgba(129, 199, 132, .32); }
}

/* assess.html does not load the design system, so the few utility classes the
   panel relies on are restated here rather than assumed. */
.code-panel .hidden, .code-panel-show.hidden { display: none; }
