/* Game Engine I week 2 foundations lab.
   Shared shape rule: 6px content surfaces, 4px compact controls. */

html.game-engine-foundations-root {
  scroll-behavior: auto;
}

body.course-game-engine-1.game-engine-foundations {
  --lab-tint: color-mix(in srgb, var(--accent-soft) 38%, var(--paper));
  --lab-tint-strong: color-mix(in srgb, var(--accent-soft) 68%, var(--paper));
  --lab-dark: color-mix(in srgb, var(--ink-strong) 90%, var(--accent));
  --lab-coral: #c75f4f;
  --lab-blue: #3d6f8f;
  --lab-green: #476f59;
}

body.course-game-engine-1.game-engine-foundations .foundations-hero .hero-inner {
  min-height: min(660px, calc(100dvh - 58px));
}

body.course-game-engine-1.game-engine-foundations .foundations-hero h1 {
  max-width: 560px;
}

body.course-game-engine-1.game-engine-foundations .foundations-hero-visual img {
  object-position: 50% 50%;
}

body.course-game-engine-1.game-engine-foundations .lab-finish-line {
  background: color-mix(in srgb, var(--lab-tint) 80%, var(--paper));
}

body.course-game-engine-1.game-engine-foundations .concept-stack {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr) 48px minmax(0, 1fr) 48px minmax(0, 1.08fr);
  gap: 0;
  align-items: stretch;
}

body.course-game-engine-1.game-engine-foundations .concept-stack article {
  min-height: 220px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .concept-stack-accent {
  border-color: var(--ot-rule-strong);
  background: var(--lab-tint);
}

body.course-game-engine-1.game-engine-foundations .concept-stack article > span,
body.course-game-engine-1.game-engine-foundations .asset-instance-model > div > span,
body.course-game-engine-1.game-engine-foundations .window-map article > span,
body.course-game-engine-1.game-engine-foundations .project-contract span,
body.course-game-engine-1.game-engine-foundations .hierarchy-rules article > span,
body.course-game-engine-1.game-engine-foundations .prefab-model span,
body.course-game-engine-1.game-engine-foundations .prefab-proof article > span,
body.course-game-engine-1.game-engine-foundations .play-mode-sequence article > span,
body.course-game-engine-1.game-engine-foundations .play-mode-test > div > span {
  display: block;
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.045em;
  line-height: 1.35;
}

body.course-game-engine-1.game-engine-foundations .concept-stack article strong {
  margin: auto 0 12px;
  display: block;
  color: var(--ink-strong);
  font-size: 19px;
  line-height: 1.25;
}

body.course-game-engine-1.game-engine-foundations .concept-stack article p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

body.course-game-engine-1.game-engine-foundations .concept-connector {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

body.course-game-engine-1.game-engine-foundations .concept-connector::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 1px;
  background: var(--ot-rule-strong);
  transform: translateY(-50%);
  z-index: -1;
}

body.course-game-engine-1.game-engine-foundations .concept-connector {
  background: var(--bg);
  background-clip: content-box;
}

body.course-game-engine-1.game-engine-foundations .asset-instance-model {
  margin-top: 26px;
  padding: 1px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
  gap: 1px;
  align-items: stretch;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
}

body.course-game-engine-1.game-engine-foundations .asset-instance-model > div:not(.model-arrow) {
  padding: 26px;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .asset-instance-model .instance-side {
  background: var(--lab-tint);
}

body.course-game-engine-1.game-engine-foundations .asset-instance-model h3 {
  margin: 9px 0 8px;
}

body.course-game-engine-1.game-engine-foundations .asset-instance-model p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

body.course-game-engine-1.game-engine-foundations .asset-instance-model code {
  display: block;
  overflow-wrap: anywhere;
}

body.course-game-engine-1.game-engine-foundations .model-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lab-dark);
  color: var(--bg);
  font-size: 25px;
}

body.course-game-engine-1.game-engine-foundations .window-map {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
}

body.course-game-engine-1.game-engine-foundations .window-map article {
  min-height: 178px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  grid-column: span 4;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .window-map .window-scene {
  min-height: 222px;
  grid-column: span 7;
  background: var(--lab-dark);
}

body.course-game-engine-1.game-engine-foundations .window-map .window-game {
  min-height: 222px;
  grid-column: span 5;
  background: var(--lab-tint-strong);
}

body.course-game-engine-1.game-engine-foundations .window-map .window-console {
  background: color-mix(in srgb, var(--lab-coral) 9%, var(--paper));
}

body.course-game-engine-1.game-engine-foundations .window-map h3 {
  margin: 10px 0 10px;
}

body.course-game-engine-1.game-engine-foundations .window-map p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

body.course-game-engine-1.game-engine-foundations .window-map small {
  margin-top: 22px;
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

body.course-game-engine-1.game-engine-foundations .window-map .window-scene > span,
body.course-game-engine-1.game-engine-foundations .window-map .window-scene h3,
body.course-game-engine-1.game-engine-foundations .window-map .window-scene p,
body.course-game-engine-1.game-engine-foundations .window-map .window-scene small {
  color: var(--bg);
}

body.course-game-engine-1.game-engine-foundations .micro-exercise {
  margin-top: 24px;
  padding: 24px 26px;
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  background: var(--ot-tint-soft);
}

body.course-game-engine-1.game-engine-foundations .micro-exercise > span {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
}

body.course-game-engine-1.game-engine-foundations .micro-exercise h3 {
  margin: 0 0 11px;
}

body.course-game-engine-1.game-engine-foundations .micro-exercise ol {
  margin: 0;
  padding-left: 21px;
}

body.course-game-engine-1.game-engine-foundations .micro-exercise li + li {
  margin-top: 7px;
}

body.course-game-engine-1.game-engine-foundations .shortcut-strip {
  margin-top: 20px;
  padding: 1px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
}

body.course-game-engine-1.game-engine-foundations .shortcut-strip > div {
  min-height: 74px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations kbd {
  min-width: 34px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 740;
  line-height: 1.1;
  white-space: nowrap;
}

body.course-game-engine-1.game-engine-foundations .shortcut-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

body.course-game-engine-1.game-engine-foundations .project-contract {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

body.course-game-engine-1.game-engine-foundations .project-contract > div {
  min-height: 152px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  grid-column: span 6;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(3) {
  grid-column: span 4;
  background: var(--lab-tint);
}

body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(4) {
  grid-column: span 8;
  background: var(--lab-dark);
}

body.course-game-engine-1.game-engine-foundations .project-contract strong {
  margin-top: 16px;
  display: block;
  color: var(--ink-strong);
  font-size: 18px;
}

body.course-game-engine-1.game-engine-foundations .project-contract p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(4) span,
body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(4) strong,
body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(4) p {
  color: var(--bg);
}

body.course-game-engine-1.game-engine-foundations .project-create-steps {
  margin: 28px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  list-style: none;
  overflow: hidden;
}

body.course-game-engine-1.game-engine-foundations .project-create-steps li {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .project-create-steps li + li {
  border-top: 1px solid var(--line);
}

body.course-game-engine-1.game-engine-foundations .project-create-steps li:nth-child(even) {
  background: var(--ot-tint-soft);
}

body.course-game-engine-1.game-engine-foundations .project-create-steps li > span {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 760;
}

body.course-game-engine-1.game-engine-foundations .project-create-steps strong {
  color: var(--ink-strong);
}

body.course-game-engine-1.game-engine-foundations .project-create-steps p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .mission-handoff {
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

body.course-game-engine-1.game-engine-foundations .mission-handoff article {
  min-width: 0;
  padding: 24px 22px;
}

body.course-game-engine-1.game-engine-foundations .mission-handoff article:nth-child(even) {
  border-left: 1px solid var(--line);
}

body.course-game-engine-1.game-engine-foundations .mission-handoff article:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

body.course-game-engine-1.game-engine-foundations .mission-handoff span {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

body.course-game-engine-1.game-engine-foundations .mission-handoff h3 {
  margin: 8px 0 7px;
  color: var(--ink-strong);
  font-size: 16px;
  line-height: 1.35;
}

body.course-game-engine-1.game-engine-foundations .mission-handoff p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .mission-handoff-footer {
  padding: 20px 0 0;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

body.course-game-engine-1.game-engine-foundations .mission-handoff-footer p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .mission-handoff-footer strong {
  color: var(--ink-strong);
}

body.course-game-engine-1.game-engine-foundations .mission-handoff-footer a {
  min-height: 44px;
  padding: 11px 15px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 730;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

body.course-game-engine-1.game-engine-foundations .mission-handoff-footer a:active {
  transform: scale(0.97);
}

body.course-game-engine-1.game-engine-foundations .hierarchy-layout {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: 24px;
  align-items: stretch;
}

body.course-game-engine-1.game-engine-foundations .scene-tree {
  padding: 26px;
  border-radius: 6px;
  background: var(--lab-dark);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
}

body.course-game-engine-1.game-engine-foundations .scene-tree > span {
  display: block;
  margin-bottom: 14px;
  color: color-mix(in srgb, var(--bg) 72%, transparent);
  font-size: 11px;
  font-weight: 700;
}

body.course-game-engine-1.game-engine-foundations .scene-tree ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}

body.course-game-engine-1.game-engine-foundations .scene-tree > ul {
  padding-left: 0;
}

body.course-game-engine-1.game-engine-foundations .scene-tree li {
  position: relative;
  padding-left: 16px;
}

body.course-game-engine-1.game-engine-foundations .scene-tree li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.8em;
  width: 8px;
  height: 1px;
  background: color-mix(in srgb, var(--bg) 42%, transparent);
}

body.course-game-engine-1.game-engine-foundations .scene-tree strong {
  color: var(--bg);
}

body.course-game-engine-1.game-engine-foundations .hierarchy-rules {
  padding: 1px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
}

body.course-game-engine-1.game-engine-foundations .hierarchy-rules article {
  min-height: 170px;
  padding: 23px;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .hierarchy-rules .hierarchy-rule-accent {
  grid-column: 1 / -1;
  min-height: 150px;
  background: var(--lab-tint);
}

body.course-game-engine-1.game-engine-foundations .hierarchy-rules h3 {
  margin: 12px 0 8px;
}

body.course-game-engine-1.game-engine-foundations .hierarchy-rules p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .transform-test {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 120px repeat(2, minmax(0, 1fr));
  gap: 24px;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .transform-test > span {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
}

body.course-game-engine-1.game-engine-foundations .transform-test h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

body.course-game-engine-1.game-engine-foundations .transform-test p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .sorting-explainer {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 28px;
  align-items: stretch;
}

body.course-game-engine-1.game-engine-foundations .sorting-stage {
  min-height: 390px;
  padding: 46px 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--lab-dark);
  perspective: 700px;
  overflow: hidden;
}

body.course-game-engine-1.game-engine-foundations .sorting-plane {
  min-height: 84px;
  padding: 18px 22px;
  border: 1px solid color-mix(in srgb, var(--bg) 35%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--bg);
  transform: rotateX(54deg) rotateZ(-3deg);
  transform-origin: center;
}

body.course-game-engine-1.game-engine-foundations .sorting-plane + .sorting-plane {
  margin-top: -26px;
}

body.course-game-engine-1.game-engine-foundations .plane-foreground {
  z-index: 3;
  background: color-mix(in srgb, var(--lab-coral) 78%, var(--lab-dark));
}

body.course-game-engine-1.game-engine-foundations .plane-actors {
  z-index: 2;
  background: color-mix(in srgb, var(--lab-blue) 82%, var(--lab-dark));
}

body.course-game-engine-1.game-engine-foundations .plane-background {
  z-index: 1;
  background: color-mix(in srgb, var(--lab-green) 82%, var(--lab-dark));
}

body.course-game-engine-1.game-engine-foundations .sorting-plane span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 760;
}

body.course-game-engine-1.game-engine-foundations .sorting-plane strong {
  font-size: 12px;
  text-align: right;
}

body.course-game-engine-1.game-engine-foundations .sorting-copy {
  padding: 1px;
  display: grid;
  gap: 1px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
}

body.course-game-engine-1.game-engine-foundations .sorting-copy article {
  padding: 23px;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .sorting-copy article:nth-child(2) {
  background: var(--lab-tint);
}

body.course-game-engine-1.game-engine-foundations .sorting-copy h3 {
  margin: 0 0 8px;
}

body.course-game-engine-1.game-engine-foundations .sorting-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .sorting-contract {
  margin-top: 24px;
  padding: 1px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
}

body.course-game-engine-1.game-engine-foundations .sorting-contract > div {
  min-height: 120px;
  padding: 17px;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .sorting-contract > div:nth-child(odd) {
  background: var(--ot-tint-soft);
}

body.course-game-engine-1.game-engine-foundations .sorting-contract span,
body.course-game-engine-1.game-engine-foundations .sorting-contract strong {
  display: block;
}

body.course-game-engine-1.game-engine-foundations .sorting-contract span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

body.course-game-engine-1.game-engine-foundations .sorting-contract strong {
  margin-top: 14px;
  color: var(--ink-strong);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .sorting-contract p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

body.course-game-engine-1.game-engine-foundations .prefab-model {
  margin-top: 30px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) 110px minmax(0, 1.28fr);
  gap: 0;
  align-items: center;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .prefab-asset {
  min-height: 210px;
  padding: 26px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--lab-dark);
}

body.course-game-engine-1.game-engine-foundations .prefab-asset span,
body.course-game-engine-1.game-engine-foundations .prefab-asset strong,
body.course-game-engine-1.game-engine-foundations .prefab-asset p {
  color: var(--bg);
}

body.course-game-engine-1.game-engine-foundations .prefab-asset strong {
  margin-top: 15px;
  font-size: 19px;
}

body.course-game-engine-1.game-engine-foundations .prefab-asset p {
  margin: 8px 0 0;
  font-size: 12px;
}

body.course-game-engine-1.game-engine-foundations .prefab-links {
  height: 170px;
  position: relative;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
}

body.course-game-engine-1.game-engine-foundations .prefab-links::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: var(--ot-rule-strong);
}

body.course-game-engine-1.game-engine-foundations .prefab-links span {
  width: 100%;
  height: 1px;
  background: var(--ot-rule-strong);
}

body.course-game-engine-1.game-engine-foundations .prefab-instances {
  display: grid;
  gap: 9px;
}

body.course-game-engine-1.game-engine-foundations .prefab-instances article {
  padding: 16px 19px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .prefab-instances article:nth-child(2) {
  background: var(--lab-tint);
}

body.course-game-engine-1.game-engine-foundations .prefab-instances strong {
  color: var(--ink-strong);
  font-size: 14px;
}

body.course-game-engine-1.game-engine-foundations .prefab-instances p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

body.course-game-engine-1.game-engine-foundations .prefab-proof {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
}

body.course-game-engine-1.game-engine-foundations .prefab-proof article {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .prefab-proof article:last-child {
  background: var(--lab-tint);
}

body.course-game-engine-1.game-engine-foundations .prefab-proof h3 {
  margin: 18px 0 9px;
}

body.course-game-engine-1.game-engine-foundations .prefab-proof p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .play-mode-sequence {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 12px;
}

body.course-game-engine-1.game-engine-foundations .play-mode-sequence article {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .play-mode-sequence .play-mode-active {
  border-color: var(--ot-rule-strong);
  background: var(--lab-dark);
}

body.course-game-engine-1.game-engine-foundations .play-mode-sequence h3 {
  margin: 50px 0 10px;
}

body.course-game-engine-1.game-engine-foundations .play-mode-sequence p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .play-mode-active span,
body.course-game-engine-1.game-engine-foundations .play-mode-active h3,
body.course-game-engine-1.game-engine-foundations .play-mode-active p {
  color: var(--bg);
}

body.course-game-engine-1.game-engine-foundations .play-mode-test {
  margin-top: 24px;
  padding: 26px;
  border-left: 4px solid var(--lab-coral);
  border-radius: 0 6px 6px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.9fr);
  gap: 28px;
  align-items: center;
  background: color-mix(in srgb, var(--lab-coral) 8%, var(--paper));
}

body.course-game-engine-1.game-engine-foundations .play-mode-test h3 {
  margin: 10px 0 7px;
}

body.course-game-engine-1.game-engine-foundations .play-mode-test p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .play-mode-test > p {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

body.course-game-engine-1.game-engine-foundations .play-mode-test > p strong {
  color: var(--ink-strong);
}

body.course-game-engine-1.game-engine-foundations .completion-audit {
  margin-top: 24px;
  padding: 26px;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  background: var(--lab-tint);
}

body.course-game-engine-1.game-engine-foundations .completion-audit > span {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 760;
}

body.course-game-engine-1.game-engine-foundations .completion-audit ul {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 36px;
}

body.course-game-engine-1.game-engine-foundations .completion-audit li {
  break-inside: avoid;
  margin-bottom: 9px;
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .knowledge-check {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 12px;
}

body.course-game-engine-1.game-engine-foundations .knowledge-check details {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

body.course-game-engine-1.game-engine-foundations .knowledge-check details:nth-child(3n + 2) {
  background: var(--lab-tint);
}

body.course-game-engine-1.game-engine-foundations .knowledge-check summary {
  padding: 20px 48px 20px 20px;
  position: relative;
  color: var(--ink-strong);
  font-weight: 720;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

body.course-game-engine-1.game-engine-foundations .knowledge-check summary::-webkit-details-marker {
  display: none;
}

body.course-game-engine-1.game-engine-foundations .knowledge-check summary::after {
  content: "+";
  position: absolute;
  top: 18px;
  right: 20px;
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1;
}

body.course-game-engine-1.game-engine-foundations .knowledge-check details[open] summary::after {
  content: "−";
}

body.course-game-engine-1.game-engine-foundations .knowledge-check .details-motion-content {
  padding: 0 20px 20px;
}

body.course-game-engine-1.game-engine-foundations .knowledge-check p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.course-game-engine-1.game-engine-foundations .lab-toc {
  top: 82px;
}

@media (hover: hover) and (pointer: fine) {
  body.course-game-engine-1.game-engine-foundations .mission-handoff-footer a:hover {
    background: var(--accent);
    color: var(--paper);
  }
}

@media (prefers-color-scheme: dark) {
  body.course-game-engine-1.game-engine-foundations {
    --lab-coral: #d47a6d;
    --lab-blue: #5f89a4;
    --lab-green: #5f806b;
  }

  body.course-game-engine-1.game-engine-foundations .foundations-hero-visual img {
    filter: brightness(0.82) saturate(0.82);
  }

  body.course-game-engine-1.game-engine-foundations .model-arrow,
  body.course-game-engine-1.game-engine-foundations .window-map .window-scene,
  body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(4),
  body.course-game-engine-1.game-engine-foundations .scene-tree,
  body.course-game-engine-1.game-engine-foundations .sorting-stage,
  body.course-game-engine-1.game-engine-foundations .prefab-asset,
  body.course-game-engine-1.game-engine-foundations .play-mode-sequence .play-mode-active {
    background: color-mix(in srgb, var(--ink-strong) 88%, var(--accent));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.course-game-engine-1.game-engine-foundations .mission-handoff-footer a {
    transition: none;
  }

  body.course-game-engine-1.game-engine-foundations .mission-handoff-footer a:active {
    transform: none;
  }
}

@media (max-width: 1100px) {
  body.course-game-engine-1.game-engine-foundations .concept-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.course-game-engine-1.game-engine-foundations .concept-connector {
    display: none;
  }

  body.course-game-engine-1.game-engine-foundations .sorting-contract {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.course-game-engine-1.game-engine-foundations .sorting-contract > div:nth-child(4),
  body.course-game-engine-1.game-engine-foundations .sorting-contract > div:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 980px) {
  body.course-game-engine-1.game-engine-foundations .window-map .window-scene,
  body.course-game-engine-1.game-engine-foundations .window-map .window-game,
  body.course-game-engine-1.game-engine-foundations .window-map article {
    grid-column: span 6;
  }

  body.course-game-engine-1.game-engine-foundations .project-contract > div,
  body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(3),
  body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(4) {
    grid-column: span 6;
  }

  body.course-game-engine-1.game-engine-foundations .prefab-model {
    grid-template-columns: minmax(200px, 0.7fr) 72px minmax(0, 1.3fr);
    padding: 22px;
  }

  body.course-game-engine-1.game-engine-foundations .prefab-instances article {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  body.course-game-engine-1.game-engine-foundations .prefab-instances p {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  body.course-game-engine-1.game-engine-foundations .concept-stack,
  body.course-game-engine-1.game-engine-foundations .asset-instance-model,
  body.course-game-engine-1.game-engine-foundations .window-map,
  body.course-game-engine-1.game-engine-foundations .project-contract,
  body.course-game-engine-1.game-engine-foundations .hierarchy-layout,
  body.course-game-engine-1.game-engine-foundations .sorting-explainer,
  body.course-game-engine-1.game-engine-foundations .prefab-proof,
  body.course-game-engine-1.game-engine-foundations .play-mode-sequence,
  body.course-game-engine-1.game-engine-foundations .play-mode-test,
  body.course-game-engine-1.game-engine-foundations .knowledge-check {
    grid-template-columns: 1fr;
  }

  body.course-game-engine-1.game-engine-foundations .concept-stack article {
    min-height: 160px;
  }

  body.course-game-engine-1.game-engine-foundations .asset-instance-model {
    padding: 0;
    gap: 0;
    border: 1px solid var(--line);
  }

  body.course-game-engine-1.game-engine-foundations .model-arrow {
    min-height: 52px;
    transform: rotate(90deg);
  }

  body.course-game-engine-1.game-engine-foundations .window-map .window-scene,
  body.course-game-engine-1.game-engine-foundations .window-map .window-game,
  body.course-game-engine-1.game-engine-foundations .window-map article,
  body.course-game-engine-1.game-engine-foundations .project-contract > div,
  body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(3),
  body.course-game-engine-1.game-engine-foundations .project-contract > div:nth-child(4) {
    min-height: 0;
    grid-column: 1;
  }

  body.course-game-engine-1.game-engine-foundations .micro-exercise,
  body.course-game-engine-1.game-engine-foundations .completion-audit {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.course-game-engine-1.game-engine-foundations .shortcut-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.course-game-engine-1.game-engine-foundations .project-create-steps li {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  body.course-game-engine-1.game-engine-foundations .mission-handoff {
    grid-template-columns: 1fr;
  }

  body.course-game-engine-1.game-engine-foundations .mission-handoff article:nth-child(even) {
    border-left: 0;
  }

  body.course-game-engine-1.game-engine-foundations .mission-handoff article + article {
    border-top: 1px solid var(--line);
  }

  body.course-game-engine-1.game-engine-foundations .mission-handoff-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  body.course-game-engine-1.game-engine-foundations .hierarchy-rules {
    grid-template-columns: 1fr;
  }

  body.course-game-engine-1.game-engine-foundations .hierarchy-rules .hierarchy-rule-accent {
    grid-column: 1;
  }

  body.course-game-engine-1.game-engine-foundations .transform-test {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  body.course-game-engine-1.game-engine-foundations .sorting-stage {
    min-height: 330px;
    padding: 38px 24px;
  }

  body.course-game-engine-1.game-engine-foundations .sorting-contract {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.course-game-engine-1.game-engine-foundations .prefab-model {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.course-game-engine-1.game-engine-foundations .prefab-links {
    height: 50px;
    display: none;
  }

  body.course-game-engine-1.game-engine-foundations .play-mode-test > p {
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  body.course-game-engine-1.game-engine-foundations .completion-audit ul {
    columns: 1;
  }
}

@media (max-width: 520px) {
  body.course-game-engine-1.game-engine-foundations .shortcut-strip,
  body.course-game-engine-1.game-engine-foundations .sorting-contract {
    grid-template-columns: 1fr;
  }

  body.course-game-engine-1.game-engine-foundations .project-create-steps li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.course-game-engine-1.game-engine-foundations .mission-handoff article {
    padding: 20px 0;
  }

  body.course-game-engine-1.game-engine-foundations .sorting-plane {
    padding: 16px;
    display: block;
  }

  body.course-game-engine-1.game-engine-foundations .sorting-plane strong {
    margin-top: 6px;
    display: block;
    text-align: left;
  }

  body.course-game-engine-1.game-engine-foundations .prefab-instances article {
    grid-template-columns: 1fr;
  }

  body.course-game-engine-1.game-engine-foundations .prefab-instances p {
    grid-column: 1;
  }
}

@media print {
  body.course-game-engine-1.game-engine-foundations .hero-actions {
    display: none;
  }

  body.course-game-engine-1.game-engine-foundations .mission-handoff article,
  body.course-game-engine-1.game-engine-foundations .knowledge-check details,
  body.course-game-engine-1.game-engine-foundations .prefab-proof article,
  body.course-game-engine-1.game-engine-foundations .play-mode-sequence article {
    break-inside: avoid;
  }

  body.course-game-engine-1.game-engine-foundations .sorting-stage,
  body.course-game-engine-1.game-engine-foundations .scene-tree,
  body.course-game-engine-1.game-engine-foundations .prefab-asset,
  body.course-game-engine-1.game-engine-foundations .play-mode-active {
    border: 1px solid var(--line-strong);
    background: var(--paper) !important;
    color: var(--ink-strong) !important;
  }

  body.course-game-engine-1.game-engine-foundations .scene-tree *,
  body.course-game-engine-1.game-engine-foundations .prefab-asset *,
  body.course-game-engine-1.game-engine-foundations .play-mode-active * {
    color: var(--ink-strong) !important;
  }
}
