:root {
  color-scheme: light;
  --bg: #f4f6f7;
  --paper: #fff;
  --ink: #20252a;
  --muted: #626d76;
  --line: #dce2e6;
  --red: #b24920;
  --teal: #22679a;
  --blue: #226d9c;
  --good: #16704c;
  --bad: #a82e3f;
  --terminal: #1c2227;
  --radius: 6px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
label.button {
  touch-action: manipulation;
}
button,
.button {
  cursor: pointer;
}
button,
.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
button:hover,
.button:hover {
  background: #eef2f3;
  border-color: #abb7bf;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.primary:hover {
  background: #0d5c55;
  color: white;
}
.danger {
  color: var(--bad);
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #358bc3;
  outline-offset: 3px;
}
.icon {
  padding: 9px;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.skip {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 90;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
.topbar {
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  line-height: 1.2;
}
.brand small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  background: var(--red);
  color: white;
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 700;
  border-radius: 5px;
}
.toplinks {
  display: flex;
  align-items: center;
  gap: 20px;
}
.mobile-menu {
  display: none;
}
.shell {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
}
aside {
  height: calc(100vh - 72px);
  overflow: auto;
  position: sticky;
  top: 72px;
  border-right: 1px solid var(--line);
  background: white;
  padding: 24px 17px;
}
.progress-area {
  padding: 0 9px 21px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.progress-area > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.progress-area strong {
  font-size: 23px;
}
.progress-area span,
.progress-area small {
  font-size: 11px;
  color: var(--muted);
}
progress {
  height: 6px;
  width: 100%;
  display: block;
  margin: 10px 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #e5e9eb;
}
progress::-webkit-progress-bar {
  background: #e5e9eb;
}
progress::-webkit-progress-value {
  background: var(--teal);
}
progress::-moz-progress-bar {
  background: var(--teal);
}
nav button {
  justify-content: flex-start;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  font-weight: 500;
  padding: 9px 10px;
}
nav button.active {
  background: #e9f3f1;
  color: #115d55;
  font-weight: 650;
}
.search {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  margin: 20px 0 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
}
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  font-size: 12px;
  background: none;
}
.module-heading {
  font-size: 11px;
  color: var(--muted);
  margin: 18px 10px 6px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0;
}
.lesson-nav {
  font-size: 12px;
  line-height: 1.45;
  gap: 9px;
  padding: 8px 10px;
}
.lesson-num {
  font-size: 11px;
  color: var(--muted);
  min-width: 20px;
}
.lesson-nav svg {
  width: 14px;
  margin-left: auto;
  color: var(--good);
}
.offline {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 25px 10px 0;
}
.offline span {
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}
main {
  padding: 32px 38px 64px;
  min-width: 0;
  max-width: 1640px;
  width: 100%;
  margin: auto;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 14px;
}
h2 {
  font-size: 23px;
  line-height: 1.35;
}
h3 {
  font-size: 17px;
  line-height: 1.45;
}
p {
  margin-bottom: 16px;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 10px;
}
.muted,
.small {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}
.page-title p {
  font-size: 14px;
  max-width: 720px;
  color: var(--muted);
  margin-bottom: 0;
}
.page-title .controls {
  flex-shrink: 0;
}
.home-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.home-banner img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
}
.home-banner p {
  max-width: 650px;
  color: var(--muted);
  font-size: 15px;
}
.home-banner h1 {
  max-width: 650px;
}
.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.metrics {
  display: flex;
  gap: 40px;
  margin: 24px 0 30px;
  flex-wrap: wrap;
}
.metrics strong {
  font-size: 24px;
  display: block;
}
.metrics span {
  font-size: 12px;
  color: var(--muted);
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.module-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 21px;
  background: white;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.module-card h3 {
  margin: 10px 0;
}
.module-card p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}
.module-card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.module-card button {
  align-self: flex-start;
}
.module-card .number {
  color: var(--red);
  font-weight: 700;
}
.callout {
  padding: 16px 18px;
  border-left: 3px solid var(--blue);
  background: #eaf2f7;
  margin: 20px 0;
  font-size: 14px;
}
.callout.warning {
  border-color: var(--red);
  background: #fcf0f1;
}
.callout.success {
  border-color: var(--good);
  background: #eaf5ef;
}
.callout p:last-child {
  margin-bottom: 0;
}
.tabs {
  display: flex;
  gap: 24px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
}
.tabs button {
  background: none;
  border: 0;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  padding: 12px 1px;
  white-space: nowrap;
}
.tabs button.active {
  border-color: var(--teal);
  color: var(--teal);
}
.lesson-content {
  max-width: 850px;
}
.lesson-content section {
  margin-bottom: 28px;
}
.lesson-content p,
.lesson-content li {
  font-size: 15px;
}
.lesson-content ul {
  padding-left: 22px;
}
.lesson-content pre,
.reference pre {
  background: #242a30;
  color: #e8edf0;
  border-radius: 5px;
  padding: 18px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.7;
}
code,
pre,
textarea.editor,
.terminal-output,
.prompt {
  font-family: Consolas, 'Cascadia Code', monospace;
}
p code,
li code,
td code {
  background: #e7ecef;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.9em;
}
.lesson-footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
}
.quiz {
  max-width: 900px;
}
.question {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.question legend {
  font-weight: 600;
  margin-bottom: 12px;
}
.question fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 5px;
  margin: 8px 0;
  cursor: pointer;
  font-size: 14px;
}
.option:has(input:checked) {
  border-color: var(--teal);
  background: #eff7f5;
}
.option input {
  margin-top: 5px;
  accent-color: var(--teal);
}
.feedback {
  padding: 12px;
  margin-top: 12px;
  background: #fceef0;
  border-left: 3px solid var(--red);
  font-size: 13px;
}
.feedback.correct {
  background: #eaf5ef;
  border-color: var(--good);
}
.quiz-result {
  font-weight: 600;
  margin: 22px 0;
}
.lab-intro {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 24px;
  margin-bottom: 20px;
}
.lab-intro p {
  font-size: 14px;
}
.lab-intro h3 {
  margin-bottom: 8px;
}
.objectives {
  margin: 0;
  padding: 0;
  list-style: none;
}
.objectives li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  padding: 5px 0;
}
.objectives svg {
  width: 15px;
  height: 15px;
  margin-top: 3px;
}
.objectives .pass {
  color: var(--good);
}
.lab-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.lab-toolbar button {
  font-size: 12px;
  padding: 7px 10px;
}
.workbench {
  border: 1px solid #bfc9cf;
  border-radius: 6px;
  overflow: hidden;
  background: white;
}
.workspace {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  height: 340px;
}
.files {
  background: #f0f3f4;
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 12px 7px;
}
.files button {
  display: flex;
  justify-content: flex-start;
  white-space: normal;
  overflow-wrap: anywhere;
  font-family: Consolas, monospace;
  font-size: 11px;
  width: 100%;
  border: 0;
  background: none;
  padding: 7px 6px;
  text-align: left;
}
.files button.selected {
  background: #dce8e5;
  color: #0e6057;
}
.files .file-controls {
  display: flex;
  gap: 4px;
  padding: 4px;
}
.file-controls button {
  width: 30px;
  height: 28px;
  justify-content: center;
}
.edit-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.file-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
  padding: 7px 13px;
  gap: 12px;
}
.file-title span {
  overflow-wrap: anywhere;
}
.file-title small {
  color: var(--muted);
}
.editor {
  border: 0;
  outline: none !important;
  resize: none;
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 15px 18px;
  line-height: 1.65;
  font-size: 13px;
  color: #263f51;
  background: #fff;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}
.terminal {
  background: var(--terminal);
  color: #d9e3e8;
  border-top: 1px solid #333f48;
}
.terminal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid #364049;
  color: #c7d4da;
  font-size: 11px;
}
.terminal-head button {
  background: transparent;
  color: #c7d4da;
  border: 0;
  width: 25px;
  height: 25px;
  padding: 3px;
}
.terminal-output {
  height: 225px;
  overflow: auto;
  padding: 12px 15px;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.terminal-output .command {
  color: #86d7c1;
}
.terminal-output .error {
  color: #ff9eac;
}
.terminal-output .success {
  color: #a5dcb7;
}
.prompt {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #364049;
  padding: 10px 14px;
  font-size: 12px;
}
.prompt label {
  color: #86d7c1;
}
.prompt input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: white;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}
.prompt button {
  background: none;
  border: 0;
  color: #86d7c1;
  padding: 2px;
}
.state-panel {
  margin-top: 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  background: white;
}
th,
td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
th {
  font-size: 11px;
  color: var(--muted);
  background: #eaf0f2;
}
table code {
  font-size: 11px;
}
.table-scroll {
  overflow: auto;
}
.hint {
  margin: 14px 0;
  padding: 14px 18px;
  background: #fff6df;
  border-left: 3px solid #b57d19;
  font-size: 13px;
}
.solution {
  margin: 16px 0;
  background: white;
  border: 1px solid var(--line);
  padding: 14px;
}
.solution summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.solution p {
  font-size: 13px;
}
.lab-status {
  margin-top: 14px;
}
.lab-status p {
  margin-bottom: 0;
}
.reference {
  max-width: 1000px;
}
.reference details {
  margin: 12px 0;
  background: white;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.reference summary {
  cursor: pointer;
  font-weight: 650;
}
.reference p {
  font-size: 14px;
  margin-top: 12px;
}
.reference dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  margin: 15px 0;
  font-size: 13px;
}
.reference dt {
  font-weight: 650;
}
.reference dd {
  margin: 0;
}
.notes {
  width: 100%;
  min-height: 55vh;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 20px;
  background: white;
  resize: vertical;
}
.note-state {
  font-size: 12px;
  color: var(--muted);
}
.roadmap {
  display: flex;
  gap: 8px;
  font-size: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.roadmap span {
  padding: 5px 9px;
  background: #e7ecef;
}
.roadmap span.done {
  color: var(--good);
  background: #e1f0e8;
}
dialog {
  max-width: 540px;
  width: calc(100% - 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--ink);
}
dialog::backdrop {
  background: #141d2480;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.dialog-head h2 {
  margin: 0;
}
.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
dialog p {
  font-size: 14px;
  margin-top: 18px;
}
.hidden {
  display: none !important;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  background: #263139;
  color: white;
  border-radius: 5px;
  max-width: calc(100% - 24px);
  padding: 11px 20px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#toast.visible {
  opacity: 1;
}
.completion {
  padding: 18px;
  background: #eaf5ef;
  border-left: 3px solid var(--good);
  margin: 24px 0;
}
.completion p {
  margin: 0;
  font-size: 14px;
}
@media (min-width: 1450px) {
  .course-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-banner {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .home-banner img {
    height: 195px;
  }
}
@media (max-width: 1100px) {
  main {
    padding: 27px 24px;
  }
  .shell {
    grid-template-columns: 245px minmax(0, 1fr);
  }
  .home-banner {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-banner img {
    display: none;
  }
  .lab-intro {
    grid-template-columns: 1fr;
  }
  .workspace {
    grid-template-columns: 150px 1fr;
  }
  .page-title {
    flex-wrap: wrap;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 14px;
  }
  .brand {
    font-size: 17px;
  }
  .brand-mark {
    height: 34px;
    width: 34px;
    font-size: 22px;
  }
  .brand small {
    font-size: 10px;
  }
  .mobile-menu {
    display: flex;
  }
  .shell {
    display: block;
  }
  aside {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    width: 278px;
    max-width: 90vw;
    height: calc(100dvh - 64px);
    z-index: 19;
    box-shadow: 15px 0 30px #20252a25;
  }
  aside.open {
    display: block;
  }
  main {
    padding: 23px 16px 45px;
  }
  h1 {
    font-size: 27px;
  }
  h2 {
    font-size: 21px;
  }
  .course-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 22px;
  }
  .metrics strong {
    font-size: 21px;
  }
  .tabs {
    gap: 22px;
    margin-bottom: 22px;
  }
  .page-title {
    gap: 15px;
  }
  .workspace {
    grid-template-columns: 1fr;
    height: 390px;
  }
  .files {
    display: flex;
    max-height: 100px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: auto;
    align-items: flex-start;
  }
  .files button {
    width: auto;
    white-space: nowrap;
    max-width: none;
    flex-shrink: 0;
  }
  .file-controls {
    flex-shrink: 0;
  }
  .edit-pane {
    min-height: 280px;
  }
  .lab-toolbar {
    justify-content: flex-start;
  }
  .terminal-output {
    height: 230px;
  }
  .reference dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .reference dd {
    margin-bottom: 10px;
  }
  .home-banner {
    padding-bottom: 22px;
    gap: 10px;
  }
  .prompt {
    padding: 10px;
  }
  .lesson-footer {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.test-pass {
  color: var(--good);
  font-weight: 650;
}
.test-fail {
  color: var(--bad);
  font-weight: 650;
}
#test-results pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  margin: 0;
  max-width: 340px;
}
.inspector {
  margin: 22px 0;
  background: #fff;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.inspector summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.inspector table {
  margin-top: 14px;
}
.solution pre {
  background: #242a30;
  color: #e8edf0;
  padding: 15px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.7;
  border-radius: 5px;
}
.workspace {
  height: 380px;
}
.primary:hover {
  background: #1b537c;
}
.lesson-nav.active {
  background: #eaf2f8;
  color: #1b537c;
}
