/* Week 08 uses the same lesson shell and components as weeks 03–05. */
.game-engine-week-eight mark {
  padding: 0.08em 0.2em;
  background: #ffff00;
  color: #000;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.game-engine-week-eight mark code {
  background: transparent;
  color: inherit;
}

@media (min-width: 761px) {
  .game-engine-week-eight .lesson-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-engine-week-eight .lesson-facts > div {
    padding-left: 0;
    border-left: 0;
    border-top: 0;
  }

  .game-engine-week-eight .lesson-facts > div:nth-child(even) {
    padding-left: 18px;
    border-left: 1px solid var(--line);
  }

  .game-engine-week-eight .lesson-facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

.game-engine-week-eight .lesson-part {
  border-top: 3px solid var(--accent);
}

body.game-engine-week-eight .lesson-part > header h2 {
  line-height: 1.35;
}

.game-engine-week-eight .lesson-subsection {
  margin-top: 44px;
  padding-top: 26px;
}

.game-engine-week-eight .lesson-subsection > header h3 {
  margin: 0 0 13px;
  font-size: 21px;
  line-height: 1.38;
}

.game-engine-week-eight .lesson-subsection h4 {
  margin: 28px 0 12px;
  color: var(--ink-strong);
  font-size: 18px;
  line-height: 1.38;
  word-break: keep-all;
}

.game-engine-week-eight .week-two-toc {
  max-height: calc(100svh - 110px);
  overflow-y: auto;
}

.game-engine-week-eight .lesson-part-nav {
  grid-template-columns: 1fr;
  gap: 18px;
}

.game-engine-week-eight .lesson-part-link {
  color: var(--ink-strong);
  font-weight: 750;
}

.game-engine-week-eight .lesson-subnav {
  margin-top: 5px;
  padding: 0;
  grid-template-columns: 1fr;
  gap: 0;
}

.game-engine-week-eight .lesson-subnav a {
  padding-block: 5px;
}

.game-engine-week-eight .week-two-hero-visual figcaption {
  color: #c8cec9;
}

.game-engine-week-eight .gdd-foundations {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.game-engine-week-eight .gdd-foundations > div + div {
  margin-left: 0;
}

.game-engine-week-eight .gdd-topic {
  margin-top: 36px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 86px;
}

.game-engine-week-eight .gdd-example > :first-child {
  margin-top: 0;
}

.game-engine-week-eight .checkpoint {
  margin: 24px 0;
  padding: 18px 20px;
}

.game-engine-week-eight .checkpoint > strong {
  color: var(--ink-strong);
  font-family: inherit;
  font-size: 14px;
}

.game-engine-week-eight .checkpoint p {
  font-size: 15px;
  line-height: 1.75;
}

.game-engine-week-eight .lesson-section .gdd-flow {
  padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.game-engine-week-eight .gdd-flow li {
  min-height: 0;
  margin: 0;
}

.game-engine-week-eight .gdd-flow strong {
  margin-top: 0;
}

.game-engine-week-eight .gdd-flow small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.game-engine-week-eight .idea-ladder li {
  padding: 12px 0 12px 8px;
  border-bottom: 1px solid var(--line);
}

.game-engine-week-eight .idea-ladder p {
  margin: 6px 0 0;
}

.game-engine-week-eight .write-label {
  color: var(--accent-ink);
  font-weight: 700;
}

.game-engine-week-eight .table-scroll {
  margin: 24px 0;
}

.game-engine-week-eight .calculation-table th a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.game-engine-week-eight .calculation-table th a:focus-visible {
  outline-color: currentColor;
}

.game-engine-week-eight .wide-table {
  min-width: 620px;
}

.game-engine-week-eight .level-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--paper);
}

.game-engine-week-eight .level-map > div {
  padding: 18px 12px;
  border-bottom: 4px solid var(--accent);
  background: var(--week-two-cream);
}

.game-engine-week-eight .level-map strong {
  display: block;
  margin-bottom: 10px;
}

.game-engine-week-eight .level-map span {
  font-size: 14px;
  line-height: 1.8;
}

.game-engine-week-eight .gameplay-sketch {
  margin: 24px 0;
}

.game-engine-week-eight .gameplay-sketch img {
  display: block;
  width: 100%;
  height: auto;
}

.game-engine-week-eight .gameplay-sketch figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.75;
}

.game-engine-week-eight .one-page-example {
  max-width: 760px;
  margin-inline: auto;
}

.game-engine-week-eight .gdd-image-link {
  display: block;
}

.game-engine-week-eight .screen-flow-example {
  margin: 28px 0;
}

.game-engine-week-eight .screen-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
  list-style: none;
}

.game-engine-week-eight .screen-flow > li {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.game-engine-week-eight .screen-flow img {
  display: block;
  width: 100%;
  height: auto;
}

.game-engine-week-eight .screen-flow p {
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.75;
}

.game-engine-week-eight .screen-flow .screen-transition {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.game-engine-week-eight .screen-flow-example figcaption {
  font-size: 14px;
  line-height: 1.75;
}

.game-engine-week-eight .gameplay-view-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.game-engine-week-eight .gameplay-view-comparison .gameplay-sketch {
  min-width: 0;
  margin-block: 16px;
}

@media (max-width: 1100px) {
  .game-engine-week-eight .gameplay-view-comparison,
  .game-engine-week-eight .screen-flow {
    grid-template-columns: 1fr;
  }

  .game-engine-week-eight .screen-flow > li + li {
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
}

.game-engine-week-eight .gdd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.game-engine-week-eight .lesson-section .source-list {
  padding: 0;
}

@media (max-width: 700px) {
  .game-engine-week-eight .gdd-foundations,
  .game-engine-week-eight .level-map {
    grid-template-columns: 1fr;
  }
}

@media print {
  .game-engine-week-eight .gdd-actions {
    display: none;
  }

  .game-engine-week-eight .table-scroll {
    overflow: visible;
  }

  .game-engine-week-eight .calculation-table {
    min-width: 0;
  }
}
