:root {
  color-scheme: dark;
  --bg: #081316;
  --panel: #0e1c20;
  --panel-hover: #14292d;
  --text: #edf6f4;
  --muted: #91a8ab;
  --line: #24373b;
  --accent: #89edc8;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button:hover:not(:disabled) {
  background: var(--panel-hover);
}
button[aria-pressed="true"] {
  color: var(--accent);
}
[hidden] {
  display: none !important;
}
.mobile-only {
  display: none;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  padding: 14px;
  background: var(--accent);
  color: var(--bg);
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.site-header {
  height: 74px;
  margin: 0 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.13em;
  font-size: 0.875rem;
  font-weight: 750;
  white-space: nowrap;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 34px;
  border: 1px solid #6e968c;
  border-radius: 5px 11px 5px 5px;
  color: var(--accent);
  font-size: 21px;
  letter-spacing: -3px;
  font-weight: 850;
}
.brand-mark span {
  font-size: 26px;
}
.brand-divider {
  height: 19px;
  width: 1px;
  background: var(--line);
  margin: 0 6px;
}
.header-section {
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 27px;
  font-size: 0.875rem;
  color: #b8cbcd;
}
.site-header nav span {
  font-size: 16px;
  margin-left: 5px;
  color: #789d95;
}
.github-link {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.explorer {
  max-width: 2000px;
  margin: 0 auto;
  padding: 0 32px;
  height: calc(100dvh - 74px);
  min-height: 720px;
  display: flex;
  flex-direction: column;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 25px 0 26px;
  flex-shrink: 0;
}
.eyebrow {
  margin: 0 0 12px;
  font: 500 0.75rem var(--mono);
  letter-spacing: 0.13em;
  color: #a8bdb9;
  display: flex;
  align-items: center;
  gap: 9px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px #84edc844;
  flex-shrink: 0;
}
h1 {
  font-size: clamp(1.7rem, 2.25vw, 2.4rem);
  font-weight: 480;
  letter-spacing: -0.045em;
  margin: 0 0 9px;
  line-height: 1.1;
}
.intro-copy {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.intro-meta {
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
}
.edition {
  font: 400 0.75rem var(--mono);
  letter-spacing: 0.08em;
  color: #adbfbc;
}
.edition span {
  margin-left: 15px;
  color: var(--accent);
  border: 1px solid #36534b;
  padding: 4px 7px;
  border-radius: 3px;
}
.intro-meta p {
  margin: 16px 0 0;
}
.preview-tag {
  display: block;
  margin-top: 6px;
  color: #6f9290;
}
.workspace {
  position: relative;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr) 300px;
  gap: 16px;
  flex: 1;
  min-height: 390px;
}
.panel {
  background: linear-gradient(145deg, #122226bb, #0b181cbb);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.systems-panel {
  display: flex;
  flex-direction: column;
  padding: 17px 10px 8px;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 13px;
}
.panel-heading h2 {
  font-size: 0.875rem;
  font-weight: 550;
  margin: 0;
}
.count {
  font: 400 0.75rem var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 6px;
}
.all-systems {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #18322e;
  color: var(--accent);
  padding: 13px 10px;
  font-size: 0.875rem;
  border: 1px solid #31554a;
  border-radius: 5px;
  white-space: nowrap;
  text-align: left;
  margin-bottom: 13px;
}
.all-systems span:first-child {
  font-size: 20px;
}
.all-systems span:last-child {
  margin-left: auto;
}
.all-systems[aria-pressed="false"] {
  color: var(--muted);
  border-color: var(--line);
  background: none;
}
.system-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 12px 9px;
  border-radius: 5px;
  border: 1px solid transparent;
  position: relative;
}
.system-row.selected {
  background: #18302f;
  border-color: #2b4b43;
}
.system-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--system-color);
  flex-shrink: 0;
}
.system-name {
  font-size: 0.875rem;
  line-height: 1.4;
}
.system-count {
  font: 400 0.75rem var(--mono);
  color: #6b8b8d;
  margin-left: auto;
}
.system-arrow {
  font-size: 17px;
  color: #739994;
}
.systems-foot {
  margin-top: auto;
  padding: 21px 10px 9px;
  color: var(--muted);
}
.small-label {
  font: 400 0.75rem var(--mono);
  letter-spacing: 0.1em;
  color: #87a29f;
}
.path-key {
  font-size: 0.75rem;
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.path-key i {
  display: inline-block;
  width: 13px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.systems-foot p {
  font-size: 0.75rem;
  line-height: 1.65;
  color: #759394;
  margin: 9px 0 0;
}
.understand-link {
  padding: 14px 8px 8px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #a4bfba;
  line-height: 1.5;
}
.stage {
  position: relative;
  min-width: 0;
  min-height: 390px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #16333188, transparent 68%);
  border: 1px solid #22383b66;
  border-radius: 9px;
}
.stage-top {
  position: absolute;
  left: 19px;
  right: 19px;
  top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 3;
  pointer-events: none;
}
.breadcrumb {
  font-size: 0.75rem;
  color: #9bb3b2;
  display: flex;
  align-items: center;
  gap: 9px;
}
.breadcrumb span {
  color: #456865;
}
.breadcrumb button {
  font-size: inherit;
  padding: 0;
  pointer-events: auto;
}
.stage-mode {
  font: 400 0.625rem var(--mono);
  letter-spacing: 0.1em;
  color: #70938d;
  white-space: nowrap;
}
.scene-host {
  position: absolute;
  /* Depth-sorted labels must stay below the surrounding menus and controls. */
  isolation: isolate;
  inset: 35px 0 125px;
  overflow: hidden;
  touch-action: none;
}
.scene-host canvas {
  display: block;
  cursor: grab;
  touch-action: none;
}
.scene-host canvas:active {
  cursor: grabbing;
}
.scene-loading {
  position: absolute;
  top: 40%;
  left: 10%;
  right: 10%;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
  z-index: 5;
}
.scene-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  line-height: 1.35;
  font-weight: 450;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: #081618d9;
  border: 1px solid #49615b55;
  border-radius: 4px;
  color: #c6d9d4;
  box-shadow: 0 4px 16px #02090950;
  max-width: 190px;
  transition: border-color 0.2s;
}
.scene-label:hover,
.scene-label.selected {
  border-color: var(--system-color);
  color: #fff;
  background: #16302d;
}
.label-dot {
  width: 5px;
  height: 5px;
  background: var(--system-color);
  border-radius: 50%;
  flex-shrink: 0;
}
.component-label {
  font-size: 0.875rem;
  white-space: normal;
  text-align: left;
}
.stage-annotation {
  position: absolute;
  top: 52px;
  left: 20px;
  display: flex;
  gap: 7px;
  align-items: center;
  font: 400 0.625rem var(--mono);
  color: #799992;
  pointer-events: none;
}
.annotation-divider {
  margin: 0 4px;
  color: #39534f;
}
.view-controls {
  position: absolute;
  right: 15px;
  bottom: 135px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b191ce6;
  z-index: 4;
}
.icon-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border-radius: 4px;
  flex-shrink: 0;
}
.divider {
  width: 1px;
  height: 27px;
  background: var(--line);
  display: inline-block;
  flex-shrink: 0;
}
.view-controls .divider {
  width: 20px;
  height: 1px;
  margin: 4px 0;
}
.orbit-hint {
  position: absolute;
  bottom: 100px;
  left: 10px;
  right: 10px;
  text-align: center;
  margin: 0;
  color: #6c918a;
  font: 400 0.625rem var(--mono);
  letter-spacing: 0.075em;
  pointer-events: none;
}
.orbit-hint span {
  margin: 0 7px;
  color: #435c55;
}
.explosion-dock {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 17px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  border: 1px solid #385349;
  border-radius: 7px;
  background: linear-gradient(145deg, #19312eee, #0e2022ee);
  box-shadow: 0 6px 30px #0003;
}
.dock-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.625rem;
  color: #aac3bc;
  padding: 2px 6px;
  border-radius: 4px;
  min-height: 44px;
}
.dock-button > span:first-child {
  font-size: 23px;
  color: var(--accent);
  line-height: 1;
}
.explosion-control {
  flex: 1;
  min-width: 50px;
}
.explosion-control > div {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  gap: 8px;
  margin-bottom: 4px;
}
.explosion-control output {
  font: 400 0.75rem var(--mono);
  color: var(--accent);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 18px;
  margin: 0;
  cursor: ew-resize;
}
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.labels-control {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #b1c5c0;
  cursor: pointer;
  min-height: 40px;
}
.inspector {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #344c49 transparent;
}
.detail-head {
  padding: 18px 19px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: 400 0.75rem var(--mono);
  letter-spacing: 0.04em;
  color: #8fa9a2;
}
.detail-head .icon-button {
  margin: -8px -7px -8px 0;
  color: #859f97;
}
.detail-body {
  padding: 0 20px 20px;
}
.detail-body h2 {
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 460;
  letter-spacing: -0.035em;
  margin: 4px 0 10px;
}
.detail-subtitle {
  color: var(--system-color, var(--accent));
  font: 400 0.75rem var(--mono);
  line-height: 1.65;
  margin: 0 0 19px;
}
.detail-description {
  font-size: 0.875rem;
  line-height: 1.8;
  color: #b7cac5;
  margin: 0 0 19px;
}
.detail-facts {
  margin: 0 0 19px;
  padding: 0;
  list-style: none;
}
.detail-facts li {
  font-size: 0.75rem;
  line-height: 1.75;
  color: #96b1a9;
  padding-left: 12px;
  position: relative;
  margin-top: 10px;
}
.detail-facts li:before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.inspect-action {
  border: 1px solid #3c6656;
  background: #17392e;
  color: #a3f0cc;
  border-radius: 5px;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 13px;
  width: 100%;
  margin: 5px 0 21px;
}
.inside-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.child-list {
  padding: 8px 0;
}
.child-row {
  font-size: 0.75rem;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 3px;
  text-align: left;
  border-radius: 4px;
  color: #b4c9c2;
}
.child-row span:last-child {
  color: #628c7c;
}
.source-details {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 15px;
}
.source-details summary {
  font-size: 0.75rem;
  color: #a4bbb4;
  cursor: pointer;
  padding: 4px 0;
}
.source-link {
  display: block;
  margin-top: 11px;
  font: 400 0.6875rem var(--mono);
  overflow-wrap: anywhere;
  line-height: 1.65;
  color: #87bba8;
}
.source-link span {
  display: block;
  color: #668a7c;
  font-size: 0.625rem;
}
.source-note {
  font-size: 0.75rem;
  color: #78998c;
  line-height: 1.7;
  margin: 12px 0 0;
}
.connection-row {
  display: block;
  width: 100%;
  padding: 9px 0;
  font-size: 0.75rem;
  text-align: left;
  line-height: 1.6;
  color: #95b5a7;
}
.connection-row span {
  display: block;
  color: #6e9082;
  font-size: 0.75rem;
}
.welcome-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border: 1px solid #3c6356;
  background: #173329;
  border-radius: 10px;
  margin: 10px 0 22px;
  color: var(--accent);
  font-size: 26px;
}
.welcome-path {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 24px 0;
}
.welcome-path div {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.875rem;
  color: #b1c9bf;
  padding: 10px 0;
}
.welcome-path div + div:before {
  content: "";
  position: absolute;
  left: 9px;
  top: -7px;
  width: 1px;
  height: 14px;
  background: #355e4d;
}
.welcome-path div {
  position: relative;
}
.welcome-path span {
  width: 19px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #315544;
  border-radius: 4px;
  font: 400 0.625rem var(--mono);
  color: var(--accent);
}
.welcome-note {
  font-size: 0.75rem;
  line-height: 1.8;
  color: #789a8b;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.journey-panel {
  display: flex;
  align-items: center;
  gap: 27px;
  margin-top: 17px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0e1d20;
  flex-shrink: 0;
  min-height: 118px;
}
.journey-picker {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 195px;
  border-right: 1px solid var(--line);
  padding-right: 24px;
}
select {
  color: #d9e9e2;
  border: 0;
  border-radius: 2px;
  background: #0e1d20;
  font-size: 0.875rem;
  margin-left: -3px;
  padding: 2px 0;
  cursor: pointer;
  max-width: 100%;
}
.simulation-note {
  font: 400 0.625rem var(--mono);
  color: #78968b;
}
.journey-main {
  flex: 1;
  min-width: 0;
}
.journey-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.journey-title > span:first-child {
  font: 400 0.625rem var(--mono);
  color: #86a799;
  white-space: nowrap;
}
.journey-title h2 {
  font-size: 0.875rem;
  font-weight: 550;
  margin: 0;
}
.run-state {
  font: 400 0.625rem var(--mono);
  color: var(--accent);
  background: #17382c;
  border: 1px solid #2a523e;
  padding: 3px 6px;
  border-radius: 3px;
  margin-left: auto;
}
.journey-main p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: #99b3a7;
  margin: 8px 0 9px;
  min-height: 20px;
}
.step-track {
  display: flex;
  align-items: center;
  gap: 5px;
}
.step-track button {
  flex: 1;
  height: 12px;
  border-radius: 0;
  padding: 4px 0;
  position: relative;
}
.step-track button:after {
  content: "";
  display: block;
  background: #294138;
  height: 3px;
  border-radius: 1px;
}
.step-track button.complete:after {
  background: #658f78;
}
.step-track button.current:after {
  background: var(--accent);
  box-shadow: 0 0 8px #7ae1b555;
}
.journey-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.autoplay-button {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 6px 14px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.autoplay-button[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
}
.journey-actions .icon-button {
  font-size: 19px;
}
.play-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--accent);
  color: #10271d;
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 12px 15px;
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 137px;
  white-space: nowrap;
}
.play-button:hover:not(:disabled) {
  background: #aff9da;
  color: #0d251c;
}
.play-button > span:first-child {
  font-size: 11px;
}
.explorer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0 15px;
  font: 400 0.625rem var(--mono);
  color: #729184;
  flex-shrink: 0;
}
.explorer-footer a {
  color: #9bbbaa;
  margin-left: 10px;
}
.no-script {
  position: fixed;
  inset: 20%;
  z-index: 30;
  padding: 30px;
  background: #163329;
  border: 1px solid var(--accent);
  line-height: 1.7;
}
.no-script a {
  text-decoration: underline;
}
@media (min-width: 1600px) {
  .workspace {
    grid-template-columns: 240px minmax(0, 1fr) 330px;
    gap: 20px;
  }
  .system-row {
    padding-block: 14px;
  }
  .detail-body {
    padding: 0 24px 25px;
  }
  .detail-description {
    font-size: 1rem;
  }
  .detail-facts li,
  .child-row {
    font-size: 0.875rem;
  }
  .stage-mode,
  .stage-annotation,
  .orbit-hint {
    font-size: 0.75rem;
  }
}
@media (max-width: 1200px) {
  .site-header {
    margin-inline: 22px;
  }
  .explorer {
    padding-inline: 22px;
  }
  .workspace {
    grid-template-columns: 188px minmax(0, 1fr) 265px;
    gap: 11px;
  }
  .systems-panel {
    padding-inline: 6px;
  }
  .system-row {
    gap: 8px;
    padding-inline: 6px;
  }
  .all-systems {
    padding-inline: 8px;
    font-size: 0.75rem;
  }
  .detail-body {
    padding-inline: 17px;
  }
  .detail-head {
    padding-inline: 17px;
  }
  .detail-body h2 {
    font-size: 1.4rem;
  }
  .stage-mode {
    display: none;
  }
  .explosion-dock {
    gap: 8px;
    left: 9px;
    right: 9px;
    padding: 10px 9px;
  }
  .dock-button {
    padding-inline: 1px;
  }
  .explosion-dock > .divider {
    display: none;
  }
  .labels-control {
    flex-direction: column;
    gap: 0;
    font-size: 0.625rem;
  }
  .journey-panel {
    gap: 18px;
    padding-inline: 16px;
  }
  .journey-picker {
    min-width: 177px;
    padding-right: 16px;
  }
  .journey-actions {
    gap: 1px;
  }
  .play-button {
    padding-inline: 11px;
    min-width: 117px;
  }
  .journey-title {
    gap: 8px;
  }
  .intro-meta {
    display: none;
  }
}
@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: 172px minmax(0, 1fr) 240px;
    gap: 8px;
  }
  .explorer {
    padding-inline: 16px;
  }
  .site-header {
    margin-inline: 16px;
  }
  .system-name {
    font-size: 0.75rem;
  }
  .system-count {
    display: none;
  }
  .all-systems {
    font-size: 0.75rem;
    gap: 6px;
  }
  .system-row {
    padding-block: 12px;
  }
  .stage-annotation {
    font-size: 0.625rem;
    left: 12px;
  }
  .breadcrumb {
    font-size: 0.6875rem;
  }
  .stage-top {
    left: 12px;
    right: 12px;
  }
  .scene-label {
    font-size: 0.625rem;
    gap: 4px;
    padding: 4px;
  }
  .orbit-hint {
    font-size: 0.5rem;
  }
  .journey-title > span:first-child {
    display: none;
  }
  .run-state {
    display: none;
  }
  .detail-description {
    font-size: 0.875rem;
    line-height: 1.65;
  }
  .detail-body {
    padding-inline: 14px;
  }
  .journey-main p {
    font-size: 0.75rem;
  }
  .explorer-footer > span:last-of-type {
    display: none;
  }
}
@media (max-width: 800px) {
  .explorer {
    height: auto;
    min-height: calc(100dvh - 62px);
    padding: 0 16px;
  }
  .site-header {
    height: 62px;
    gap: 10px;
  }
  .header-section,
  .brand-divider,
  .github-link {
    display: none;
  }
  .brand {
    font-size: 0.75rem;
    gap: 8px;
  }
  .site-header nav {
    gap: 16px;
    font-size: 0.75rem;
  }
  .brand-mark {
    width: 28px;
    height: 30px;
  }
  .intro {
    padding: 23px 0 20px;
  }
  .eyebrow {
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
  }
  h1 {
    font-size: 1.7rem;
  }
  .intro-copy {
    font-size: 0.875rem;
    max-width: 290px;
  }
  .workspace {
    display: block;
    min-height: 440px;
    flex: none;
  }
  .stage {
    height: clamp(440px, 56dvh, 650px);
  }
  .systems-panel {
    display: none;
    position: fixed;
    z-index: 30;
    top: 78px;
    left: 16px;
    bottom: 20px;
    width: 260px;
    padding: 18px 12px;
    background: #102226;
    box-shadow: 0 0 0 100vmax #0008;
  }
  .systems-panel.open {
    display: flex;
  }
  .system-name {
    font-size: 0.875rem;
  }
  .system-count {
    display: block;
  }
  .system-row {
    padding: 14px 9px;
  }
  .all-systems {
    font-size: 0.875rem;
  }
  .mobile-only {
    display: inline-flex;
  }
  .inspector {
    display: none;
    position: fixed;
    z-index: 25;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-height: 60dvh;
    background: #102326;
    box-shadow: 0 -16px 90px #0009;
  }
  .inspector.open {
    display: block;
  }
  .detail-body h2 {
    font-size: 1.6rem;
  }
  .detail-description {
    font-size: 1rem;
    line-height: 1.7;
  }
  .detail-facts li,
  .child-row {
    font-size: 0.875rem;
  }
  .detail-body {
    padding: 0 20px 20px;
  }
  .detail-head {
    padding: 20px 20px 12px;
  }
  .detail-head .icon-button {
    width: 44px;
    height: 44px;
  }
  .component-label,
  .scene-label {
    font-size: 0.75rem;
    padding: 6px;
  }
  .scene-host {
    inset: 40px 0 119px;
  }
  .stage-top {
    top: 16px;
    left: 15px;
  }
  .stage-annotation {
    left: 15px;
    font-size: 0.625rem;
    top: 45px;
  }
  .view-controls {
    right: 10px;
    bottom: 127px;
  }
  .icon-button {
    width: 40px;
    height: 40px;
  }
  .explosion-dock {
    padding: 12px;
    gap: 12px;
    bottom: 13px;
    left: 11px;
    right: 11px;
  }
  .dock-button {
    font-size: 0.75rem;
    min-width: 45px;
  }
  .explosion-control > div {
    font-size: 0.875rem;
  }
  .labels-control {
    font-size: 0.75rem;
  }
  .orbit-hint {
    font-size: 0.5625rem;
    bottom: 105px;
  }
  .journey-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 17px 15px;
    margin-top: 12px;
  }
  .journey-picker {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    border: 0;
    gap: 14px;
    padding: 0;
    min-width: 0;
  }
  .journey-picker label {
    font-size: 0.625rem;
  }
  .journey-picker select {
    font-size: 0.875rem;
    flex: 1;
  }
  .simulation-note {
    display: none;
  }
  .journey-main {
    grid-column: 1 / -1;
  }
  .journey-title h2 {
    font-size: 1rem;
  }
  .journey-title > span:first-child {
    display: inline;
  }
  .journey-main p {
    font-size: 0.875rem;
    line-height: 1.65;
  }
  .step-track button {
    height: 20px;
  }
  .journey-actions {
    grid-column: 1 / -1;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }
  .journey-actions .icon-button {
    width: 44px;
    height: 44px;
  }
  .play-button {
    min-height: 44px;
  }
  .autoplay-button {
    min-height: 44px;
  }
  .explorer-footer {
    font-size: 0.625rem;
    line-height: 1.6;
  }
  .explorer-footer button {
    font-size: 0.875rem;
    padding: 10px;
    border: 1px solid #34584a;
    border-radius: 5px;
    color: var(--accent);
    white-space: nowrap;
    min-height: 44px;
  }
  .source-link {
    font-size: 0.75rem;
  }
  .source-link span {
    font-size: 0.6875rem;
  }
}
@media (max-width: 390px) {
  .site-header nav a:first-child {
    display: none;
  }
  h1 {
    font-size: 1.5rem;
  }
  .explosion-dock {
    gap: 7px;
    padding: 10px;
  }
  .dock-button {
    min-width: 40px;
    font-size: 0.625rem;
  }
  .labels-control {
    font-size: 0.625rem;
  }
  .explosion-control > div {
    font-size: 0.75rem;
  }
  .stage-annotation .annotation-divider,
  .stage-annotation > span:last-child {
    display: none;
  }
  .stage {
    height: 440px;
  }
  .scene-label {
    font-size: 0.625rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
/* Keep the complete working surface visible on laptop-height viewports. */
@media (min-width: 801px) {
  button.mobile-only {
    display: none;
  }
  .explorer {
    min-height: 0;
  }
  .scene-host {
    bottom: 116px;
  }
}
@media (min-width: 801px) and (max-height: 850px) {
  .site-header {
    height: 64px;
  }
  .explorer {
    height: calc(100dvh - 64px);
    min-height: 600px;
  }
  .intro {
    padding: 18px 0 20px;
  }
  .intro-copy {
    font-size: 0.875rem;
  }
  .eyebrow {
    margin-bottom: 9px;
  }
  h1 {
    font-size: 1.8rem;
  }
  .workspace {
    min-height: 335px;
  }
  .stage {
    min-height: 335px;
  }
  .systems-foot,
  .understand-link {
    display: none;
  }
  .systems-panel {
    padding-top: 12px;
  }
  .panel-heading {
    padding-bottom: 10px;
  }
  .all-systems {
    padding-block: 9px;
    margin-bottom: 6px;
  }
  .system-row {
    padding-block: 8px;
  }
  .system-name {
    font-size: 0.875rem;
  }
  .journey-panel {
    min-height: 107px;
    padding-block: 13px;
    margin-top: 12px;
  }
  .explorer-footer {
    padding-block: 10px;
  }
  .welcome-icon,
  .welcome-path,
  .welcome-note {
    display: none;
  }
  .detail-body > h2 {
    margin-top: 12px;
  }
  .detail-description {
    margin-bottom: 17px;
  }
  .inspector .detail-head {
    padding-top: 16px;
  }
  .scene-host {
    inset: 38px 0 106px;
  }
  .explosion-dock {
    bottom: 12px;
    padding-block: 9px;
  }
  .orbit-hint {
    bottom: 92px;
  }
  .view-controls {
    bottom: 118px;
  }
  .stage-annotation {
    top: 42px;
  }
}
.label-index {
  display: none;
}
.stage-systems {
  pointer-events: auto;
  border: 1px solid #375b4b;
  border-radius: 4px;
  padding: 7px 9px;
  color: var(--accent);
  background: #10251f;
  font-size: 0.75rem;
}
@media (max-width: 800px) {
  .intro-copy {
    display: none;
  }
  .intro {
    padding: 21px 0;
  }
  .workspace {
    min-height: 340px;
  }
  .stage {
    height: clamp(340px, 46dvh, 440px);
    min-height: 340px;
  }
  .stage-top {
    align-items: center;
    top: 10px;
    pointer-events: none;
  }
  .stage-top .stage-systems {
    display: inline-flex;
    pointer-events: auto;
    min-height: 40px;
  }
  .breadcrumb {
    font-size: 0.6875rem;
  }
  .stage-annotation {
    top: 51px;
  }
  .scene-host {
    inset: 55px 0 114px;
  }
  .system-label .label-title {
    display: none;
  }
  .system-label .label-index {
    display: inline;
    font: 500 0.75rem var(--mono);
  }
  .system-label {
    padding: 5px 6px;
  }
  .component-label {
    max-width: 105px;
    font-size: 0.75rem;
  }
  .journey-panel {
    gap: 9px;
    padding: 14px 15px;
  }
  .journey-main p {
    margin-bottom: 3px;
  }
  .explorer-footer {
    min-height: 36px;
  }
  .view-controls {
    bottom: 124px;
  }
  .view-controls .icon-button {
    width: 34px;
    height: 34px;
  }
  .orbit-hint {
    font-size: 0.5rem;
  }
}
@media (min-width: 801px) and (max-height: 1000px) {
  .welcome-icon {
    display: none;
  }
  .welcome-path {
    margin: 15px 0;
  }
  .welcome-path div {
    padding: 7px 0;
  }
  .welcome-note {
    margin: 15px 0 0;
    padding-top: 12px;
  }
}
@media (min-width: 801px) and (max-height: 850px) {
  .system-count {
    display: none;
  }
  .system-row {
    padding-block: 6px;
  }
  .systems-panel {
    padding-top: 10px;
  }
  .system-name {
    flex: 1;
    min-width: 0;
  }
}

/* Teaching controls share the catalogue and preserve the 3D inspection surface. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.intro-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.start-task,
.basics-button {
  border: 1px solid #375b50;
  border-radius: 5px;
  padding: 10px 13px;
  font-size: 0.8rem;
  white-space: nowrap;
}
.start-task {
  background: #173c30;
  color: #a3f4d5;
}
.start-task span,
.basics-button span {
  margin-left: 12px;
}
.basics-button {
  color: var(--muted);
  border-color: var(--line);
}
.intro-meta {
  display: none;
}
.search-label {
  font: 500 0.625rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 9px 8px 7px;
}
.resource-search,
#focused-view {
  width: calc(100% - 12px);
  min-height: 34px;
  margin: 0 6px 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: #0a181b;
  font-size: 0.7rem;
}
.resource-search::placeholder {
  color: #789395;
}
.search-result {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.search-result strong {
  font-size: 0.8rem;
  font-weight: 500;
}
.search-result span {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.45;
}
.search-empty {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
  padding: 8px;
}
#external-context {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin: 10px 0 20px;
  color: var(--muted);
}
#external-context button {
  padding: 2px;
  font-size: 0.65rem;
  text-align: left;
}
#external-context button.active {
  color: var(--accent);
  text-decoration: underline;
}
.detail-tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.detail-tabs button {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 0.75rem;
  border-radius: 4px;
}
.detail-tabs button[aria-selected="true"] {
  color: var(--accent);
  background: #19352e;
}
.resource-contract {
  margin: 0 0 20px;
}
.resource-contract dt {
  font: 500 0.65rem var(--mono);
  text-transform: uppercase;
  color: var(--accent);
  margin: 20px 0 7px;
  letter-spacing: 0.05em;
}
.resource-contract dd {
  margin: 0;
  font-size: 0.8rem;
  color: #becfce;
  line-height: 1.7;
}
.step-handoff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
  margin-top: 9px;
  font-size: 0.73rem;
}
.handoff-kind {
  color: #b2c5e8;
  font: 500 0.56rem var(--mono);
  letter-spacing: 0.04em;
  border: 1px solid #334454;
  padding: 3px 5px;
  border-radius: 3px;
}
.handoff-kind[data-kind="data"] {
  color: #ddc395;
  border-color: #574d38;
}
.handoff-kind[data-kind="access"] {
  color: #d2b5e7;
}
.handoff-kind[data-kind="recovery"] {
  color: #e9b296;
}
.handoff-route {
  color: #d5e8e2;
}
.handoff-route b {
  padding: 0 5px;
  color: var(--accent);
}
.handoff-payload {
  color: var(--muted);
  flex-basis: 100%;
  font-size: 0.7rem;
  line-height: 1.5;
}
.step-inspection {
  display: flex;
  margin-top: 4px;
}
.step-inspection:has(button:not([hidden])) {
  margin-bottom: 1px;
}
.step-inspection button {
  color: var(--accent);
  font-size: 0.7rem;
  padding: 4px 0;
  text-align: left;
}
.journey-panel {
  flex-shrink: 0;
}
.journey-main {
  min-width: 0;
}
.journey-title {
  flex-wrap: wrap;
}
#step-description {
  line-height: 1.55;
}
#concepts-dialog {
  color: var(--text);
  background: #102226;
  border: 1px solid #3a5b54;
  border-radius: 12px;
  max-width: 740px;
  width: calc(100% - 32px);
  max-height: 85dvh;
  padding: 28px;
  scrollbar-width: thin;
}
#concepts-dialog::backdrop {
  background: #020c10bb;
  backdrop-filter: blur(6px);
}
.concepts-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.concepts-heading h2 {
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 12px 0;
}
.concepts-intro,
#concept-list p {
  color: #b4c8c6;
  font-size: 0.85rem;
  line-height: 1.7;
}
#concept-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
}
#concept-list section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  min-width: 0;
}
#concept-list h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 8px 0;
  color: var(--accent);
}
#concept-list .source-details {
  margin-top: 12px;
}
[data-view="inventory"] .component-label {
  width: 108px;
  max-width: 108px;
  white-space: normal;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  font-size: 0.63rem;
  line-height: 1.25;
  padding: 5px 4px;
}
.label-system {
  display: none;
}
[data-view="inventory"] .label-system {
  display: block;
  color: var(--muted);
  font: 400 0.5rem var(--mono);
}
.handoff-endpoint {
  border-color: var(--accent);
  box-shadow: 0 0 15px #89edc825;
}
.breadcrumb {
  flex-wrap: wrap;
}
@media (min-width: 801px) and (max-height: 850px) {
  .intro {
    padding: 14px 0;
  }
  .intro h1 {
    font-size: 1.6rem;
  }
  .workspace,
  .stage {
    min-height: 300px;
  }
  .journey-panel {
    padding-block: 10px;
  }
  .journey-main p {
    font-size: 0.72rem;
    margin-block: 6px;
  }
  .step-handoff {
    margin-top: 5px;
  }
  .search-label {
    margin-top: 5px;
  }
  .resource-search,
  #focused-view {
    min-height: 29px;
    padding-block: 5px;
    margin-bottom: 4px;
  }
}
@media (max-width: 1100px) and (min-width: 801px) {
  .intro-actions {
    gap: 5px;
  }
  .start-task,
  .basics-button {
    padding: 9px;
  }
  .start-task span,
  .basics-button span {
    margin-left: 5px;
  }
}
@media (max-width: 800px) {
  .intro {
    flex-wrap: wrap;
    gap: 13px;
    padding: 17px 0;
  }
  .intro-actions {
    width: 100%;
    margin: 0;
  }
  .start-task {
    flex: 1;
    text-align: left;
    display: flex;
    justify-content: space-between;
  }
  .start-task,
  .basics-button {
    min-height: 40px;
  }
  .system-label.active-system .label-title {
    display: inline;
  }
  .system-label.active-system .label-index {
    display: none;
  }
  .handoff-endpoint {
    max-width: 114px;
    white-space: normal;
    text-align: center;
  }
  .run-state {
    display: inline;
    font-size: 0.6rem;
  }
  .journey-title h2 {
    flex: 1;
  }
  .journey-main p {
    font-size: 0.78rem;
  }
  .step-handoff {
    margin-top: 9px;
  }
  .step-inspection button {
    font-size: 0.75rem;
    min-height: 36px;
  }
  #concepts-dialog {
    padding: 20px;
  }
  #concept-list {
    grid-template-columns: 1fr;
  }
  .breadcrumb {
    max-width: calc(100% - 106px);
    line-height: 1.4;
  }
  [data-view="inventory"] .component-label {
    width: 76px;
    max-width: 76px;
    font-size: 9px;
    padding: 3px;
  }
  [data-view="inventory"] .label-system {
    font-size: 7px;
  }
  .resource-search,
  #focused-view {
    font-size: 0.8rem;
    min-height: 40px;
  }
}
@media (min-width: 801px) {
  #system-list,
  #search-results {
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
    flex: 1;
    flex-shrink: 1;
  }
  .systems-panel > :not(#system-list):not(#search-results) {
    flex-shrink: 0;
  }
  .system-row {
    min-height: 32px;
    padding-block: 8px;
  }
  .systems-foot,
  .understand-link {
    display: none;
  }
}
@media (min-width: 801px) and (max-height: 850px) {
  .panel-heading {
    padding-bottom: 7px;
  }
  .all-systems {
    min-height: 30px;
    padding-block: 6px;
    margin-bottom: 0;
  }
  .system-row {
    min-height: 26px;
    padding-block: 5px;
  }
  .search-label {
    margin-block: 5px;
  }
}
@media (max-width: 800px) {
  .stage:has([data-view="inventory"]) {
    height: 1060px;
  }
  [data-view="inventory"] canvas {
    touch-action: pan-y !important;
  }
  [data-view="inventory"] .component-label {
    width: 92px;
    max-width: 92px;
    font-size: 11px;
    line-height: 1.35;
  }
  [data-view="inventory"] .label-system {
    font-size: 9px;
  }
}
.system-row.outside-view {
  opacity: 0.45;
}
@media (max-width: 800px) {
  .stage:has([data-view="inventory"]) .scene-host {
    bottom: 164px;
  }
  .stage:has([data-view="inventory"]) .view-controls {
    flex-direction: row;
    right: 50%;
    transform: translateX(50%);
    bottom: 122px;
  }
}
