:root {
  color-scheme: dark;
  --background: #101418;
  --foreground: #e8edf0;
  --card: #171d23;
  --primary: #b6ed76;
  --muted: #a0adb7;
  --border: #303b43;
  --windows: #8fc9ff;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font:
    16px/1.65 Arial,
    Helvetica,
    sans-serif;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 14px;
  background: var(--primary);
  color: #13200b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
button:hover {
  filter: brightness(1.1);
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button.secondary {
  background: #20282f;
  color: #dae4eb;
  border-color: #44525c;
}
button.ghost {
  background: transparent;
  color: #b9c8d2;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 16px 0;
}
h1 span,
.brand span {
  color: var(--primary);
}
h2 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
}
h3 {
  font-size: 14px;
}
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
code {
  color: #c3ed99;
  overflow-wrap: anywhere;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: monospace;
  letter-spacing: 0.06em;
}
.brand-icon {
  font-size: 24px;
}
.topbar a {
  font-size: 14px;
  color: #b0bdc5;
  text-decoration: none;
}
.layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: calc(100vh - 80px);
}
.course {
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow: auto;
  border-right: 1px solid var(--border);
  background: #151b20;
}
.course-heading {
  padding: 28px 22px 18px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: #9cabaf;
  margin-bottom: 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.course-heading > .muted {
  font-size: 14px;
  margin: 12px 0;
}
progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #2b3740;
  color: var(--primary);
  margin-top: 22px;
}
progress::-webkit-progress-bar {
  background: #2b3740;
}
progress::-webkit-progress-value {
  background: var(--primary);
}
progress::-moz-progress-bar {
  background: var(--primary);
}
#lesson-nav {
  padding: 4px 14px;
}
.lesson-group {
  margin-bottom: 23px;
}
.lesson-group > .eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  margin: 0 8px 8px;
}
.lesson-link {
  display: flex;
  width: 100%;
  text-align: left;
  align-items: center;
  gap: 10px;
  padding: 11px 8px;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
  color: #b1bfc9;
}
.lesson-link:hover {
  background: #222d34;
  filter: none;
}
.lesson-link.active {
  background: #26352b;
  color: var(--primary);
  border-color: #49603a;
}
.lesson-number {
  font-family: monospace;
  color: #91a2ae;
  font-size: 12px;
}
.completion-mark {
  color: var(--primary);
  margin-left: auto;
}
.course-bottom {
  padding: 20px 22px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: #93a5b0;
}
.course-bottom strong {
  color: #b6c8d2;
  font-size: 10px;
  letter-spacing: 0.05em;
}
.course-bottom p {
  margin-top: 8px;
}
.mobile-toggle {
  display: none;
}
main {
  padding: 38px 40px;
  min-width: 0;
  max-width: 1650px;
  width: 100%;
  margin: 0 auto;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.section-heading .eyebrow {
  margin: 0;
}
.pill {
  font: 12px monospace;
  color: #acb9c2;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 6px 12px;
}
.intro {
  color: #aab7c0;
  font-size: 17px;
  max-width: 680px;
  margin-bottom: 30px;
}
.practice-grid {
  display: grid;
  grid-template-columns: minmax(245px, 0.85fr) minmax(340px, 1.25fr);
  gap: 26px;
  align-items: start;
}
.lesson-column,
.terminal-column {
  min-width: 0;
}
.instruction {
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.instruction > p:not(.eyebrow) {
  margin: 18px 0;
  color: #b7c3cb;
}
.example {
  padding: 15px;
  background: #10171c;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.example code {
  display: block;
  font-size: 14px;
}
.example p {
  margin-top: 9px;
  font-size: 12px;
  color: #a2b1bb;
}
.mission {
  border-left: 2px solid var(--primary);
  background: #202b23;
  padding: 18px;
  margin: 24px 0;
}
.mission .eyebrow {
  color: var(--primary);
  margin-bottom: 7px;
}
.mission p:last-child {
  color: #e3eedb;
}
.hint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.hint-actions button {
  font-size: 13px;
  padding: 9px 10px;
}
.hints p {
  margin-top: 15px;
  color: #c5d0d8;
  font-size: 14px;
}
.hints strong {
  color: var(--primary);
}
.solution {
  padding: 16px;
  background: #10171c;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-top: 20px;
}
.solution code {
  display: block;
  font-size: 13px;
  margin: 10px 0;
}
.solution > p:last-child {
  color: var(--muted);
  font-size: 12px;
}
.source-link {
  display: block;
  color: #9dacb5;
  font-size: 12px;
  margin-top: 22px;
  text-decoration: none;
}
.terminal {
  border: 1px solid #3a454e;
  border-radius: 8px;
  background: #080d10;
  overflow: hidden;
  min-width: 0;
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #1e262d;
  border-bottom: 1px solid var(--border);
  font-family: monospace;
  color: #c3cdd5;
  font-size: 12px;
  gap: 12px;
}
.terminal-bar button {
  font-size: 12px;
  white-space: nowrap;
  padding: 7px;
}
.terminal-bar i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 7px;
}
.terminal-output {
  height: 270px;
  overflow: auto;
  padding: 20px;
  scrollbar-color: #34454f transparent;
}
.terminal-output pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #c0cfd9;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 12px;
}
.terminal-output .command {
  color: #c3f399;
  margin-top: 18px;
}
.terminal-output .error {
  color: #ffb2a8;
}
.terminal-output .note {
  color: #90a3b0;
}
.terminal form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid #212d34;
}
.terminal label {
  color: var(--primary);
}
.terminal input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--foreground);
  font-family: monospace;
  font-size: 16px;
}
.terminal input::placeholder {
  color: #748894;
}
.terminal form button {
  white-space: nowrap;
}
.terminal-footer {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  padding: 9px 16px;
  color: #8d9da8;
  background: #131b21;
  gap: 12px;
}
#cwd {
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #acc291;
}
.windows {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #354c63;
  border-top: 3px solid var(--windows);
  background: #151f29;
  border-radius: 8px;
}
.windows-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.windows-heading .eyebrow {
  color: var(--windows);
  margin-bottom: 6px;
}
.reading-badge {
  font: 10px monospace;
  letter-spacing: 0.07em;
  color: #b5cbe0;
  background: #22364a;
  border-radius: 4px;
  padding: 5px 8px;
  white-space: nowrap;
}
.windows-intro {
  color: #a6bbce;
  font-size: 14px;
  margin: 14px 0 20px;
}
.windows-example + .windows-example {
  border-top: 1px solid #324453;
  padding-top: 20px;
  margin-top: 20px;
}
.windows-example h3 {
  color: #cee6fc;
  font-size: 14px;
  font-weight: 600;
}
.windows-example pre {
  background: #0e171f;
  padding: 14px;
  border: 1px solid #2b4052;
  border-radius: 4px;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0;
  line-height: 1.7;
}
.windows-example code {
  color: #abd7ff;
}
.windows-example p {
  font-size: 14px;
  color: #b3c3d2;
}
.windows-example a {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: #98b7d1;
}
.feedback {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #b5c1c9;
  font-size: 14px;
}
.feedback strong {
  color: #d9e1e6;
}
.feedback p {
  font-size: 14px;
  margin-top: 5px;
}
.feedback.success {
  background: #1e2d20;
  border-color: #49603a;
  color: #c1d7b2;
}
.feedback button {
  margin-top: 15px;
}
.reference {
  border-top: 1px solid var(--border);
  padding: 14px 2px;
}
summary {
  cursor: pointer;
  color: #b9cbd8;
  font-size: 14px;
}
.reference-note {
  color: #95a8b4;
  font-size: 12px;
  margin: 10px 0;
}
.file-list,
#command-reference {
  max-height: 280px;
  overflow: auto;
}
.file-row {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  color: #bac8d0;
  font-size: 12px;
}
.file-row code {
  color: inherit;
}
.file-row span {
  margin-left: auto;
  color: #8ba0ad;
  white-space: nowrap;
}
#command-reference details {
  padding: 8px 0;
  border-bottom: 1px solid #25313b;
}
#command-reference p {
  white-space: pre-wrap;
  font-size: 13px;
  color: #adbec9;
  padding: 12px 0;
}
.lesson-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
}
.lesson-bottom button {
  font-size: 12px;
}
.lesson-bottom span {
  font-size: 11px;
  color: #879ba8;
}
footer {
  font-size: 12px;
  color: #8c9ba6;
  line-height: 1.8;
  margin-top: 38px;
  max-width: 900px;
}
.notice {
  padding: 20px;
  color: #f1d991;
  border: 1px solid #6f633b;
  margin: 15px 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 20;
  background: var(--primary);
  color: #13200b;
  padding: 10px 20px;
}
.skip-link:focus {
  top: 10px;
}
@media (min-width: 1500px) {
  main {
    padding: 42px 54px;
  }
  .practice-grid {
    gap: 34px;
  }
  .terminal-output {
    height: 310px;
  }
}
@media (max-width: 1150px) {
  .layout {
    grid-template-columns: 235px minmax(0, 1fr);
  }
  main {
    padding: 30px 24px;
  }
  .practice-grid {
    grid-template-columns: 1fr;
  }
  .terminal-column {
    display: grid;
    gap: 22px;
  }
  .windows {
    margin-top: 0;
  }
}
@media (max-width: 767px) {
  .topbar {
    height: 70px;
    padding: 0 18px;
  }
  .brand {
    font-size: 12px;
    gap: 8px;
  }
  .brand-icon {
    font-size: 20px;
  }
  .topbar a {
    font-size: 12px;
  }
  .layout {
    display: block;
  }
  .course {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .course-heading {
    padding: 18px 22px 8px;
  }
  .course-heading > .eyebrow,
  .course-heading > h2,
  .course-heading > p.muted:not(.small),
  .course-bottom {
    display: none;
  }
  progress {
    margin-top: 0;
  }
  .course-heading .small {
    margin: 6px 0;
  }
  .mobile-toggle {
    display: block;
    margin: 0 22px 16px;
  }
  #lesson-nav {
    display: none;
  }
  #lesson-nav.mobile-open {
    display: block;
  }
  main {
    padding: 24px 18px;
  }
  .pill {
    display: none;
  }
  h1 {
    font-size: 2.2rem;
  }
  .instruction {
    padding: 22px;
  }
  .terminal form {
    padding: 12px;
    gap: 9px;
  }
  .terminal-output {
    height: 250px;
  }
  .windows {
    padding: 20px;
  }
  .lesson-bottom {
    flex-wrap: wrap;
  }
  .lesson-bottom span {
    order: 3;
    width: 100%;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

#course-select {
  display: block; width: 100%; margin: 8px 0 18px; padding: 10px 8px;
  font: inherit; font-size: 14px; color: var(--foreground);
  background: var(--card); border: 1px solid var(--border); border-radius: 6px;
}
#course-select:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
