/*
  Page-specific content clarity layer.
  The shared Workbench stylesheet remains unchanged.
*/

.lab-model {
  margin-left: auto;
}

/* The address lesson begins with a visible memory value before any read occurs. */
.guided-scene[data-scene="read"] {
  grid-template-rows: auto auto auto auto;
  align-content: center;
  gap: 13px;
}

.read-starting-memory {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(360px, 1.35fr) minmax(230px, .9fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 70px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--lab-authority-accent) 68%, var(--wb-line));
  border-left: 5px solid var(--lab-authority-accent);
  background: color-mix(in srgb, var(--lab-authority-accent) 7%, var(--lab-card-surface));
  box-shadow: 0 7px 18px rgba(0,0,0,.13);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.read-starting-memory > div:first-child {
  display: grid;
  gap: 3px;
}
.read-starting-memory > div:first-child span {
  color: var(--lab-authority-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.read-starting-memory > div:first-child strong {
  color: var(--wb-text);
  font-size: 15px;
  line-height: 1.25;
}
.read-starting-memory small {
  color: var(--wb-muted);
  font-size: 11.5px;
  line-height: 1.35;
}
.read-starting-memory small code {
  color: var(--lab-authority-accent);
  font-size: 11px;
}
.read-starting-path {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--lab-authority-accent) 32%, var(--wb-line));
  background: var(--wb-input);
  white-space: nowrap;
}
.read-starting-path code {
  min-width: 0;
  color: var(--wb-text);
  font: 700 12px/1.2 var(--wb-mono);
}
.read-starting-path i {
  color: var(--wb-muted);
  font-style: normal;
}
.read-starting-path b {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 32px;
  margin-left: 3px;
  border: 1px solid var(--lab-authority-accent);
  background: color-mix(in srgb, var(--lab-authority-accent) 14%, var(--wb-input));
  color: var(--lab-authority-accent);
  font: 800 19px/1 var(--wb-mono);
}
.read-starting-memory.is-focus {
  border-color: var(--lab-link) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--lab-link) 34%, transparent), 0 8px 22px rgba(0,0,0,.18) !important;
  transform: translateY(-1px);
}

/* Context text explains when the displayed source runs rather than discussing the page itself. */
.scope-note > span:first-child {
  color: var(--lab-script-accent);
}

@media (max-width: 1380px) {
  .read-starting-memory {
    grid-template-columns: minmax(180px, .8fr) minmax(330px, 1.35fr);
  }
  .read-starting-memory small {
    grid-column: 1 / -1;
  }
}

/* Keep the complete lesson visible on shorter desktop browser viewports. */
@media (max-height: 860px) and (min-width: 1051px) {
  .guided-shell { grid-template-rows: minmax(0,1fr) 226px; }
  .guided-stage { grid-template-rows: 32px auto minmax(0,1fr); }
  .guided-code { grid-template-rows: 32px auto minmax(0,1fr) auto; }
  .pane-role-bar { min-height: 32px; padding: 5px 11px; }
  .pane-role-bar strong { font-size: 11.5px; }
  .guided-stage-head { min-height: 88px; padding: 10px 15px 9px; }
  .guided-stage-head h1 { margin-top: 3px; font-size: 25px; }
  .guided-stage-head p { margin-top: 5px; font-size: 12.5px; line-height: 1.35; }
  .guided-code-head { min-height: 68px; padding: 8px 12px; }
  .guided-code-head strong { font-size: 14px; }
  .guided-scene-wrap { padding: 9px 14px; }
  .guided-scene { inset: 9px 14px; }
  .guided-stepbar {
    grid-template-rows: minmax(0,1fr) 58px;
    gap: 8px 10px;
    padding: 8px 10px;
  }
  .step-explanation,
  .step-trace-panel,
  .step-controls { padding: 9px 11px; }
  .step-explanation h2 { font-size: 18px; }
  .step-explanation p { font-size: 12.5px; line-height: 1.4; }

  .guided-scene[data-scene="read"] { gap: 9px; }
  .read-starting-memory { min-height: 58px; padding: 8px 10px; }
  .read-starting-memory > div:first-child strong { font-size: 13.5px; }
  .read-starting-memory small { font-size: 10.5px; }
  .mini-data-card { min-height: 56px; padding: 8px 10px; }
  .address-node { min-height: 78px; padding: 8px; }
  .read-output { min-height: 50px; padding: 8px 11px; }
}
