.lab-page { max-width: 1440px; }
.lab-page > *, .lab-steps, .lab-deliverables { margin-bottom: var(--s-5); }
.lab-panel { padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-1); min-width: 0; }
.lab-panel > * + *, .lab-step-content > * + *, .lab-sim-host > * + * { margin-top: var(--s-3); }
.lab-panel h2, .lab-steps > h2, .lab-deliverables > h2 { font-size: var(--fs-3); }
.lab-panel h3 { font-size: var(--fs-2); }
.lab-muted, .lab-status, .lab-note { color: var(--fg-1); }
.lab-checks { padding: 0; list-style: none; }
.lab-check { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.lab-check > * + * { margin-top: var(--s-2); }
.lab-check-title, .lab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.lab-check-title { justify-content: space-between; }
.lab-check textarea, .lab-field textarea, .lab-field select { display: block; width: 100%; max-width: 80ch; }
.lab-field { display: grid; gap: var(--s-2); margin-block: var(--s-3); }
.lab-field > span { font-weight: 600; }
.lab-tick { display: inline-flex; gap: var(--s-2); align-items: center; }
.lab-caution { border-left: 3px solid var(--warn); padding: var(--s-3); background: var(--bg-2); }
.lab-caution button { margin-top: var(--s-3); }
.lab-step details, .lab-check details { padding-block: var(--s-2); }
.lab-step summary, .lab-check summary { cursor: pointer; font-weight: 600; }
.lab-page .item-md { max-width: var(--measure); }
.lab-page .item-md pre, .lab-page .item-md table { max-width: 100%; overflow-x: auto; }
.lab-sim-host { min-width: 0; }
.lab-sim-host:empty { display: none; }
.deliverable-fields { min-width: 0; border: 0; padding: 0; }
.register-edit-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s-4); }
.register-edit-rows fieldset { padding: var(--s-3); border: 1px solid var(--line); min-width: 0; }
.lab-status:empty { display: none; }

.lab-workspace { min-width: 0; }
.lab-workspace > * { min-width: 0; }
.lab-reference { margin-bottom: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-1); }
.lab-reference > summary { padding: var(--s-4); cursor: pointer; font-size: var(--fs-2); font-weight: 600; }
.lab-reference-content { padding: var(--s-4); min-width: 0; }
.lab-reference .reading-layout { grid-template-columns: minmax(0, 1fr); }
.lab-reference .brief-outline { position: static; grid-row: 1; max-height: 260px; }
.lab-reference .prose { padding: var(--s-5); }
.lab-page { overflow-wrap: anywhere; }
.lab-page textarea { resize: vertical; min-height: 6em; }
.lab-step-content:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.lab-page .item-md { line-height: var(--lh-read); }
.lab-page .item-md pre { white-space: pre; padding: var(--s-4); background: var(--bg-0); border: 1px solid var(--line); border-radius: var(--r-2); }
.lab-page .item-md pre code { white-space: pre; }
.lab-page .item-md table { display: block; border-collapse: collapse; }
.lab-page .item-md :is(td, th) { border: 1px solid var(--line-strong); padding: var(--s-3); text-align: left; vertical-align: top; }
@media (min-width: 3440px) {
  .lab-page { max-width: none; }
  .lab-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
  .lab-reference { position: sticky; top: var(--s-4); }
  .lab-reference-content { max-height: calc(100vh - 220px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
}
