@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  --ink: #142932;
  --muted: #6c7b80;
  --paper: #f5f7f7;
  --line: #dde4e5;
  --mint: #79dac2;
  --dark: #101d29;
  --gold: #e9b84b;
  --blue: #78b7f5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid #58bba6;
  outline-offset: 4px;
}
header {
  height: 92px;
  max-width: 1360px;
  margin: auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  font-family: Manrope, sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1px;
  white-space: nowrap;
}
.brand > span:not(.brand-symbol) {
  font-weight: 400;
}
.brand-symbol {
  font-size: 34px;
  margin-right: 10px;
  color: #438c80;
}
.brand small {
  font: 9px "IBM Plex Mono";
  letter-spacing: 1.5px;
  margin-left: 18px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  color: var(--muted);
}
nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
}
nav a {
  color: var(--muted);
  padding: 32px 0;
}
nav a.active {
  color: var(--ink);
  box-shadow: inset 0 -2px #438c80;
}
#nav-progress {
  font: 11px "IBM Plex Mono";
  border: 1px solid var(--line);
  padding: 2px 5px;
  border-radius: 4px;
}
.icon-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: var(--ink);
}
main {
  max-width: 1264px;
  margin: auto;
  padding: 42px 24px 80px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 0 0 30px;
}
.eyebrow {
  font: 11px "IBM Plex Mono";
  letter-spacing: 2px;
  color: var(--muted);
  margin: 0 0 12px;
}
.intro h1 {
  font-size: 36px;
  letter-spacing: -1.5px;
  font-weight: 500;
  margin: 0;
}
.intro h1 strong {
  font-weight: 700;
}
.intro p {
  color: var(--muted);
  margin: 8px 0 0;
}
.intro .number {
  font: 12px "IBM Plex Mono";
  color: var(--muted);
}
.hero {
  height: 360px;
  background: var(--dark);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 43% 57%;
  color: #fff;
  box-shadow: 0 18px 40px #0d263012;
}
.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 28px;
}
.subject-tile {
  text-align: left;
  font: inherit;
  border: 1px solid #c9d9df;
  border-radius: 16px;
  padding: 24px;
  color: #17313e;
  background: #e8f2f5;
  display: flex;
  flex-direction: column;
  min-height: 235px;
}
button.subject-tile { cursor: pointer; transition: transform .2s, box-shadow .2s; }
button.subject-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 28px #17313e18; }
.subject-tile:focus-visible, .show-subject:focus-visible { outline: 3px solid #188f91; outline-offset: 4px; }
.python-subject { background: #edf0fc; border-color: #d5dcf0; }
.planned-subject { background: #f6f8fa; }
.subject-code { font: 12px "IBM Plex Mono", monospace; letter-spacing: .04em; }
.subject-tile h2 { font-size: 22px; line-height: 1.5; margin: 18px 0 8px; }
.subject-tile p { font-size: 16px; line-height: 1.7; margin: 0 0 18px; }
.subject-tile > span:last-child { margin-top: auto; font-size: 14px; color: #506779; }
.subject-showcase { margin-bottom: 36px; }
.show-subject { margin-left: auto; border: 1px solid #c9d9df; border-radius: 8px; padding: 9px 14px; background: white; font: inherit; font-size: 14px; color: #147678; cursor: pointer; }
@media (max-width: 1100px) { .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .subject-grid { grid-template-columns: 1fr; } .subject-tile { min-height: 0; padding: 20px; } .subject-tile h2 { margin-top: 10px; } .show-subject { margin-left: 0; } }
.hero-copy {
  z-index: 2;
  padding: 40px 0 40px 40px;
  pointer-events: none;
}
.hero-copy a {
  pointer-events: auto;
}
.hero .eyebrow {
  color: var(--mint);
}
.hero h2 {
  font-weight: 500;
  font-size: 36px;
  line-height: 1.4;
  margin: 18px 0 12px;
  letter-spacing: -1px;
}
.hero h2 em {
  font-style: normal;
  color: var(--mint);
}
.hero-copy > p:not(.eyebrow) {
  font-size: 14px;
  color: #a7b9c4;
  max-width: 350px;
}
.hero canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  touch-action: pan-y;
}
.hero-stage {
  position: absolute;
  inset: 0 0 0 37%;
}
.hero-stage canvas {
  position: relative;
}
.hero-tags {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: flex;
  gap: 12px;
  color: #91a3b2;
  font: 11px "IBM Plex Mono";
  pointer-events: none;
}
.button {
  background: var(--mint);
  color: #12332e;
  border: 0;
  border-radius: 7px;
  padding: 11px 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}
.button.light {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}
.button.dark {
  background: var(--dark);
  color: white;
}
.button.small {
  padding: 7px 12px;
  font-size: 13px;
}
.hero-copy .button {
  margin-top: 14px;
}
.chip {
  font: 10px "IBM Plex Mono";
  border: 1px solid #51656b;
  border-radius: 4px;
  padding: 5px 8px;
  color: #bad5d0;
}
.filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.filter {
  background: none;
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 7px 17px;
  font-size: 14px;
  color: var(--muted);
}
.filter.active {
  background: #e0efeb;
  color: #256b5c;
  border-color: #d1e4dc;
}
.search {
  margin-left: auto;
  position: relative;
}
.search input {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  width: 220px;
  font-size: 13px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 18px;
}
.section-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
}
.section-heading .en {
  font: 12px "IBM Plex Mono";
  color: var(--muted);
}
.section-heading .desc {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
.section-index {
  color: #3a8272;
  font: 12px "IBM Plex Mono";
  background: #dfefea;
  padding: 5px 8px;
  border-radius: 4px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px #173a3610;
}
.card-visual {
  height: 170px;
  position: relative;
  background: linear-gradient(130deg, #162737, #253d4c);
  overflow: hidden;
}
.card-visual canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.card-visual .label {
  position: absolute;
  top: 14px;
  left: 15px;
  font: 10px "IBM Plex Mono";
  letter-spacing: 1px;
  color: #c2ded9;
}
.card-visual .lab-badge {
  position: absolute;
  bottom: 12px;
  right: 14px;
  color: #97cfc3;
  font: 10px "IBM Plex Mono";
  padding: 3px 7px;
  border: 1px solid #729d994d;
  border-radius: 3px;
}
.card-body {
  padding: 19px 21px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
}
.card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.8;
}
.card-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.card-meta .go {
  color: #397f70;
  font-weight: 600;
}
.card.done {
  border-color: #7cc8b5;
}
.complete-badge {
  color: #26735f;
  font-size: 12px;
}
.future {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.future-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 17px;
  background: #edf1f1;
}
.future-item strong {
  font: 16px Manrope;
  display: block;
}
.future-item span {
  font-size: 12px;
  color: var(--muted);
}
footer {
  border-top: 1px solid var(--line);
  padding: 25px 48px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
}
footer b {
  color: #4ca38a;
  margin: 0 6px;
}
dialog {
  border: 0;
  border-radius: 15px;
  max-width: 560px;
  width: calc(100% - 32px);
  padding: 32px;
  box-shadow: 0 24px 60px #0003;
}
dialog::backdrop {
  background: #091c2eb0;
  backdrop-filter: blur(5px);
}
.close {
  position: absolute;
  right: 20px;
  top: 12px;
  background: none;
  border: 0;
  font-size: 28px;
  color: var(--muted);
}
.term {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.term strong {
  font-family: "IBM Plex Mono";
  font-size: 14px;
}
.term p {
  margin: 3px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.lab-page {
  max-width: none;
  padding: 24px 24px 50px;
}
.lab-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.back {
  font-size: 13px;
  color: var(--muted);
}
.lab-head h1 {
  font-size: 24px;
  margin: 0;
}
.lab-head .lesson-tag {
  margin-left: auto;
  font: 11px "IBM Plex Mono";
  color: var(--muted);
}
.lab-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
}
.lesson-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  align-self: start;
}
.lesson-panel h2 {
  font-size: 23px;
  margin: 10px 0 14px;
}
.lesson-panel p {
  font-size: 14px;
  color: var(--muted);
}
.lesson-panel .scenario {
  background: #edf4f1;
  border-left: 3px solid #6cb89f;
  padding: 15px;
  font-size: 14px;
  color: #365b51;
  margin: 20px 0;
}
.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.steps li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  counter-increment: step;
  display: flex;
  gap: 12px;
}
.steps li:before {
  content: counter(step, decimal-leading-zero);
  font: 11px "IBM Plex Mono";
  color: #438c80;
  margin-top: 5px;
}
.workarea {
  min-width: 0;
}
.network-view {
  height: 390px;
  background: radial-gradient(ellipse at 50% 40%, #213b4a, #0e1a26 75%);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.network-view canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.scene-note {
  position: absolute;
  top: 18px;
  left: 20px;
  font: 11px "IBM Plex Mono";
  color: #8ca9b6;
}
.scene-legend {
  position: absolute;
  bottom: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #9fb8c5;
  pointer-events: none;
}
.scene-legend b {
  color: var(--mint);
}
.control-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 16px;
  padding: 20px;
}
.controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}
.controls label {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 5px;
  flex: 1;
  min-width: 140px;
}
.controls select,
.controls input {
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 6px;
  background: #fafcfc;
  color: var(--ink);
  font-size: 14px;
}
.trace {
  margin-top: 16px;
  background: #f2f6f5;
  padding: 14px;
  border-radius: 7px;
  font-size: 14px;
  color: #3a655c;
  min-height: 54px;
}
.trace.error {
  background: #fff0eb;
  color: #964d35;
}
.trace div + div {
  margin-top: 6px;
}
.question-box {
  margin-top: 18px;
  background: white;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 12px;
}
.question-box h3 {
  font-size: 17px;
  margin: 0 0 14px;
}
.choices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.choice {
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 7px;
  background: #fafcfc;
  font-size: 14px;
  text-align: left;
}
.feedback {
  margin-top: 12px;
  font-size: 14px;
  color: #347762;
  min-height: 24px;
}
.feedback.bad {
  color: #a15e40;
}
.hint {
  background: none;
  border: 0;
  color: #66837a;
  font-size: 13px;
  text-decoration: underline;
  padding: 12px 0;
}
.editor-wrap {
  background: #101d29;
  border-radius: 12px;
  overflow: hidden;
}
.editor-bar {
  color: #8da8b6;
  font: 12px "IBM Plex Mono";
  padding: 15px 20px;
  border-bottom: 1px solid #ffffff15;
  display: flex;
  justify-content: space-between;
}
.editor {
  background: #101d29;
  color: #cde9df;
  font:
    14px/1.9 "IBM Plex Mono",
    monospace;
  width: 100%;
  min-height: 310px;
  resize: vertical;
  border: 0;
  padding: 22px;
  tab-size: 4;
}
.editor-actions {
  padding: 12px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #ffffff15;
  color: #8da8b6;
  font-size: 12px;
}
.output {
  background: #09131d;
  color: #a8dbc9;
  white-space: pre-wrap;
  font: 13px/1.8 "IBM Plex Mono";
  padding: 20px;
  margin: 0;
  min-height: 90px;
}
.device-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  margin-top: 18px;
}
.device-table th,
.device-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.device-table th {
  color: var(--muted);
  font-weight: 500;
}
.status {
  font: 11px "IBM Plex Mono";
  color: #408d78;
}
.status.offline {
  color: #b17745;
}
.path-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}
.path-item {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 12px;
  margin-bottom: 14px;
  display: flex;
  gap: 20px;
}
.path-number {
  font: 24px Manrope;
  color: #58a58d;
}
.path-item h2 {
  margin: 0;
  font-size: 20px;
}
.path-item p {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0 12px;
}
.path-lessons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.path-lessons a {
  background: #edf4f1;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 13px;
}
.side-note {
  background: var(--dark);
  color: #cbdedb;
  border-radius: 12px;
  padding: 28px;
  align-self: start;
}
.side-note h2 {
  font-size: 22px;
  color: #fff;
}
.side-note p {
  font-size: 14px;
  color: #9bb8b8;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
}
.stat strong {
  font: 40px Manrope;
  color: #3d8d77;
  display: block;
}
.stat span {
  font-size: 14px;
  color: var(--muted);
}
.progress-list {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.progress-row:last-child {
  border: 0;
}
.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
.project-banner {
  background: var(--dark);
  border-radius: 14px;
  padding: 32px;
  color: white;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.project-banner h2 {
  font: 28px Manrope;
}
.project-banner p {
  font-size: 14px;
  color: #a6bfcb;
}
.project-stage {
  background: #17303c;
  border-radius: 8px;
  padding: 20px;
}
.project-stage code {
  color: var(--mint);
  font: 12px "IBM Plex Mono";
  display: block;
  padding: 8px;
}
.project-stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.project-stages article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.project-stages h3 {
  font-size: 18px;
}
.project-stages p {
  font-size: 14px;
  color: var(--muted);
}
.notice {
  font-size: 13px;
  color: var(--muted);
  padding: 14px 0;
}
.inline-code {
  font-family: "IBM Plex Mono";
  font-size: 0.85em;
  background: #e6eeeb;
  padding: 2px 5px;
  border-radius: 3px;
}
.no-webgl {
  padding: 40px;
  color: #bad5d0;
  text-align: center;
}
.storage-warning {
  background: #fff0d8;
  padding: 12px;
  font-size: 13px;
}
.skip {
  position: absolute;
  top: -100px;
}
.skip:focus {
  top: 10px;
  left: 10px;
  z-index: 100;
  background: white;
  padding: 10px;
}
.loading-note {
  color: #a8c0bf;
  font-size: 13px;
  padding: 20px;
}
.lesson-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.lesson-links a {
  font-size: 13px;
  color: #438c80;
}
.sources {
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
}
.sources a {
  text-decoration: underline;
}
.output {
  overflow-wrap: anywhere;
}
.device-table {
  display: block;
  overflow: auto;
}
.device-table tbody,
.device-table thead {
  width: 100%;
}
.device-table td,
.device-table th {
  white-space: nowrap;
}
.trace.error {
  border-left: 3px solid #d89a78;
}
.card p,
.controls label,
.search input,
.future-item span {
  font-size: 14px;
}
.lesson-panel p {
  font-size: 16px;
}
@media (min-width: 1500px) {
  .lab-page {
    max-width: 1400px;
  }
  .network-view {
    height: 470px;
  }
}
@media (max-width: 1000px) {
  header {
    padding: 0 24px;
  }
  .brand small {
    display: none;
  }
  nav {
    gap: 18px;
  }
  .cards {
    gap: 14px;
  }
  .hero-copy {
    padding-left: 28px;
  }
  .hero h2 {
    font-size: 30px;
  }
  .lab-layout {
    grid-template-columns: 270px 1fr;
  }
  .future {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  header {
    height: auto;
    min-height: 76px;
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand {
    font-size: 23px;
  }
  nav {
    order: 3;
    width: 100%;
    overflow: auto;
    gap: 22px;
    font-size: 13px;
  }
  nav a {
    padding: 8px 0;
    white-space: nowrap;
  }
  .icon-button {
    margin-left: auto;
  }
  main {
    padding: 28px 18px 45px;
  }
  .intro {
    align-items: start;
  }
  .intro h1 {
    font-size: 28px;
  }
  .intro .number {
    display: none;
  }
  .hero {
    height: 530px;
    display: block;
  }
  .hero-copy {
    padding: 26px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .hero-copy > p:not(.eyebrow) {
    max-width: 260px;
  }
  .hero-stage {
    inset: 310px 0 0 0;
    opacity: 0.85;
  }
  .hero-tags {
    font-size: 9px;
    right: 15px;
  }
  .filterbar {
    flex-wrap: wrap;
    padding: 20px 0;
    gap: 0;
  }
  .filter {
    padding: 7px 11px;
    font-size: 13px;
  }
  .search {
    width: 100%;
    margin-top: 12px;
  }
  .search input {
    width: 100%;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card-visual {
    height: 210px;
  }
  .section-heading .desc {
    display: none;
  }
  .section-heading {
    gap: 10px;
  }
  .section-heading h2 {
    font-size: 19px;
  }
  .section-heading .en {
    font-size: 10px;
  }
  .future {
    grid-template-columns: 1fr 1fr;
  }
  .lab-layout {
    display: flex;
    flex-direction: column;
  }
  .lesson-panel {
    width: 100%;
  }
  .lesson-panel .steps {
    display: none;
  }
  .lesson-panel {
    padding: 20px;
  }
  .workarea {
    width: 100%;
  }
  .network-view {
    height: 330px;
  }
  .lab-head {
    flex-wrap: wrap;
  }
  .lab-head h1 {
    font-size: 20px;
  }
  .lab-head .lesson-tag {
    display: none;
  }
  .path-grid {
    grid-template-columns: 1fr;
  }
  .path-item {
    gap: 12px;
    padding: 18px;
  }
  .stat-grid {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat strong {
    font-size: 30px;
  }
  .stat span {
    font-size: 12px;
  }
  .project-banner {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .project-stages {
    grid-template-columns: 1fr;
  }
  .editor {
    font-size: 12px;
    padding: 16px;
  }
  .controls label {
    min-width: 120px;
  }
  .scene-legend {
    font-size: 10px;
  }
  .choices {
    flex-direction: column;
  }
  footer {
    padding: 22px;
    flex-direction: column;
    gap: 8px;
  }
  .progress-row {
    font-size: 14px;
  }
}
:root {
  color-scheme: light;
}
.course-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.course-path {
  min-width: 0;
}
.course-path > h2 {
  font-size: 28px;
}
.subsection-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin: 28px 0 16px;
}
.subsection-heading h3 {
  font-size: 18px;
}
.subsection-heading span,
.reference-strip {
  font-size: 14px;
  color: var(--muted);
}
.reference-strip {
  padding: 12px 16px;
  border-left: 3px solid #3caa92;
  background: #eff7f5;
}
.hero-secondary {
  display: block;
  margin-top: 16px;
  pointer-events: auto;
  color: #abd7cc;
}
.credits-panel {
  padding: 32px;
  background: white;
  border: 1px solid #dbe4e7;
  border-radius: 16px;
}
.credits-panel hr {
  border: 0;
  border-top: 1px solid #dbe4e7;
  margin: 32px 0;
}
.credits-panel a,
footer a {
  color: #297f73;
}
.input-panel {
  padding: 16px 20px;
  background: #f2f6f7;
}
.input-panel label {
  font-weight: 600;
}
.input-panel p {
  font-size: 14px;
  color: #566e79;
}
.input-panel textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #bbced4;
  border-radius: 8px;
  font: 16px monospace;
}
.module-editor {
  min-height: 140px;
}
.prompt-log {
  font-size: 14px;
  padding: 0 20px;
  background: #102532;
  color: #a3d7c9;
}
.expected-output {
  min-height: 0;
  max-height: 200px;
}
.test-result {
  padding: 8px 0;
  font-size: 14px;
}
.progress-list {
  margin: 30px 0;
}
.progress-list small {
  font-size: 16px;
  color: #607680;
}
.stat small {
  font-size: 18px;
}
.enhanced-view {
  height: 520px;
  position: relative;
  overflow: hidden;
  background: #0b1823;
}
.enhanced-view canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.live-concept {
  position: absolute;
  left: 20px;
  top: 52px;
  z-index: 3;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  background: #102b3be8;
  border: 1px solid #3b6374;
  border-radius: 10px;
  color: #e1f7f3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.live-concept span {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #7ce4c6;
}
.live-concept strong {
  font-size: 20px;
  overflow-wrap: anywhere;
}
.live-concept p {
  font-size: 14px;
  margin: 0;
  max-width: 440px;
}
.live-concept.changed {
  animation: concept-change 0.5s ease;
}
.device-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.device-label {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  background: #132e40ed;
  border: 1px solid #54839b;
  border-radius: 8px;
  color: white;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 8px 20px #0005;
  cursor: pointer;
  max-width: 210px;
}
.device-label strong {
  font-size: 13px;
}
.device-label span {
  font: 12px monospace;
  color: #9de5d5;
}
.device-label:hover,
.device-label.selected {
  border-color: #7ce4c6;
  background: #214a57;
}
.packet-label {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #7ce4c6;
  color: #092b32;
  font: 600 13px monospace;
  border-radius: 6px;
  padding: 6px 9px;
  box-shadow: 0 0 24px #7ce4c655;
}
.packet-label[hidden] {
  display: none;
}
.device-inspector {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  background: #eaf3f3;
  font-size: 14px;
  border-bottom: 1px solid #d3e3e5;
}
.lab-table {
  padding: 20px;
  background: #f2f6f7;
  overflow: auto;
}
.lab-table h3 {
  margin-top: 0;
}
.lab-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.lab-table th,
.lab-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #cfdee2;
}
.lab-table p {
  font-size: 14px;
}
.muted-row {
  opacity: 0.35;
  text-decoration: line-through;
}
.selected-route {
  background: #cfefe4;
}
.no-webgl {
  position: absolute;
  bottom: 50px;
  color: #fff;
  padding: 20px;
  font-size: 14px;
}
.concept-workbench {
  padding: 26px;
  background: #102431;
  color: #e2edf1;
  border-radius: 16px 16px 0 0;
}
.concept-workbench > p:not(.eyebrow) {
  color: #a9c1cd;
  font-size: 14px;
}
.concept-workbench h2 {
  font-size: 23px;
  margin: 10px 0;
}
.scenario-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}
.scenario-tab {
  border: 1px solid #426174;
  background: #1c3545;
  color: #d2e4ec;
  padding: 10px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.scenario-tab.active {
  background: #7ce4c6;
  border-color: #7ce4c6;
  color: #082d2e;
}
.concept-result {
  padding: 20px;
  border: 1px solid #477385;
  border-radius: 12px;
  background: #152e3d;
  margin-bottom: 20px;
  animation: concept-change 0.35s ease;
}
.concept-result.problem {
  border-color: #f1bb58;
}
.concept-result h3 {
  font: 600 21px monospace;
  color: #7ce4c6;
  overflow-wrap: anywhere;
}
.concept-result.problem h3 {
  color: #f1bb58;
}
.state-count {
  font-size: 13px;
  color: #b4cbd5;
}
.mechanism-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mechanism-field {
  border: 1px solid #345362;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0c1e29;
}
.mechanism-field span {
  font-size: 13px;
  color: #adc5d1;
}
.mechanism-field strong {
  font-size: 16px;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.state-explanation {
  padding-top: 14px;
  font-size: 16px;
  line-height: 1.8;
}
.bit-lab {
  padding: 18px;
  border: 1px solid #436679;
  border-radius: 12px;
}
.bit-lab input {
  margin-left: 12px;
  width: 100px;
  padding: 8px;
  border-radius: 6px;
  font: 16px monospace;
}
.bit-buttons {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin: 16px 0;
}
.bit {
  background: #243f50;
  border: 1px solid #496477;
  border-radius: 6px;
  color: #abc3ce;
  cursor: pointer;
  padding: 8px 3px;
}
.bit small {
  display: block;
  font-size: 12px;
}
.bit strong {
  display: block;
  font: 22px monospace;
  margin-top: 6px;
}
.bit.on {
  background: #7ce4c6;
  color: #123a3e;
  border-color: #7ce4c6;
}
.bit-values {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}
.bit-values strong {
  display: block;
  font: 20px monospace;
  color: #7ce4c6;
  margin-top: 6px;
}
@keyframes concept-change {
  from {
    opacity: 0.4;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 700px) {
  .course-paths {
    grid-template-columns: 1fr;
  }
  .subsection-heading {
    align-items: flex-start;
  }
  .subsection-heading h3 {
    font-size: 16px;
  }
  .enhanced-view {
    height: 480px;
  }
  .live-concept {
    top: 45px;
    left: 12px;
    padding: 10px;
    max-width: calc(100% - 24px);
  }
  .live-concept strong {
    font-size: 16px;
  }
  .live-concept p {
    font-size: 13px;
  }
  .device-label {
    padding: 5px;
    max-width: 150px;
  }
  .device-label strong {
    font-size: 12px;
  }
  .device-label span {
    font-size: 11px;
    white-space: normal;
  }
  .scene-legend {
    flex-direction: column;
  }
  .concept-workbench {
    padding: 18px;
  }
  .mechanism-fields {
    grid-template-columns: 1fr;
  }
  .concept-result {
    padding: 14px;
  }
  .concept-result h3 {
    font-size: 18px;
  }
  .lesson-links {
    flex-wrap: wrap;
    gap: 16px;
  }
  .bit-buttons {
    gap: 3px;
  }
  .credits-panel {
    padding: 22px;
  }
}
.layer-stack {
  margin: 20px 0;
}
.layer-stack > div {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  border: 1px solid #406277;
  background: #102431;
  font: 14px monospace;
}
.layer-stack .highlight {
  color: #102431;
  background: #7ce4c6;
}
.protocol-envelope {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.protocol-envelope > div {
  padding: 16px;
  border: 1px solid #79dac2;
  border-radius: 6px;
  background: #21414b;
  color: #d1f4e8;
  font: 14px monospace;
}
.topology-diagram {
  width: 100%;
  max-height: 230px;
  margin-bottom: 20px;
}
.address-allocation {
  display: flex;
  min-height: 100px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid #74b9aa;
  border-radius: 8px;
}
.address-allocation > div {
  padding: 14px 5px;
  background: #225665;
  border-right: 2px solid #102431;
  font: 13px monospace;
  overflow-wrap: anywhere;
}
.address-allocation > div:nth-child(2) {
  background: #486250;
}
.address-allocation > div:nth-child(3) {
  background: #625a3a;
}
.service-sequence {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.service-sequence > div {
  flex: 1;
  min-width: 100px;
  border: 1px solid #7ce4c6;
  border-radius: 8px;
  padding: 14px;
  background: #153f47;
  font: 13px monospace;
  overflow-wrap: anywhere;
}
.service-sequence span {
  display: block;
  color: #7ce4c6;
  font-size: 24px;
  margin-bottom: 5px;
}
.unavailable {
  opacity: 0.45;
  text-decoration: line-through;
}
.address-change {
  font: 18px monospace;
  color: #7ce4c6;
  overflow-wrap: anywhere;
}
.bundle-diagram {
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #709fad;
  border-radius: 16px;
}
.bundle-diagram > div {
  border-top: 4px solid #7ce4c6;
  padding: 12px;
  margin-bottom: 12px;
  font: 14px monospace;
}
.bundle-diagram strong {
  display: block;
  text-align: center;
  font-size: 14px;
}
.enhanced-view .scene-note,
.enhanced-view .scene-legend {
  z-index: 4;
  pointer-events: none;
}
.live-concept small {
  font-size: 14px;
  line-height: 1.6;
  max-width: 440px;
}
.enhanced-view .scene-legend {
  color: #c4dbe3;
}
.enhanced-view .scene-note {
  font-size: 12px;
  color: #92becd;
}
.device-label span {
  font-size: 12px;
}
.device-label span {
  white-space: normal;
  overflow-wrap: anywhere;
}
.device-label {
  max-width: 190px;
}
@media (max-width: 700px) {
  .device-label {
    width: 115px;
    max-width: 115px;
  }
  .device-label span {
    font-size: 12px;
  }
  .device-label strong {
    white-space: normal;
    font-size: 12px;
  }
}
.controls label {
  font-size: 14px;
  min-width: 0;
  flex: 1 1 180px;
}
.controls select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 700px) {
  .controls label {
    flex: 1 1 100%;
    min-width: 0;
  }
  .controls button {
    flex: 1 1 120px;
  }
}
.foundation-stage {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #0b1823;
  border-radius: 14px 14px 0 0;
}
.foundation-stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.foundation-status {
  position: absolute;
  z-index: 3;
  left: 18px;
  right: 18px;
  top: 16px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #102b3bed;
  border: 1px solid #3b6576;
  border-radius: 10px;
  padding: 12px 16px;
  color: #e3f5f0;
}
.foundation-status strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.foundation-status span {
  font-size: 14px;
  color: #b5d4df;
}
.foundation-tools {
  position: absolute;
  z-index: 4;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #a3c5d5;
}
.foundation-tools > span {
  font-size: 12px;
}
.foundation-tools label {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.foundation-tools select {
  max-width: 190px;
  padding: 8px;
  border-radius: 6px;
}
.foundation-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.foundation-label {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  max-width: 230px;
  background: #183244ed;
  border: 1px solid #5c8b9c;
  border-radius: 8px;
  padding: 7px 10px;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
}
.foundation-label strong {
  font-size: 14px;
}
.foundation-label span {
  font: 12px monospace;
  color: #badde4;
  overflow-wrap: anywhere;
}
.foundation-label.active {
  border-color: #7ce4c6;
  background: #24524f;
}
.foundation-label[hidden] {
  display: none;
}
.gateway-guide,
.gateway-report {
  padding: 24px;
  background: #f5faf9;
  color: #183d48;
  border: 1px solid #d5e3e3;
}
.gateway-guide h3,
.gateway-report h3 {
  margin: 0 0 12px;
}
.gateway-guide p,
.gateway-guide li,
.gateway-report p {
  font-size: 16px;
  line-height: 1.8;
}
.gateway-guide li + li {
  margin-top: 8px;
}
.gateway-report pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  background: #102a36;
  color: #bce8df;
  font: 14px/1.7 monospace;
  border-radius: 8px;
}
#gateway-observation,
#gateway-checklist {
  padding: 14px;
  background: #e0f1ec;
  margin-bottom: 20px;
  line-height: 1.8;
}
.card-visual canvas {
  pointer-events: none;
}
.card-visual [hidden] {
  display: none !important;
}
.lesson-card-preview {
  position: absolute;
  inset: 30px 16px 30px;
  color: #d0e9eb;
  overflow: hidden;
  font-size: 12px;
}
.lesson-card-preview pre {
  margin: 0;
  white-space: pre-wrap;
  font: 13px/1.6 monospace;
  color: #7ce4c6;
}
.preview-state-title {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  color: #7ce4c6;
}
.preview-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.preview-fields > div {
  border: 1px solid #487080;
  padding: 6px;
  border-radius: 6px;
}
.preview-fields span,
.preview-fields strong {
  display: block;
  overflow-wrap: anywhere;
}
.lesson-card-preview .topology-diagram {
  height: 140px;
  width: 100%;
  margin-bottom: 0;
}
.card-visual:has(.lesson-card-preview) {
  height: 230px;
}
.lesson-card-preview .service-sequence {
  gap: 4px;
  margin: 0;
}
.lesson-card-preview .service-sequence > div {
  padding: 6px;
  font-size: 11px;
  min-width: 0;
}
.lesson-card-preview .address-allocation,
.lesson-card-preview .bundle-diagram {
  margin: 0;
}
.lesson-card-preview .bundle-diagram {
  padding: 8px;
}
.lesson-card-preview .bundle-diagram > div {
  padding: 5px;
  margin-bottom: 5px;
  font-size: 12px;
}
.lesson-card-preview .address-allocation {
  min-height: 80px;
}
.lesson-card-preview .address-allocation > div {
  padding: 8px 4px;
  font-size: 12px;
}
.foundation-stage[data-variant="osi-model"] {
  height: 700px;
}
.foundation-stage + .concept-workbench {
  border-radius: 0;
}
@media (max-width: 700px) {
  .foundation-stage {
    height: 580px;
  }
  .foundation-label {
    width: 140px;
    max-width: 140px;
    padding: 5px;
  }
  .foundation-label strong {
    font-size: 12px;
  }
  .foundation-status strong {
    font-size: 16px;
  }
  .foundation-status span {
    font-size: 13px;
  }
  .foundation-tools > span {
    width: 100%;
  }
  .foundation-tools select {
    max-width: 165px;
  }
}
