:root {
  color-scheme: light;
  --paper: #faf8f3;
  --ink: #22282e;
  --muted: #565e65;
  --line: #d6d4cf;
  --leaf: #253647;
  --lime: #ffba8b;
  --serif: "Songti SC", "Noto Serif CJK SC", "STSong", Georgia, serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font:
    16px/1.65 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #aa4c20;
  outline-offset: 4px;
}
main:focus {
  outline: none;
}
.wrap {
  width: min(1100px, calc(100% - 80px));
  margin: auto;
}
.bar,
.brand,
nav,
.row,
.chips,
.related,
.tools,
.sample-head,
.instrument,
.switches,
.home-lower,
.filing {
  display: flex;
  align-items: center;
}
.bar {
  min-height: 78px;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-weight: 720;
  gap: 12px;
  white-space: nowrap;
}
.mark {
  display: grid;
  place-items: center;
  background: var(--leaf);
  color: var(--lime);
  font: 24px/1 system-ui;
  width: 36px;
  height: 36px;
  border-radius: 10px 2px 10px 2px;
}
.bar nav {
  gap: 22px;
}
nav a {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.65em 0;
}
nav a:hover,
nav a[aria-current] {
  color: var(--leaf);
  text-decoration: underline;
  text-underline-offset: 6px;
}
header {
  border-bottom: 1px solid var(--line);
}
main {
  padding: 56px 0 70px;
  min-height: calc(100vh - 224px);
}
.skip {
  position: absolute;
  top: -5rem;
  left: 1rem;
  background: white;
  padding: 10px;
  z-index: 5;
}
.skip:focus {
  top: 4px;
}
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(20px, 7vw, 92px);
  padding: 3px 0 48px;
}
.edition {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 16px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(3.7rem, 6.3vw, 6.1rem);
  line-height: 1.1;
  letter-spacing: -0.055em;
  margin: 0 0 22px;
}
.lead {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 42em;
}
.intro .lead {
  margin: 0;
}
.resume {
  margin-top: 18px;
}
.sample {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--leaf);
  color: #f5f8e7;
  padding: clamp(22px, 3.6vw, 42px);
  border-radius: 3px 38px 3px 3px;
  box-shadow: 6px 6px 0 #dbdeca;
}
.sample:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(#adc5a912 1px, transparent 1px),
    linear-gradient(90deg, #adc5a912 1px, transparent 1px);
  background-size: 23px 23px;
}
.sample-head {
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 650;
}
.live {
  color: var(--lime);
}
.instrument {
  gap: 12px;
  margin: 36px 0 20px;
  flex-wrap: wrap;
}
.switches {
  gap: 7px;
}
.switch {
  width: clamp(42px, 4.3vw, 58px);
  height: 74px;
  border: 1px solid #78917d;
  border-radius: 6px;
  color: #d7e5d3;
  background: #284d3a;
  font:
    2.15rem/1 ui-monospace,
    monospace;
}
.switch.on {
  background: var(--lime);
  color: var(--leaf);
  border-color: var(--lime);
}
.switch:hover {
  transform: translateY(-2px);
}
.readout {
  font:
    1.7rem/1 ui-monospace,
    monospace;
  white-space: nowrap;
}
.sample p {
  font-size: 0.94rem;
  margin: 0 0 14px;
  color: #dce7ce;
}
.sample-link {
  display: inline-block;
  color: #e2f4ac;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 0.3rem 0;
}
.choices,
.topic-grid,
.game-grid,
.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.choice,
.game-card,
.resource {
  border: 1px solid var(--line);
  background: #fdfcf6;
  border-radius: 12px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
}
.choice:hover,
.game-card:hover,
.chip:hover {
  border-color: #73907c;
  background: #f2f4e5;
}
.choice-icon,
.game-symbol {
  display: grid;
  place-items: center;
  background: #e6ecd7;
  color: var(--leaf);
  border-radius: 10px;
  flex: 0 0 50px;
  height: 50px;
  font:
    1.8rem/1 Georgia,
    serif;
}
.choice:nth-child(2n) .choice-icon {
  background: #efe3d4;
  color: #744128;
}
.choice strong {
  display: block;
  font-size: 1.2rem;
}
.choice small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.arrow {
  margin-left: auto;
  font-size: 1.3rem;
}
.home-lower,
.related {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding: 23px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.home-lower h2 {
  font-size: 1rem;
  margin: 0;
}
.chips,
.row {
  gap: 9px;
  flex-wrap: wrap;
}
.chip,
.action,
.sub-button,
.back,
.game-card {
  touch-action: manipulation;
}
.chip,
.action,
.sub-button,
.back {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 3px 16px;
  font-size: 0.9rem;
}
.chip.all {
  border: 0;
  color: #3c644c;
}
.action,
.sub-button {
  border-radius: 6px;
  font-weight: 620;
  line-height: 1.4;
  padding: 8px 14px;
}
.dark {
  background: var(--leaf);
  color: #fff;
}
.quiet,
.sub-button {
  background: transparent;
  border: 1px solid #a8b3a6;
}
.quiet[aria-pressed="true"] {
  color: var(--leaf);
  background: #e3edcf;
}
.back {
  color: var(--muted);
  padding-bottom: 6px;
}
.heading {
  margin: 0 0 28px;
}
.heading h1 {
  font: 700 clamp(2.4rem, 5.2vw, 4rem)/1.14 var(--serif);
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}
.heading .lead {
  margin: 0;
}
.game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.game-card {
  display: grid;
  gap: 7px;
  padding: 24px;
}
.game-card > span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}
.game-symbol {
  width: 55px;
  height: 50px;
  font-family: ui-monospace, monospace;
  margin-bottom: 8px;
}
.game-card strong {
  font-size: 1.15rem;
}
.steps {
  padding: 0;
  list-style: none;
  margin: 8px 0 28px;
}
.step {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.num {
  font:
    1.75rem Georgia,
    serif;
  color: #64745e;
}
.step h2 {
  font-size: 1.25rem;
  line-height: 1.45;
  margin: 0 0 6px;
}
.step p,
.resource p {
  margin: 6px 0 10px;
  color: var(--muted);
}
.repo,
.count {
  color: #5c6d5f;
  font-size: 0.9rem;
}
.repo {
  overflow-wrap: anywhere;
}
.share-control {
  margin-top: 12px;
}
.share-control input {
  width: min(430px, 100%);
  margin: 8px;
  padding: 6px;
}
.related a,
.route-after,
summary,
.filing a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.arcade {
  width: 100%;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffef9;
}
.after-game {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 15px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.after-game .share-control {
  margin: 0 0 0 auto;
}
.tools {
  gap: 10px;
  flex-wrap: wrap;
}
.tools input,
.tools select,
.copy-url {
  border: 1px solid #9ca898;
  background: #fffef9;
  padding: 8px 12px;
  border-radius: 6px;
  min-height: 44px;
}
.resource {
  padding: 15px 18px;
  min-width: 0;
}
.resource strong {
  display: block;
  overflow-wrap: anywhere;
}
.resource .edge {
  font-size: 0.88rem;
}
.results {
  margin-bottom: 24px;
}
details {
  margin: 20px 0;
}
.import-box {
  padding: 12px 0;
}
footer.wrap {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.filing {
  gap: 12px;
  flex-wrap: wrap;
}
.skip,
.sample-link,
.route-after,
summary {
  cursor: pointer;
}
#feedback:not(:empty) {
  position: fixed;
  bottom: 15px;
  right: 15px;
  z-index: 5;
  max-width: min(460px, 90vw);
  color: white;
  background: var(--leaf);
  border-radius: 5px;
  padding: 9px 16px;
}
@media (max-width: 800px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .hero {
    gap: 18px;
  }
  .sample {
    padding: 19px;
  }
  .instrument {
    margin: 20px 0;
  }
  .switch {
    width: 40px;
    height: 59px;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .choice {
    padding: 17px;
  }
  .bar nav {
    gap: 14px;
  }
}
@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 32px);
  }
  main {
    padding: 26px 0 44px;
  }
  .bar {
    min-height: 62px;
    gap: 8px;
    flex-wrap: wrap;
    padding: 7px 0;
  }
  .brand {
    gap: 6px;
  }
  .mark {
    width: 26px;
    height: 26px;
    font-size: 20px;
  }
  .bar nav {
    gap: 12px;
  }
  .bar nav a {
    font-size: 0.79rem;
    padding: 9px 0;
  }
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 4px 0 16px;
    gap: 18px;
  }
  .hero-title {
    font-size: clamp(2.05rem, 9vw, 2.75rem);
    margin: 0 0 10px;
  }
  .hero-title br {
    display: none;
  }
  .edition {
    margin: 0 0 8px;
  }
  .hero .lead {
    font-size: 1rem;
  }
  .sample {
    padding: 15px 18px;
    border-radius: 3px 20px 3px 3px;
  }
  .sample p {
    display: inline;
    font-size: 0.85rem;
  }
  .sample-link {
    font-size: 0.85rem;
    margin-left: 8px;
  }
  .switch {
    height: 45px;
    font-size: 1.55rem;
    width: 44px;
  }
  .instrument {
    margin: 11px 0;
  }
  .choices,
  .topic-grid,
  .results {
    grid-template-columns: 1fr;
  }
  .choice {
    padding: 13px 15px;
  }
  .choice-icon {
    height: 42px;
    flex-basis: 42px;
  }
  .game-card {
    padding: 15px;
  }
  .home-lower {
    margin-top: 20px;
  }
  .step {
    gap: 11px;
  }
  .filing {
    font-size: 0.78rem;
    gap: 6px;
  }
  .after-game .share-control {
    margin: 0;
  }
  .after-game {
    gap: 10px;
  }
  .find {
    width: 100%;
  }
  .game-grid {
    gap: 8px;
  }
  .resource .row {
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
  .switch:hover {
    transform: none;
  }
}

/* The visitor edition leads with one playable assignment and its finished specimen. */
.wrap {
  width: min(1240px, calc(100% - clamp(36px, 8vw, 128px)));
}
.bar {
  min-height: 72px;
}
.brand {
  letter-spacing: 0.03em;
  font-size: 1.05rem;
}
.brand .mark {
  width: 28px;
  height: 28px;
  background: #d94f2e;
  color: #fffaf2;
  border-radius: 4px;
  font-size: 22px;
  line-height: 1;
}
.bar nav {
  gap: clamp(14px, 2.8vw, 38px);
}
.bar nav a[aria-current] {
  color: #9a351e;
  text-decoration-thickness: 2px;
}
main {
  padding: 28px 0 60px;
}
.course-feature {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: #182329;
  color: #faf8f3;
  border-radius: 8px;
  isolation: isolate;
  overflow: hidden;
}
.feature-copy {
  position: relative;
  z-index: 1;
  padding: clamp(28px, 4vw, 64px);
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
}
.course-kicker {
  margin: 0 0 15px;
  color: #ffac86;
  letter-spacing: 0.1em;
  font-size: 0.86rem;
  font-weight: 700;
}
.course-title {
  margin: 0;
  font:
    750 clamp(2.65rem, 4.55vw, 5rem)/1.09 system-ui,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: -0.055em;
}
.course-title em {
  font-style: normal;
  color: #ff946b;
}
.feature-desc {
  margin: 16px 0 22px;
  color: #d7dfe2;
  max-width: 29em;
  font-size: 1rem;
}
.feature-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 21px;
}
.start-action {
  background: #ffad86;
  color: #282422;
  padding: 11px 19px;
  border-radius: 3px;
  font-weight: 750;
  white-space: nowrap;
}
.start-action:hover {
  background: #ffc4a7;
}
.second-action {
  color: #fffaf4;
  border-bottom: 1px solid #929d9e;
  padding: 6px 0;
}
.lead-poster {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 45%, #213a4c, #142630 78%);
  isolation: isolate;
  min-height: 330px;
  border-left: 1px solid #4a575d;
}
.lunar-image {
  position: absolute;
  top: 4%;
  right: -10%;
  height: 97%;
  width: auto;
  aspect-ratio: 1;
  max-width: none;
  object-fit: contain;
  mix-blend-mode: screen;
  user-select: none;
}
.poster-rule {
  position: absolute;
  z-index: 1;
  inset: 18px;
  border: 1px solid #ffffff38;
  pointer-events: none;
}
.specimen-title {
  position: absolute;
  left: 7.8%;
  bottom: 19%;
  color: white;
  font:
    800 clamp(2.25rem, 3.8vw, 4rem)/1.04 system-ui,
    sans-serif;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 13px #1119;
}
.specimen-meta {
  position: absolute;
  left: 8%;
  bottom: 10%;
  font:
    600 clamp(0.57rem, 0.85vw, 0.76rem)/1.3 ui-monospace,
    monospace;
  letter-spacing: 0.14em;
  color: #f5ece1;
}
.image-credit {
  position: absolute;
  right: 7%;
  bottom: 9%;
  color: #f0f0ee;
  font-size: 0.65rem;
  background: #14222bdb;
  padding: 2px 5px;
  border-radius: 2px;
}
.return-strip {
  display: block;
  background: #e9eee9;
  color: #213f36;
  border-left: 3px solid #527e6e;
  padding: 12px 17px;
  margin-bottom: 17px;
  font-weight: 700;
}
.section-block {
  margin-top: clamp(28px, 4vw, 55px);
}
.section-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-top h2,
.route-steps-title {
  margin: 0;
  letter-spacing: -0.025em;
  font:
    750 clamp(1.45rem, 2.2vw, 2.05rem)/1.3 system-ui,
    sans-serif;
}
.line-link,
.lab-enter {
  color: #963a23;
  font-weight: 650;
}
.line-link {
  font-size: 0.89rem;
}
.line-link:hover,
.second-action:hover,
.image-credit a:hover {
  text-decoration: underline;
}
.goal-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.goal-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 142px;
  padding: 18px 19px 22px;
  border: 1px solid #d8d6cf;
  border-top: 3px solid #b75032;
  background: #fffdf8;
  border-radius: 3px;
}
.goal-tile:nth-child(4n + 2) {
  border-top-color: #738983;
}
.goal-tile:nth-child(4n + 3) {
  border-top-color: #5b7490;
}
.goal-tile:nth-child(4n) {
  border-top-color: #ab8641;
}
.goal-tile strong {
  font:
    740 clamp(1.03rem, 1.35vw, 1.34rem)/1.4 system-ui,
    sans-serif;
  margin: 8px 18px 4px 0;
}
.goal-topic,
.lab-summary small {
  color: #685f52;
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.4;
}
.goal-result {
  font-size: 0.87rem;
  color: #52595d;
  line-height: 1.6;
}
.goal-arrow {
  position: absolute;
  right: 13px;
  top: 12px;
  color: #746963;
  font-size: 1rem;
}
.goal-tile:hover,
.featured-lab:hover {
  border-color: #a14c30;
  background: #fff;
}
.all-goals {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lab-shelf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.featured-lab {
  display: grid;
  grid-template-columns: minmax(125px, 0.93fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d6d4cf;
  border-radius: 4px;
  background: #fffdf8;
}
.lab-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 17px;
}
.lab-summary strong {
  font-size: 1.35rem;
  margin: 3px 0;
}
.lab-summary p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 2px 0 12px;
  line-height: 1.55;
}
.lab-enter {
  font-size: 0.86rem;
  margin-top: auto;
}
.lab-art {
  min-height: 172px;
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
}
.lab-art.layout {
  background: #182b36;
}
.poster-moon {
  position: absolute;
  right: -18%;
  height: 85%;
  top: 8%;
  mix-blend-mode: screen;
  max-width: none;
}
.poster-title {
  position: absolute;
  color: #fffaf2;
  bottom: 28%;
  left: 12%;
  font-size: clamp(1.45rem, 2.1vw, 2.4rem);
  line-height: 1;
  font-weight: 760;
}
.poster-caption {
  position: absolute;
  bottom: 13%;
  left: 12%;
  color: #ffba94;
  font:
    600 0.55rem/1.2 ui-monospace,
    monospace;
  letter-spacing: 0.1em;
}
.lab-art.signal {
  display: grid;
  place-items: center;
  background-color: #152c3a;
  background-image:
    linear-gradient(#ffffff0e 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0e 1px, transparent 1px);
  background-size: 14px 14px;
}
.network-print {
  width: 100%;
  height: auto;
}
.route-steps-title {
  margin: 28px 0 14px;
}
.outcome-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  background: #eef1ed;
  border-left: 3px solid #749382;
  padding: 14px 18px;
  color: #294437;
}
.lab-first {
  display: inline-block;
  margin: 12px 0 6px;
  color: #923b21;
  border-bottom: 1px solid #bf866c;
}
.heading h1 {
  font-family: system-ui, sans-serif;
  font-weight: 740;
  letter-spacing: -0.025em;
}
.sub-button,
.quiet {
  background: #fffdf8;
}
@media (max-width: 880px) {
  .goal-tiles,
  .all-goals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-copy {
    padding: 30px;
  }
  .lab-shelf {
    gap: 12px;
  }
  .featured-lab {
    grid-template-columns: 1fr;
  }
  .lab-art {
    min-height: 116px;
  }
}
@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 28px);
  }
  .bar {
    padding: 10px 0;
    gap: 4px 10px;
    min-height: 56px;
  }
  .bar nav {
    gap: 12px;
  }
  .bar nav a {
    font-size: 0.78rem;
  }
  .brand {
    font-size: 0.98rem;
  }
  main {
    padding: 14px 0 38px;
  }
  .course-feature {
    grid-template-columns: 1fr;
  }
  .feature-copy {
    padding: 22px 20px;
  }
  .course-title {
    font-size: clamp(2.05rem, 7.6vw, 2.75rem);
  }
  .course-title br {
    display: none;
  }
  .course-kicker {
    font-size: 0.76rem;
    margin-bottom: 8px;
  }
  .feature-desc {
    font-size: 0.92rem;
    margin: 9px 0 15px;
  }
  .start-action {
    padding: 9px 12px;
  }
  .feature-actions {
    font-size: 0.9rem;
    gap: 8px 13px;
  }
  .lead-poster {
    min-height: 145px;
    border-left: 0;
    border-top: 1px solid #43535b;
  }
  .lunar-image {
    height: 155%;
    right: 4%;
    top: -25%;
  }
  .poster-rule {
    inset: 9px;
  }
  .specimen-title {
    left: 5%;
    bottom: 28%;
    font-size: 2.25rem;
  }
  .specimen-meta {
    left: 5%;
    bottom: 12%;
  }
  .image-credit {
    right: 5%;
    bottom: 12%;
    font-size: 0.57rem;
  }
  .section-top {
    margin-bottom: 12px;
  }
  .goal-tiles,
  .all-goals {
    gap: 8px;
  }
  .goal-tile {
    padding: 14px 11px;
    min-height: 114px;
  }
  .goal-tile strong {
    margin: 6px 4px 4px 0;
    font-size: 1.04rem;
  }
  .goal-topic {
    font-size: 0.7rem;
  }
  .goal-arrow {
    display: none;
  }
  .goal-result {
    font-size: 0.79rem;
  }
  .section-block {
    margin-top: 27px;
  }
  .lab-shelf {
    grid-template-columns: 1fr;
  }
  .featured-lab {
    grid-template-columns: minmax(105px, 0.72fr) 1fr;
  }
  .lab-summary {
    padding: 15px;
  }
}
@media (max-width: 375px) {
  .brand {
    width: 100%;
  }
  .bar nav {
    width: 100%;
    justify-content: space-between;
  }
  .feature-actions {
    align-items: flex-start;
  }
  .line-link {
    font-size: 0.8rem;
  }
}
.external-games {
  margin-top: 34px;
}
.external-game {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding: 13px 3px;
}
.external-game span {
  color: var(--muted);
  font-size: 0.91rem;
}
.external-game .out-arrow {
  margin-left: auto;
}
.external-game:hover strong {
  text-decoration: underline;
}
.route-progress,
.route-finished {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.route-progress { margin: -6px 0 16px; }
.route-progress .count { margin: 0; }
.route-finished {
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 8px;
  background: #e7eee5;
  color: #294437;
}
.route-progress [hidden],
.route-finished[hidden] { display: none; }
.step {
  padding-inline: clamp(12px, 2vw, 24px);
  scroll-margin-top: 12px;
}
.step[aria-current="step"] {
  background: #eef1e9;
  border-left: 3px solid #496a4d;
  padding-left: calc(clamp(12px, 2vw, 24px) - 3px);
}
.step-text { min-width: 0; }
.route-step-state {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
}
.step[aria-current="step"] .route-step-state { color: var(--street-lime); }

/* Course views share the desk's day/night theme, including the game shell and catalog. */
:root {
  color-scheme: dark;
  --paper: var(--street-bg);
  --ink: var(--street-text);
  --muted: var(--street-muted);
  --line: var(--street-line);
  --leaf: var(--street-ice);
  --lime: var(--street-lime);
}
:root[data-theme="light"] { color-scheme: light; }
.course-world .wrap { width: min(1360px, 94%); }
.course-world header { background: color-mix(in srgb, var(--paper) 72%, transparent); }
.course-world .bar { min-height: 64px; }
.brand small {
  font: 500 .67rem var(--street-mono);
  color: var(--muted);
  letter-spacing: .06em;
}
.course-world .bar nav a[aria-current] { color: var(--street-ice); }
.course-world .goal-tile, .course-world .resource, .course-world .game-card, .course-world .featured-lab {
  background: var(--street-panel);
  border: 1px solid var(--line);
  border-radius: 0;
}
.course-world .goal-tile { border-top: 2px solid var(--street-ice); }
.course-world .goal-tile:hover, .course-world .game-card:hover, .course-world .featured-lab:hover {
  border-color: var(--street-ice);
  background: var(--street-raised);
}
.course-world .goal-topic, .course-world .goal-result, .course-world .goal-arrow,
.course-world .lab-summary small, .course-world .count, .course-world .repo {color: var(--muted);}
.course-world .line-link, .course-world .lab-enter, .course-world .route-after {color: var(--street-ice);}
.course-world .dark, .course-world .start-action {
  color: var(--street-active-ink);
  background: var(--street-active);
  border-radius: 0;
}
.course-world .quiet, .course-world .sub-button,
.course-world .tools input, .course-world .tools select, .course-world .copy-url {
  color: var(--ink);
  background: var(--street-panel);
  border: 1px solid var(--line);
  border-radius: 0;
}
.course-world .quiet[aria-pressed="true"], .course-world .game-symbol, .course-world .return-strip {
  color: var(--street-lime);
  background: var(--street-raised);
}
.course-world .return-strip {border-color: var(--street-lime);}
.course-world .course-feature {background: #122943; border-radius: 0;}
.course-world .course-title em, .course-world .course-kicker {color: #a6e8ff;}
.course-world .start-action:hover { background: #dbff8f; }
.course-world .arcade { background: var(--street-panel); border-radius: 0; }
.course-world .skip, .course-world #feedback:not(:empty) {
  background: var(--street-raised);
  color: var(--ink);
  border: 1px solid var(--line);
}
.course-world :focus-visible {outline: 3px solid var(--street-ice); outline-offset: 3px;}
.course-world .district-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 clamp(18px, 2.4vh, 28px);
}
.district-path {
  font: 700 .65rem/1.5 var(--street-mono);
  letter-spacing: .1em;
}
.district-path {color: var(--street-ice); display: flex; align-items: center; gap: 7px;}
.district-path::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--street-ice);
}
.district-path a {color: var(--muted);}
.district-path a:hover {text-decoration: underline;}
.district-intro h1 {
  margin: 9px 0 8px;
  color: var(--ink);
  font-weight: 850;
  font-size: clamp(2.35rem, 4.4vw, 4.2rem);
  letter-spacing: .015em;
  line-height: 1.15;
}
.district-intro p { margin: 0; color: var(--muted); font-size: .94rem; }
.district-progress { min-width: 160px; padding-bottom: 3px; text-align: right; }
.district-progress .count { font: 650 .8rem var(--street-mono); color: var(--ink); }
.district-meter { display: flex; gap: 5px; margin-top: 8px; }
.district-meter i {flex: 1; height: 5px; background: var(--line);}
.district-meter i.is-done {background: var(--street-lime);}
.district-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, .78fr);
  align-items: stretch;
  gap: 16px;
}
.district-map, .district-brief, .mission-queue .step {
  min-width: 0;
  background: var(--street-panel);
  border: 1px solid var(--line);
}
.district-map {display: flex; flex-direction: column;}
.district-map-heading, .district-map-foot, .mission-head, .brief-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.district-map-heading {padding: 11px 16px; border-bottom: 1px solid var(--line);}
.district-map-heading h2, .mission-head h2 {margin: 0; font-size: 1rem;}
.district-map-heading h2::before {content: "⌖"; margin-right: 9px; color: var(--street-lime);}
.district-scene {display: grid; align-content: center; background: #102642; flex: 1;}
.district-map-foot {border-top: 1px solid var(--line); padding: 8px 16px; color: var(--muted); font-size: .72rem;}
.district-map-foot span::before {content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: var(--street-lime);}
.district-brief {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(17px, 1.75vw, 27px);
  background: linear-gradient(125deg, var(--street-raised), var(--street-panel) 62%);
}
.district-brief::before, .mission-queue .step.is-selected::before {
  content: ""; position: absolute; top: -1px; left: -1px; height: 3px; width: 46px;
  background: var(--street-ice);
}
.brief-station {display: block; color: var(--street-ice); font: 600 .77rem/1.5 var(--street-mono); margin-top: 4px;}
.brief-number {color: var(--muted); opacity: .64; font: 750 clamp(2.1rem, 3vw, 3.1rem)/1 var(--street-mono); letter-spacing: -.08em;}
.brief-title {font-size: clamp(1.36rem, 2.15vw, 2.1rem); line-height: 1.35; margin: 15px 0 8px; text-wrap: balance;}
.brief-title:focus:not(:focus-visible) {outline: none;}
.brief-task, .brief-goal {margin: 0; font-size: .9rem; line-height: 1.72;}
.brief-task {color: var(--muted);}
.brief-objective {border-left: 2px solid var(--street-ice); padding: 3px 0 3px 12px; margin: clamp(14px, 2.2vw, 30px) 0;}
.brief-objective small {display: block; color: var(--muted); font-size: .69rem; font-weight: 680; margin-bottom: 2px;}
.brief-goal {font-size: .85rem;}
.brief-actions {margin-top: auto; display: grid; gap: 7px;}
.brief-open, .brief-mark {display: flex; align-items: center; min-height: 43px; padding: 8px 12px; line-height: 1.45; font-weight: 700;}
.brief-open {
  justify-content: space-between;
  border: 1px solid var(--line);
  background: var(--street-raised);
  color: var(--ink);
  font-size: .83rem;
}
.brief-open::after, .mission-controls .repo::after {content: "↗"; color: var(--street-ice); margin-left: 4px;}
.brief-open:hover {border-color: var(--street-ice);}
.brief-mark {justify-content: center; background: var(--street-active); color: var(--street-active-ink); border: 1px solid var(--street-active); font-size: .9rem;}
.brief-mark[aria-pressed="true"] {background: var(--street-panel); color: var(--street-lime); border-color: var(--street-lime);}
.brief-next {justify-self: center; padding: 6px; border: 0; background: none; color: var(--street-ice); font-weight: 650;}
.mission-head {margin: 20px 0 9px;}
.mission-head .sub-button {border: 0; background: none; color: var(--street-ice); min-height: 30px; padding: 4px; font-size: .78rem;}
.mission-head [hidden], .brief-actions [hidden] {display: none;}
.mission-queue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 0 0 18px;
}
.mission-queue .step, .mission-queue .step[aria-current="step"] {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line); background: var(--street-panel);
}
.mission-queue .step.is-selected {background: var(--street-raised); border-color: var(--street-ice);}
.mission-queue .step.is-selected::before {width: 35px; background: var(--street-lime);}
.mission-top {display: flex; gap: 11px; align-items: center;}
.mission-queue .num {border: 1px solid var(--line); padding: 7px 5px; color: var(--street-ice); font: 700 1rem/1.2 var(--street-mono);}
.mission-queue .is-selected .num {color: var(--street-lime); border-color: var(--street-lime);}
.mission-queue h3 {margin: 0; font-size: .94rem; line-height: 1.45;}
.mission-select {color: var(--ink);}
.mission-select:hover {text-decoration: underline;}
.mission-queue .route-step-state {margin: 2px 0 0; font-size: .72rem; font-weight: 500; color: var(--muted);}
.mission-controls {margin-top: auto; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; gap: 9px;}
.mission-controls .repo {font: .69rem/1.4 var(--street-mono); min-width: 0; color: var(--muted);}
.mission-controls .repo:hover {color: var(--street-ice);}
.mission-controls .quiet {white-space: nowrap; min-height: 30px; padding: 3px 6px; font-size: .72rem; font-weight: 550;}
.course-world .route-finished, .course-world .outcome-note {
  border-radius: 0; color: var(--ink); background: var(--street-panel);
  border-left: 3px solid var(--street-lime); font-size: .88rem;
}
.course-world .route-finished {margin-bottom: 12px;}
.course-world .related {margin-top: 18px; font-size: .85rem;}
.course-world .related .share-control {margin: 0 0 0 auto;}
.course-world .related .sub-button {min-height: 34px; font-size: .77rem;}
@media (max-width: 760px) {
  .course-world .wrap {width: calc(100% - 28px);}
  .district-stage {grid-template-columns: 1fr; gap: 12px;}
  .district-intro h1 {font-size: clamp(2.1rem, 6.4vw, 3rem);}
  .district-intro p {font-size: .85rem;}
  .district-progress {min-width: 104px;}
  .district-map-heading {padding: 8px 12px;}
  .district-map-foot {padding: 6px 12px;}
  .district-brief {padding: 16px;}
  .brief-title {margin: 9px 0 4px;}
  .brief-objective {margin: 12px 0;}
  .mission-queue {grid-template-columns: 1fr; gap: 8px;}
  .mission-queue .step {gap: 8px;}
  .mission-controls .quiet {min-height: 36px;}
}
@media (max-width: 520px) {
  .course-world .bar {min-height: auto; gap: 4px; padding: 8px 0 0;}
  .course-world .brand {width: 100%; gap: 8px;}
  .course-world .bar nav {width: 100%; justify-content: space-between;}
  .course-world .district-intro {align-items: flex-start; gap: 8px; margin-bottom: 14px;}
  .district-intro h1 {font-size: clamp(1.84rem, 7.2vw, 2.24rem);}
  .district-intro p {line-height: 1.55;}
  .district-progress {min-width: 82px; align-self: flex-start; margin-top: 29px; white-space: nowrap;}
  .district-progress .count {font-size: .65rem;}
  .district-meter {gap: 4px; margin-top: 5px;}
  .course-world .related .share-control {width: 100%;}
}
.brief-help {margin: 7px 0 0; color: var(--muted); font-size: .75rem;}
.brief-help summary {padding: 4px 0; width: fit-content;}
.brief-help p {margin: 7px 0;}
.brief-help a {color: var(--street-ice); text-decoration: underline; text-underline-offset: 3px;}
.course-world .outcome-note {align-items: center; gap: 5px 24px;}
.outcome-note h2 {margin: 1px 0; font-size: 1.1rem; line-height: 1.4;}
.outcome-note small, .outcome-note p {color: var(--muted);}
.outcome-note p {margin: 0;}
.resource .edge {overflow-wrap: anywhere;}
.import-box input, .tools input, .tools select {max-width: 100%;}
