/* Page-specific clarity and pane separation. The shared Workbench CSS is untouched. */

.workbench {
  --lab-visual-accent: var(--wb-info);
  --lab-script-accent: var(--wb-accent);
  --lab-pane-gap: 10px;
}

/* Make the two halves read as different surfaces rather than one undifferentiated tool. */
.guided-main {
  grid-template-columns: minmax(0, 58%) minmax(560px, 42%);
  gap: var(--lab-pane-gap);
  padding: var(--lab-pane-gap);
  background: var(--wb-bg);
}
.guided-stage,
.guided-code {
  border: 1px solid var(--wb-line-2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}
.guided-stage {
  grid-template-rows: auto auto minmax(0, 1fr);
  border-top: 3px solid var(--lab-visual-accent);
  background: color-mix(in srgb, var(--wb-panel) 94%, var(--lab-visual-accent));
}
.guided-code {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-top: 3px solid var(--lab-script-accent);
  background: color-mix(in srgb, var(--lab-code-bg) 96%, #000);
}
.pane-role-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 31px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--wb-line);
  text-transform: uppercase;
  letter-spacing: .075em;
}
.pane-role-bar strong { font-size: 11px; }
.pane-role-bar span { color: var(--wb-muted); font-size: 10px; text-transform: none; letter-spacing: 0; }
.pane-role-visual {
  background: color-mix(in srgb, var(--lab-visual-accent) 9%, var(--wb-panel-2));
  color: var(--lab-visual-accent);
}
.pane-role-script {
  background: color-mix(in srgb, var(--lab-script-accent) 9%, var(--wb-panel-2));
  color: var(--lab-script-accent);
}

.guided-stage-head { padding: 13px 16px 11px; }
.guided-stage-head h1 { font-size: clamp(22px, 1.55vw, 30px); }
.guided-stage-head p {
  max-width: 860px;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.45;
}
.guided-code-head {
  min-height: 76px;
  align-items: flex-start;
  padding: 9px 11px;
}
.guided-code-head strong { font-size: 13px; }
.guided-code-head p {
  max-width: 620px;
  margin: 4px 0 0;
  color: var(--wb-muted);
  font-size: 10.5px;
  line-height: 1.35;
}
.code-key { margin-top: 4px; }

/* Section labels sit outside the code and explain what has been intentionally omitted. */
.code-section-title {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  margin: 10px 12px 5px;
  font-size: 9.5px;
}
.code-section-title span { color: var(--wb-text); }
.code-section-title em {
  min-width: 0;
  color: var(--wb-muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
}
.code-section-context {
  margin: -2px 12px 6px;
  color: var(--wb-muted);
  font-size: 9.5px;
  line-height: 1.35;
}

/* Larger visual-side copy. */
.card-label { font-size: 10px; }
.entity-card h3,
.procedure-card h3,
.health-card h3 { font-size: 17px; }
.entity-card code { font-size: 10.5px; }
.value-row span { font-size: 12px; }
.value-row strong { font-size: 25px; }
.mini-data-card span { font-size: 10.5px; }
.mini-data-card strong { font-size: 15px; }
.address-node small { font-size: 9.5px; }
.address-node strong { font-size: 12.5px; }
.address-node em { font-size: 10.5px; line-height: 1.25; }
.read-output span { font-size: 12.5px; line-height: 1.4; }
.call-stack-row,
.shared-config { font-size: 11px; }
.gate-card { font-size: 11.5px; line-height: 1.35; }
.procedure-card p { font-size: 11.75px; line-height: 1.45; }
.property-list > div { font-size: 11.5px; }
.health-readout { font-size: 11px; }
.desync-lane header strong { font-size: 12.5px; }
.authority-box span { font-size: 10px; }
.reader-stack span { color: var(--wb-muted); font-size: 10.5px; }
.reader-stack span b { display: block; color: var(--wb-text); font-size: 10.75px; }
.reader-stack span small { display: block; margin-top: 2px; color: var(--wb-muted); font-size: 9px; }
.reader-stack strong { font-size: 18px; }
.desync-lane > p { font-size: 10.75px; line-height: 1.4; }

/* Keep every trace node visible at once. */
.guided-shell { grid-template-rows: minmax(0, 1fr) 232px; }
.guided-stepbar {
  grid-template-columns: minmax(320px, 35%) minmax(0, 44%) minmax(230px, 21%);
  gap: 10px;
  padding: 10px 12px;
  overflow: visible;
}
.step-explanation,
.step-trace-panel,
.step-controls { padding: 11px; overflow: visible; }
.step-explanation h2 { font-size: 17px; line-height: 1.2; }
.step-explanation p { font-size: 13px; line-height: 1.5; }
.step-trace-panel { grid-template-rows: auto minmax(0, 1fr); }
.step-trace-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.step-trace-panel header strong { font-size: 10.5px; }
.step-trace-panel header span {
  max-width: 100%;
  font-size: 11px;
  line-height: 1.3;
  text-align: left;
}
.step-trace {
  grid-template-columns: repeat(var(--trace-cols, 3), minmax(0, 1fr));
  grid-auto-rows: minmax(62px, auto);
  align-content: stretch;
  overflow: visible;
}
.trace-node { padding: 8px; gap: 8px; }
.trace-index { width: 23px; height: 23px; font-size: 10px; }
.trace-node strong { font-size: 11.5px; line-height: 1.25; }
.trace-node small { font-size: 10px; line-height: 1.3; }
.step-count > span,
.step-controls .wb-micro { font-size: 10.5px; }
.step-buttons button { font-size: 12px; }

/* Hands-on mode uses three clearly distinct panes. */
.sandbox-panel {
  grid-template-columns: 270px minmax(450px, 1fr) minmax(520px, 38%);
  gap: 10px;
  padding: 10px;
}
.sandbox-controls,
.sandbox-visual,
.sandbox-code {
  border: 1px solid var(--wb-line-2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .13);
}
.sandbox-controls { border-top: 3px solid var(--wb-muted); }
.sandbox-visual {
  position: relative;
  border-top: 3px solid var(--lab-visual-accent);
  background: color-mix(in srgb, var(--wb-panel) 94%, var(--lab-visual-accent));
}
.sandbox-code {
  border-top: 3px solid var(--lab-script-accent);
  background: color-mix(in srgb, var(--lab-code-bg) 96%, #000);
}
.pane-mini-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-bottom: 5px;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--lab-visual-accent) 55%, var(--wb-line));
  background: color-mix(in srgb, var(--lab-visual-accent) 8%, var(--wb-panel));
  color: var(--lab-visual-accent);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pane-mini-script {
  border-color: color-mix(in srgb, var(--lab-script-accent) 55%, var(--wb-line));
  background: color-mix(in srgb, var(--lab-script-accent) 8%, var(--wb-panel));
  color: var(--lab-script-accent);
}
.sandbox-controls header h2,
.sandbox-visual header h2,
.sandbox-code header h2 { font-size: 17px; line-height: 1.25; }
.sandbox-controls header p,
.sandbox-code header p {
  margin: 6px 0 0;
  color: var(--wb-muted);
  font-size: 11.75px;
  line-height: 1.45;
}
.sandbox-controls .wb-field label,
.share-toggle,
.sandbox-message { font-size: 11.5px; line-height: 1.4; }
.sandbox-visual > header { padding-bottom: 9px; }
.sandbox-code > header { padding: 10px 11px; }
.code-block { font-size: 11px; line-height: 1.58; }

/* The properties demonstration uses a visible process between inventory/catalog and health. */
.sandbox-properties-grid {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr) minmax(130px, .72fr);
}
.sandbox-use-process { align-self: stretch; min-height: 120px; }
.sandbox-properties-grid > .health-card { grid-column: auto; width: auto; justify-self: stretch; align-self: stretch; }

@media (max-width: 1450px) {
  .guided-main { grid-template-columns: minmax(0, 55%) minmax(520px, 45%); }
  .sandbox-panel { grid-template-columns: 245px minmax(410px, 1fr) minmax(465px, 39%); }
  .guided-shell { grid-template-rows: minmax(0, 1fr) 238px; }
}

@media (max-width: 1180px) {
  .pane-role-bar span { display: none; }
  .guided-stepbar { grid-template-columns: 1fr 1.2fr 220px; }
  .sandbox-panel { grid-template-columns: 230px minmax(360px, 1fr) minmax(410px, 40%); }
}

/* Final readability pass for a 1920 × 1080-class desktop viewport. */
.pane-role-bar {
  min-height: 35px;
  padding: 7px 12px;
}
.pane-role-bar strong { font-size: 12.25px; }
.pane-role-bar span { font-size: 11px; }

.guided-main {
  gap: 14px;
  padding: 12px;
}
.guided-stage {
  background: color-mix(in srgb, var(--wb-panel) 90%, var(--lab-visual-accent));
}
.guided-code {
  border-left: 1px solid color-mix(in srgb, var(--lab-script-accent) 48%, var(--wb-line-2));
  background: color-mix(in srgb, var(--lab-code-bg) 98%, #000);
}
.guided-stage-head { padding: 15px 18px 13px; }
.guided-stage-head h1 { font-size: clamp(24px, 1.7vw, 32px); }
.guided-stage-head p {
  font-size: 14px;
  line-height: 1.52;
}
.guided-code-head {
  min-height: 82px;
  padding: 10px 13px;
}
.guided-code-head strong { font-size: 14px; }
.guided-code-head p {
  font-size: 11.25px;
  line-height: 1.42;
}

.card-label { font-size: 11px; }
.entity-card h3,
.procedure-card h3,
.health-card h3 { font-size: 18px; }
.entity-card code { font-size: 11.25px; }
.value-row span { font-size: 13px; }
.value-row strong { font-size: 27px; }
.mini-data-card span { font-size: 11.25px; }
.mini-data-card strong { font-size: 16px; }
.address-node small { font-size: 10px; }
.address-node strong { font-size: 13.5px; }
.address-node em { font-size: 11.25px; }
.read-output span { font-size: 13.5px; }
.call-stack-row,
.shared-config { font-size: 12px; }
.gate-card { font-size: 12.5px; }
.procedure-card p { font-size: 12.75px; }
.property-list > div { font-size: 12.25px; }
.health-readout { font-size: 12px; }
.desync-lane header strong { font-size: 13.5px; }
.authority-box span { font-size: 10.75px; }
.reader-stack span { font-size: 11.5px; }
.reader-stack span b { font-size: 11.75px; }
.reader-stack span small { font-size: 10px; }
.reader-stack strong { font-size: 20px; }
.desync-lane > p { font-size: 11.75px; }

.guided-shell { grid-template-rows: minmax(0, 1fr) 242px; }
.step-explanation,
.step-trace-panel,
.step-controls { padding: 12px; }
.step-explanation h2 { font-size: 18px; }
.step-explanation p { font-size: 14px; line-height: 1.55; }
.step-trace-panel header strong { font-size: 11.25px; }
.step-trace-panel header span { font-size: 11.75px; }
.trace-node { padding: 9px; }
.trace-node strong { font-size: 12.25px; }
.trace-node small { font-size: 10.75px; }
.step-count > span,
.step-controls .wb-micro { font-size: 11px; }
.step-buttons button { font-size: 12.5px; }

/* Give hands-on instructions and visual labels enough size to read without zooming. */
.sandbox-panel {
  grid-template-columns: 290px minmax(470px, 1fr) minmax(560px, 39%);
  gap: 12px;
  padding: 12px;
}
.sandbox-controls,
.sandbox-visual { padding: 13px; }
.sandbox-code > header { padding: 11px 13px; }
.pane-mini-label {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 10.5px;
}
.sandbox-controls header h2,
.sandbox-visual header h2,
.sandbox-code header h2 { font-size: 18px; }
.sandbox-controls header p,
.sandbox-code header p {
  font-size: 12.75px;
  line-height: 1.5;
}
.sandbox-controls .wb-field label,
.share-toggle,
.sandbox-message {
  font-size: 12.5px;
  line-height: 1.46;
}
.sandbox-controls input,
.sandbox-controls select,
.sandbox-controls button { font-size: 12.5px; }
.code-block { font-size: 11.25px; line-height: 1.62; }
.code-section-title { font-size: 10.25px; }
.code-section-title em { font-size: 9.75px; }

.runtime-panel header strong,
.sandbox-runtime header strong { font-size: 10.25px; }
.runtime-panel header span { font-size: 9.75px; }
.runtime-cell span {
  font-size: 10.25px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.runtime-cell strong {
  font-size: 15px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.sandbox-runtime {
  max-height: 154px;
}
.sandbox-runtime .runtime-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

@media (max-width: 1500px) {
  .sandbox-panel { grid-template-columns: 265px minmax(420px, 1fr) minmax(500px, 40%); }
  .guided-stage-head p { font-size: 13.25px; }
  .step-explanation p { font-size: 13.25px; }
}

/* Preserve one visual source line per EFPSE command in the hands-on excerpts. */
.sandbox-panel {
  grid-template-columns: 290px minmax(430px, 1fr) minmax(660px, 44%);
}
.code-block {
  font-size: 10.5px;
  white-space: pre;
  overflow-x: auto;
  overflow-wrap: normal;
}
@media (max-width: 1500px) {
  .sandbox-panel { grid-template-columns: 260px minmax(390px, 1fr) minmax(590px, 43%); }
}

/* Runtime values should remain legible as complete IDs. */
.sandbox-runtime .runtime-grid {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}
.sandbox-runtime .runtime-cell strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
