/* Light / high-contrast theme. Loaded after theme.css and roadmap.css, and
   activated by adding `.light` to <body>. Dark remains the default. */

body.light {
  --bg: #f5f6fa;
  --panel: #ffffff;
  --panel-border: #c8cddb;
  --text: #161a24;
  --muted: #555e72;
  --code-bg: #eef1f7;
  --static: #7c3aed;
  --stack: #2563eb;
  --heap: #059669;
  --borrow-shared: #15803d;
  --borrow-mut: #b45309;
  --error: #b91c1c;
}

body.light header,
body.light .card,
body.light .code-card,
body.light .stage-card,
body.light .mem-col,
body.light .picker-modal,
body.light .step-notes-card,
body.light .notes-panel,
body.light .roadmap-card,
body.light .roadmap-head,
body.light .autofix-panel,
body.light .diff {
  background: #ffffff;
  color: var(--text);
}

body.light header,
body.light .card-header,
body.light .stage-header {
  border-bottom-color: var(--panel-border);
}

body.light .brand h1,
body.light .stage-tab-btn,
body.light .notes-section-title,
body.light .narration-title,
body.light .var-name,
body.light .roadmap-card-head strong,
body.light .roadmap-track-title {
  color: var(--text);
}

body.light .mem-sub,
body.light .narration-body,
body.light .step-notes-card p,
body.light .roadmap-card p,
body.light .roadmap-head p,
body.light .autofix-explain {
  color: var(--muted);
}

body.light .stage-tab-btn.active,
body.light .mode-btn.active {
  background: #e5e7ff;
  color: #2b2370;
  border-color: #6d5bd0;
}

body.light .btn,
body.light .btn-icon,
body.light .mode-btn,
body.light .roadmap-btn {
  background: #f1f3f9;
  color: #202637;
  border-color: #b9c0d2;
}

body.light .btn.primary,
body.light .roadmap-btn.primary {
  background: #e5e7ff;
  color: #2b2370;
  border-color: #6d5bd0;
}

body.light .mem-block,
body.light .stack-frame,
body.light .fields-grid,
body.light .field-cell,
body.light .char-cell {
  background: #f7f8fc;
  border-color: var(--panel-border);
  color: var(--text);
}

body.light .char-cell.sliced {
  background: #dbeafe;
}

body.light .block-val,
body.light .field-cell,
body.light code,
body.light pre,
body.light .lab-stdout,
body.light .code-container {
  color: var(--text);
}

body.light .lab-code-gutter,
body.light code {
  background: var(--code-bg);
}

body.light .diag-card,
body.light .output-banner.err,
body.light .drop-chain {
  background: #fff5f5;
  border-color: #f3b5b5;
  color: #5b1515;
}

body.light .output-banner.ok {
  background: #f0fdf4;
  border-color: #a7d9b5;
  color: #14532d;
}

body.light .diag-code,
body.light .diff .diff-del {
  color: #b91c1c;
}

body.light .diff .diff-add,
body.light .eff,
body.light .roadmap-card.done .roadmap-status {
  color: #15803d;
}

body.light .picker-backdrop {
  background: rgba(20, 25, 40, 0.45);
}

body.light .roadmap-track-btn {
  background: #f1f3f9;
  color: #202637;
}

body.light .roadmap-track-btn.active {
  background: #5b3fa8;
  color: #fff;
}

body.light .lifetime-panel {
  background: #f5f2ff;
  border-color: #b9a9e8;
  color: var(--text);
}

body.light .lifetime-row,
body.light .nll-row,
body.light .nll-owner,
body.light .lifetime-note {
  color: #3b3552;
}

body.light .size-pill {
  color: #92400e;
  background: #fef3c7;
}

/* Larger code font for classrooms / projectors (independent of theme). */
body.large-font code,
body.large-font pre,
body.large-font .lab-code-line,
body.large-font .code-line,
body.large-font .diag-solution-code,
body.large-font .diff {
  font-size: 15px !important;
  line-height: 1.7 !important;
}
