/* ============================================================ */
/* Lab 12 — per-lab styles                                        */
/* Shared chrome lives in ../_shared/lab-base.css                 */
/* ============================================================ */

/* Course-frame + terminal-snippet + time-tag — duplicated.       */
/* Lift to shared when the third refactor lands.                  */
.course-frame {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 10px 0 24px 0;
  padding: 6px 0 6px 16px;
  border-left: 3px solid var(--accent-soft);
}
.course-frame strong { color: var(--ink); }
body.presentation-mode .course-frame {
  font-size: 22px;
  padding-left: 22px;
  margin: 14px 0 32px 0;
}

.time-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 10px;
  vertical-align: 2px;
}

pre.term-snippet {
  background: #14110d;
  color: #e8e1d5;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 14px 16px;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre;
  margin: 6px 0 12px 0;
}
pre.term-snippet .term-comment      { color: #6fab5c; }
pre.term-snippet .term-cmd          { color: #f6efe1; }
pre.term-snippet .term-prompt-echo  { color: #b2d3e8; }
pre.term-snippet .term-hl {
  background: rgba(177, 74, 46, 0.28);
  color: #ffd8c4;
  padding: 0 3px;
  border-radius: 2px;
}

/* Numbered practice list */
.practice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 12px 0;
  padding: 12px 16px 12px 12px;
  background: var(--bg-elev);
  border-radius: 6px;
  border-left: 3px solid var(--accent-soft);
}
.practice-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  border-radius: 50%;
}
.practice strong { color: var(--ink); }

/* Stack list (Section 2 numbered layers) */
ol.stack-list { padding-left: 22px; }
ol.stack-list li { margin-bottom: 8px; }
ol.stack-list em { color: var(--ink-mute); font-style: normal; font-family: var(--sans); font-size: 13px; }

/* ============================================================ */
/*  Widget 1 · the AI component stack                             */
/* ============================================================ */
.stack-svg {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
  background: var(--bg-elev);
  border-radius: 6px;
  border: 1px solid var(--rule);
}
.stack-svg .stack-layer {
  fill: var(--bg-viz);
  stroke: var(--rule);
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.12s, stroke 0.12s, stroke-width 0.12s;
}
.stack-svg .stack-layer:hover,
.stack-svg .stack-layer.active {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.6;
}
.stack-svg .stack-layer.assignment {
  fill: #fff3d6;
  stroke: var(--accent);
  stroke-width: 1.6;
}
.stack-svg .layer-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  fill: var(--ink-mute);
  text-anchor: middle;
  dominant-baseline: middle;
}
.stack-svg .layer-name {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  fill: var(--ink);
  dominant-baseline: middle;
}
.stack-svg .layer-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  fill: var(--ink-mute);
  dominant-baseline: middle;
}
.stack-svg .stack-bracket {
  fill: none;
  stroke: var(--ink-mute);
  stroke-width: 1;
  opacity: 0.5;
}
.stack-svg .stack-bracket-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  fill: var(--ink-mute);
}

.stack-detail {
  margin-top: 12px;
  padding: 14px 18px;
  background: var(--bg-elev);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  min-height: 7em;
}
.stack-detail .stack-detail-title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.stack-detail .stack-detail-section {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-top: 8px;
}
.stack-detail code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-code);
  padding: 1px 5px;
  border-radius: 3px;
}
.stack-detail ul { margin: 4px 0 8px 18px; padding: 0; }
.stack-detail li { margin-bottom: 3px; font-size: 14px; }

/* ============================================================ */
/*  §4 · vLLM deep-dive widgets                                   */
/* ============================================================ */

/* Track cards (A vLLM / B Ollama) */
.track-cards { display: flex; gap: 14px; margin: 14px 0; flex-wrap: wrap; }
.track-card {
  flex: 1 1 260px;
  padding: 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.track-card.tested { border-color: var(--accent); background: #fff3d6; }
.track-card .track-head { font-family: var(--sans); font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.track-card p { font-size: 14px; line-height: 1.5; margin: 0; }
.track-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: #fff; background: var(--accent); padding: 1px 6px; border-radius: 8px;
  vertical-align: 2px; margin-left: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}

/* macOS / Windows code tabs */
.codetabs { margin: 10px 0 14px 0; }
.codetab-bar { display: flex; gap: 2px; }
.codetab-btn {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  padding: 5px 12px; cursor: pointer;
  background: var(--bg-elev); color: var(--ink-mute);
  border: 1px solid var(--rule); border-bottom: none;
  border-radius: 6px 6px 0 0;
}
.codetab-btn.active { background: #14110d; color: #f6efe1; border-color: #14110d; }
.codetab-panel pre { margin-top: 0; border-top-left-radius: 0; }

/* KV-cache growth widget */
.kv-controls, .paged-controls {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 10px 0; font-family: var(--sans); font-size: 13px;
}
.kv-controls select { font-family: var(--mono); font-size: 12px; padding: 3px 6px; }
.kv-svg, .paged-svg {
  display: block; width: 100%; height: auto; margin: 6px auto;
  background: var(--bg-elev); border: 1px solid var(--rule); border-radius: 6px;
}
.kv-readout {
  font-family: var(--sans); font-size: 13.5px; line-height: 1.5;
  padding: 8px 12px; background: var(--bg-elev); border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.paged-caption {
  font-family: var(--serif); font-size: 14.5px; line-height: 1.55; min-height: 3em;
  padding: 10px 14px; background: var(--bg-elev);
  border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0;
}

/* memory-waste legend */
.waste-legend { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-size: 13.5px; }
.waste-legend > span { display: flex; align-items: baseline; gap: 8px; }
.waste-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; transform: translateY(2px); }
.waste-swatch.reserved { background: #f0eee5; border: 1px solid #cfc9b8; }
.waste-swatch.internal { background: #fbe3c9; border: 1px solid #d9a86a; }
.waste-swatch.external { background: #e6d5e6; border: 1px solid #b48ab4; }
