/*
 * The dark treatment belongs exclusively to the instructional rail. Variables
 * are scoped to that rail so the Codex workspace keeps its original light UI.
 */
.lab-shell .lesson-panel {
  --lesson-surface: #111110;
  --lesson-surface-raised: #191918;
  --lesson-surface-inset: #141414;
  --lesson-ink: #f6f4ef;
  --lesson-ink-secondary: #c5c1ba;
  --lesson-ink-tertiary: #a39e96;
  --lesson-line: rgb(255 255 255 / 10%);
  --lesson-line-strong: rgb(255 255 255 / 17%);
  --lesson-green: #89dfa9;
  --lesson-blue: #a9d3ff;
  --white: var(--lesson-surface);
  --ink: var(--lesson-ink);
  --ink-strong: var(--lesson-ink);
  --ink-secondary: var(--lesson-ink-secondary);
  --ink-tertiary: var(--lesson-ink-tertiary);
  --surface: var(--lesson-surface);
  --surface-secondary: var(--lesson-surface-raised);
  --surface-tertiary: #232321;
  --surface-active: #2c2b28;
  --line: var(--lesson-line);
  --line-strong: var(--lesson-line-strong);
  --green: var(--lesson-green);
  --green-soft: rgb(137 223 169 / 9%);
  --blue: var(--lesson-blue);
  border-right-color: rgb(255 255 255 / 7%);
  background: var(--lesson-surface);
  color: var(--lesson-ink);
  color-scheme: dark;
}

.lab-shell .lesson-panel .lesson-scroll {
  background:
    radial-gradient(ellipse at 6% 0%, rgb(255 255 255 / 4%), transparent 38%),
    var(--lesson-surface);
  scrollbar-color: rgb(255 255 255 / 19%) transparent;
}

.lab-shell .lesson-panel .lesson-scroll::-webkit-scrollbar {
  width: 9px;
}

.lab-shell .lesson-panel .lesson-scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgb(255 255 255 / 21%);
  background-clip: padding-box;
}

.lab-shell .lesson-panel .lesson-kicker {
  color: var(--lesson-ink-tertiary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.lab-shell .lesson-panel .lesson-kicker svg {
  color: var(--lesson-ink-secondary);
}

.lab-shell .lesson-panel .lesson-kicker span {
  color: rgb(255 255 255 / 39%);
}

.lab-shell .lesson-panel .lesson-title {
  color: var(--lesson-ink);
  font-weight: 480;
  letter-spacing: -0.061em;
}

.lab-shell .lesson-panel .lesson-description,
.lab-shell .lesson-panel .lesson-scroll > p,
.lab-shell .lesson-panel .lesson-scroll > ul,
.lab-shell .lesson-panel .lesson-scroll > ol {
  color: var(--lesson-ink-secondary);
}

.lab-shell .lesson-panel .lesson-description {
  max-width: 43ch;
  line-height: 1.75;
}

.lab-shell .lesson-panel .lesson-scroll h3,
.lab-shell .lesson-panel .lesson-scroll h4 {
  color: var(--lesson-ink);
}

.lab-shell .lesson-panel .concept-card,
.lab-shell .lesson-panel .instruction-card,
.lab-shell .lesson-panel .prompt-card {
  padding: 17px 18px;
  border: 1px solid var(--lesson-line);
  border-radius: 13px;
  background: var(--lesson-surface-raised);
  box-shadow: 0 1px 0 rgb(255 255 255 / 2%) inset;
}

.lab-shell .lesson-panel .concept-card {
  border-color: rgb(255 255 255 / 7%);
  background: rgb(255 255 255 / 3.8%);
}

.lab-shell .lesson-panel .instruction-card {
  border-color: rgb(169 211 255 / 18%);
  background: rgb(102 152 204 / 8%);
}

.lab-shell .lesson-panel .prompt-card {
  position: relative;
  overflow: hidden;
  border-color: var(--lesson-line-strong);
  background: var(--lesson-surface-inset);
}

.lab-shell .lesson-panel .prompt-card::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: rgb(255 255 255 / 45%);
  content: "";
}

.lab-shell .lesson-panel .concept-card h3,
.lab-shell .lesson-panel .instruction-card h3,
.lab-shell .lesson-panel .prompt-card h3,
.lab-shell .lesson-panel .concept-card h4,
.lab-shell .lesson-panel .instruction-card h4,
.lab-shell .lesson-panel .prompt-card h4 {
  color: var(--lesson-ink);
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.005em;
}

.lab-shell .lesson-panel .concept-card p,
.lab-shell .lesson-panel .instruction-card p,
.lab-shell .lesson-panel .prompt-card p {
  color: var(--lesson-ink-secondary);
  line-height: 1.68;
}

.lab-shell .lesson-panel .instruction-card > h3 {
  color: #cae3ff;
}

.lab-shell .lesson-panel .lesson-checklist {
  margin-top: 13px;
  padding-left: 0;
  list-style: none;
}

.lab-shell .lesson-panel .lesson-checklist li {
  position: relative;
  min-height: 19px;
  padding-left: 25px;
  color: var(--lesson-ink-secondary);
}

.lab-shell .lesson-panel .lesson-checklist li + li {
  margin-top: 9px;
}

.lab-shell .lesson-panel .lesson-checklist li::before {
  position: absolute;
  top: 2px;
  left: 0;
  width: 15px;
  height: 15px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  content: "";
}

.lab-shell .lesson-panel .lesson-checklist li.check-pass {
  color: #c6e8d1;
}

.lab-shell .lesson-panel .lesson-checklist li.check-pass::before {
  display: grid;
  align-items: center;
  justify-content: center;
  border-color: rgb(137 223 169 / 48%);
  background: rgb(137 223 169 / 13%);
  color: var(--lesson-green);
  font-size: 10px;
  font-weight: 700;
  content: "\2713";
}

.lab-shell .lesson-panel .prompt-heading {
  gap: 12px;
}

.lab-shell .lesson-panel .prompt-card > p {
  color: #dedad3;
}

.lab-shell .lesson-panel .prompt-copy {
  min-height: 27px;
  padding: 5px 9px;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 7px;
  background: rgb(255 255 255 / 7%);
  color: var(--lesson-ink);
}

.lab-shell .lesson-panel .prompt-copy:hover {
  border-color: rgb(255 255 255 / 19%);
  background: rgb(255 255 255 / 12%);
}

.lab-shell .lesson-panel .lesson-scroll code {
  background: rgb(255 255 255 / 9%);
  color: #efebe5;
}

.lab-shell .lesson-panel .prompt-card pre code,
.lab-shell .lesson-panel .instruction-card pre code {
  background: transparent;
}

.lab-shell .lesson-panel .simulation-note {
  color: var(--lesson-ink-tertiary);
}

.lab-shell .lesson-panel .simulation-note svg {
  color: #b6afa6;
}

.lab-shell .lesson-panel .lesson-complete {
  border-color: rgb(137 223 169 / 24%);
  background: rgb(137 223 169 / 9%);
  color: var(--lesson-green);
}

.lab-shell .lesson-panel .lesson-complete span {
  color: #c5dfcc;
}

.lab-shell .lesson-panel .course-completion {
  border-color: var(--lesson-line);
  background: #1b1a18;
}

.lab-shell .lesson-panel .course-completion h3 {
  color: var(--lesson-ink);
}

.lab-shell .lesson-panel .course-completion p {
  color: var(--lesson-ink-secondary);
}

.lab-shell .lesson-panel .restart-button {
  border-bottom-color: rgb(246 244 239 / 70%);
  color: var(--lesson-ink);
}

.lab-shell .lesson-panel .restart-button:hover {
  border-bottom-color: var(--lesson-ink);
}

.lab-shell .lesson-panel .lesson-footer {
  border-top-color: var(--lesson-line);
  background: #141414;
}

.lab-shell .lesson-panel .lesson-footer .primary-button {
  border-color: transparent;
  background: #f5f2ec;
  color: #161513;
}

.lab-shell .lesson-panel .lesson-footer .primary-button:hover:not(:disabled) {
  background: #fff;
}

.lab-shell .lesson-panel .lesson-footer .primary-button:disabled {
  border-color: rgb(255 255 255 / 8%);
  background: #252422;
  color: #aaa59d;
  opacity: 1;
}

.lab-shell .lesson-panel .lesson-footer .ghost-button,
.lab-shell .lesson-panel .lesson-footer .secondary-button {
  border-color: var(--lesson-line-strong);
  background: transparent;
  color: var(--lesson-ink);
}

.lab-shell .lesson-panel .lesson-footer .ghost-button:hover:not(:disabled),
.lab-shell .lesson-panel .lesson-footer .secondary-button:hover:not(:disabled) {
  border-color: rgb(255 255 255 / 24%);
  background: rgb(255 255 255 / 7%);
}

.lab-shell .lesson-panel .lesson-footer .ghost-button:disabled,
.lab-shell .lesson-panel .lesson-footer .secondary-button:disabled {
  color: #9b968e;
}

.lab-shell .lesson-panel :focus-visible {
  outline-color: #b6dcff;
}

@media (max-width: 690px) {
  .lab-shell[data-mobile-view="lesson"] .mobile-switcher {
    border-bottom-color: rgb(255 255 255 / 10%);
    background: #141414;
    color-scheme: dark;
  }

  .lab-shell[data-mobile-view="lesson"] .mobile-switcher button {
    color: #b8b3ab;
  }

  .lab-shell[data-mobile-view="lesson"] .mobile-switcher button.active,
  .lab-shell[data-mobile-view="lesson"] .mobile-switcher button[aria-selected="true"] {
    color: #f6f4ef;
  }

  .lab-shell[data-mobile-view="lesson"] .mobile-switcher button.active::after,
  .lab-shell[data-mobile-view="lesson"] .mobile-switcher button[aria-selected="true"]::after {
    background: #f6f4ef;
  }

  .lab-shell .lesson-panel .concept-card,
  .lab-shell .lesson-panel .instruction-card,
  .lab-shell .lesson-panel .prompt-card {
    padding: 15px 16px;
  }

  .lab-shell .lesson-panel .lesson-footer {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (max-width: 440px) {
  .lab-shell .lesson-panel .prompt-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
