/* Guff AI ta ho ni: original retro research-world homepage. */

.retro-lab-home {
  --ink: #102f35;
  --ink-deep: #071f2b;
  --cream: #fff9df;
  --paper: #f5efcf;
  --mint: #c7efc0;
  --green: #2f9f68;
  --green-dark: #176046;
  --teal: #1b9ca2;
  --blue: #2869b5;
  --gold: #f4c542;
  --gold-dark: #bd791b;
  --coral: #eb6153;
  --shadow: #08212c;
  --panel-shadow: 7px 7px 0 var(--shadow);
  --pixel-font: Consolas, "Courier New", monospace;
  --body-font: "Trebuchet MS", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
}

.retro-lab-home *,
.retro-lab-home *::before,
.retro-lab-home *::after {
  box-sizing: border-box;
}

.retro-lab-home h1,
.retro-lab-home h2,
.retro-lab-home h3,
.retro-lab-home p,
.retro-lab-home dl,
.retro-lab-home ol {
  margin-top: 0;
}

.retro-lab-home h1,
.retro-lab-home h2,
.retro-lab-home h3,
.retro-lab-home strong {
  letter-spacing: 0;
}

.retro-lab-home a {
  color: inherit;
}

.retro-lab-home .skip-link {
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-family: var(--pixel-font);
  font-weight: 700;
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: -100px;
  z-index: 1000;
}

.retro-lab-home .skip-link:focus {
  top: 16px;
}

.lab-topbar {
  align-items: center;
  background: var(--ink-deep);
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 4px 0 rgba(7, 31, 43, 0.4);
  display: flex;
  height: 72px;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  position: sticky;
  top: 0;
  z-index: 200;
}

.lab-brand {
  align-items: center;
  color: var(--cream);
  display: inline-flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.lab-brand__mark {
  background: var(--mint);
  border: 3px solid var(--cream);
  box-shadow: 3px 3px 0 var(--green-dark);
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  position: relative;
  transform: rotate(45deg);
  width: 38px;
}

.lab-brand__mark::before,
.lab-brand__mark::after,
.lab-brand__mark i {
  background: var(--teal);
  content: "";
  display: block;
  position: absolute;
}

.lab-brand__mark::before {
  height: 8px;
  left: 7px;
  top: 7px;
  width: 18px;
}

.lab-brand__mark::after {
  bottom: 7px;
  height: 8px;
  right: 7px;
  width: 18px;
}

.lab-brand__mark i {
  height: 18px;
  left: 12px;
  top: 7px;
  width: 8px;
}

.lab-brand > span:last-child {
  display: grid;
  line-height: 1.15;
}

.lab-brand strong {
  font-size: 17px;
}

.lab-brand small {
  color: #9edabf;
  font-family: var(--pixel-font);
  font-size: 10px;
  margin-top: 4px;
  text-transform: uppercase;
}

.lab-topbar .nav {
  align-items: center;
  display: flex;
  gap: 4px;
}

.lab-topbar .nav a {
  border: 2px solid transparent;
  color: #dff8db;
  font-family: var(--pixel-font);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 11px;
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
}

.lab-topbar .nav a:hover,
.lab-topbar .nav a:focus-visible,
.lab-topbar .nav a[aria-current="page"] {
  background: #143f42;
  border-color: var(--gold);
  color: var(--cream);
  outline: none;
}

.lab-topbar .nav a[aria-current="page"]::before {
  content: ">";
  left: -6px;
  position: absolute;
}

.retro-lab-home .nav-toggle {
  background: var(--gold);
  border: 3px solid var(--cream);
  box-shadow: 3px 3px 0 var(--green-dark);
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 11px;
  font-weight: 700;
  min-height: 42px;
  padding: 8px 12px;
  text-transform: uppercase;
}

.retro-hero {
  background-color: var(--ink-deep);
  background-image:
    linear-gradient(90deg, rgba(7, 31, 43, 0.04) 0%, rgba(7, 31, 43, 0.02) 46%, rgba(7, 31, 43, 0.72) 72%, rgba(7, 31, 43, 0.94) 100%),
    url("/assets/retro-lab-map-v1.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom: 4px solid var(--ink);
  height: min(780px, calc(100svh - 108px));
  min-height: 630px;
  overflow: hidden;
  position: relative;
}

.retro-hero::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 4px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.retro-hero::after {
  background: linear-gradient(180deg, transparent 62%, rgba(7, 31, 43, 0.88) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.retro-hero__content {
  color: var(--cream);
  left: 57%;
  max-width: 570px;
  position: absolute;
  top: 12%;
  z-index: 3;
}

.pixel-label {
  color: var(--green-dark);
  font-family: var(--pixel-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.retro-hero .pixel-label {
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--ink-deep);
}

.retro-hero h1 {
  color: var(--cream);
  font-family: var(--pixel-font);
  font-size: 76px;
  line-height: 0.94;
  margin-bottom: 22px;
  text-shadow: 5px 5px 0 var(--ink-deep), 8px 8px 0 var(--green-dark);
  text-transform: uppercase;
}

.retro-hero h1 span {
  display: block;
}

.retro-hero h1 span:last-child {
  color: var(--gold);
  margin-left: 54px;
}

.retro-hero__lede {
  color: #f8f5d8;
  font-size: 19px;
  line-height: 1.6;
  margin-bottom: 26px;
  max-width: 550px;
  text-shadow: 2px 2px 0 var(--ink-deep);
}

.retro-actions,
.save-file__commands {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.pixel-button {
  align-items: center;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--shadow);
  display: inline-flex;
  font-family: var(--pixel-font);
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 100ms steps(2, end), box-shadow 100ms steps(2, end);
}

.pixel-button:hover,
.pixel-button:focus-visible {
  box-shadow: 2px 2px 0 var(--shadow);
  outline: 3px solid var(--cream);
  outline-offset: 3px;
  transform: translate(3px, 3px);
}

.pixel-button--gold {
  background: var(--gold);
  color: var(--ink);
}

.pixel-button--cream {
  background: var(--cream);
  color: #102f35 !important;
  font-size: 12px !important;
  opacity: 1;
  -webkit-text-fill-color: #102f35;
}

.pixel-button--navy {
  background: var(--blue);
  border-color: var(--ink-deep);
  color: #fff;
}

.pixel-button--green {
  background: var(--green);
  border-color: var(--ink-deep);
  color: #fff;
}

.pixel-button--coral {
  background: var(--coral);
  border-color: var(--ink-deep);
  color: #fff;
}

.map-status {
  align-items: center;
  background: rgba(7, 31, 43, 0.9);
  border: 3px solid var(--cream);
  box-shadow: 5px 5px 0 rgba(7, 31, 43, 0.75);
  color: var(--cream);
  display: flex;
  gap: 12px;
  left: max(24px, calc((100vw - 1320px) / 2));
  padding: 10px 14px;
  position: absolute;
  top: 24px;
  z-index: 4;
}

.map-status__light {
  animation: status-pulse 1.5s steps(2, end) infinite;
  background: var(--mint);
  border: 3px solid var(--ink-deep);
  display: block;
  height: 18px;
  width: 18px;
}

.map-status div {
  display: grid;
  line-height: 1.2;
}

.map-status small {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 9px;
  text-transform: uppercase;
}

.map-status strong {
  font-size: 13px;
  margin-top: 3px;
}

.retro-dialogue {
  align-items: center;
  background: var(--cream);
  border: 4px solid var(--ink);
  bottom: 29px;
  box-shadow: 7px 7px 0 rgba(7, 31, 43, 0.72);
  display: grid;
  gap: 16px;
  grid-template-columns: 58px 1fr 46px;
  left: 50%;
  max-width: 1200px;
  padding: 15px 18px;
  position: absolute;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  z-index: 5;
}

.retro-dialogue__portrait {
  background: var(--teal);
  border: 3px solid var(--ink);
  display: grid;
  height: 54px;
  place-items: center;
  position: relative;
  width: 54px;
}

.retro-dialogue__portrait::before,
.retro-dialogue__portrait::after,
.retro-dialogue__portrait i {
  background: var(--cream);
  content: "";
  position: absolute;
}

.retro-dialogue__portrait::before {
  height: 26px;
  top: 9px;
  width: 29px;
}

.retro-dialogue__portrait::after {
  background: var(--ink);
  height: 7px;
  left: 17px;
  top: 17px;
  width: 7px;
}

.retro-dialogue__portrait i {
  bottom: 6px;
  height: 8px;
  width: 38px;
}

.retro-dialogue p {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.retro-dialogue strong {
  display: block;
  font-family: var(--pixel-font);
  font-size: 11px;
  margin-bottom: 4px;
}

.retro-dialogue__copy {
  min-width: 0;
}

.retro-dialogue__copy small {
  color: #58706b;
  display: block;
  font-family: var(--pixel-font);
  font-size: 8px;
  margin-top: 5px;
  text-transform: uppercase;
}

.dialogue-next {
  align-items: center;
  background: var(--gold);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--coral);
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  transition: transform 100ms steps(2, end), box-shadow 100ms steps(2, end);
  width: 40px;
}

.dialogue-next span {
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--ink);
  border-top: 7px solid transparent;
  display: block;
  height: 0;
  margin-left: 3px;
  width: 0;
}

.dialogue-next:hover,
.dialogue-next:focus-visible {
  box-shadow: 1px 1px 0 var(--coral);
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  transform: translate(2px, 2px);
}

.dialogue-caret {
  animation: caret-bounce 900ms steps(2, end) infinite;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 13px solid var(--coral);
  height: 0;
  width: 0;
}

.retro-hero__credit {
  bottom: 4px;
  color: #d3dfca;
  font-family: var(--pixel-font);
  font-size: 9px;
  margin: 0;
  position: absolute;
  right: 24px;
  z-index: 5;
}

.command-menu {
  align-items: stretch;
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: var(--panel-shadow);
  display: grid;
  grid-template-columns: 150px repeat(5, 1fr);
  margin: -6px auto 0;
  max-width: 1240px;
  overflow: hidden;
  position: relative;
  width: calc(100% - 48px);
  z-index: 10;
}

.command-menu__title,
.command-menu a {
  align-items: center;
  display: flex;
  font-family: var(--pixel-font);
  font-size: 11px;
  font-weight: 700;
  min-height: 58px;
  padding: 10px 13px;
  text-decoration: none;
  text-transform: uppercase;
}

.command-menu__title {
  background: var(--ink);
  color: var(--gold);
  justify-content: center;
}

.command-menu a {
  border-left: 2px solid var(--ink);
  gap: 8px;
  position: relative;
}

.command-menu a b {
  color: var(--green-dark);
}

.command-menu a:hover,
.command-menu a:focus-visible,
.command-menu a[aria-current="location"],
.command-menu a.is-selected {
  background: var(--gold);
  outline: none;
}

.command-menu a:hover::after,
.command-menu a:focus-visible::after,
.command-menu a[aria-current="location"]::after,
.command-menu a.is-selected::after {
  content: ">";
  position: absolute;
  right: 8px;
}

.save-select,
.field-method,
.origin-story,
.access-terminal {
  margin: 0 auto;
  max-width: 1240px;
  padding: 104px 0;
  width: calc(100% - 48px);
}

.retro-section-heading {
  align-items: end;
  display: grid;
  gap: 60px;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  margin-bottom: 42px;
}

.retro-section-heading h2 {
  color: var(--ink-deep);
  font-family: var(--pixel-font);
  font-size: 38px;
  line-height: 1.14;
  margin-bottom: 0;
  max-width: 720px;
  text-transform: uppercase;
}

.retro-section-heading > p {
  color: #42615d;
  margin: 0;
}

.retro-section-heading--dark h2,
.retro-section-heading--dark > p {
  color: var(--cream);
}

.retro-section-heading--dark .pixel-label {
  color: var(--gold);
}

.save-file {
  background: #fffef2;
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--green-dark);
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
  min-height: 470px;
  overflow: hidden;
}

.save-file__screen {
  background: var(--ink-deep);
  border-right: 4px solid var(--ink);
  color: #fff;
  display: block;
  min-height: 100%;
  overflow: hidden;
  position: relative;
}

.save-file__screen img {
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  position: absolute;
  transition: filter 180ms steps(3, end), transform 180ms steps(3, end);
  width: 100%;
}

.save-file__screen::after {
  background: linear-gradient(180deg, transparent 35%, rgba(7, 31, 43, 0.88));
  content: "";
  inset: 0;
  position: absolute;
}

.save-file__screen:hover img,
.save-file__screen:focus-visible img {
  filter: saturate(1.3) contrast(1.08);
  transform: scale(1.025);
}

.save-file__screen:focus-visible {
  outline: 5px solid var(--gold);
  outline-offset: -8px;
}

.save-file__badge,
.save-file__state {
  border: 3px solid var(--ink);
  font-family: var(--pixel-font);
  font-size: 10px;
  font-weight: 700;
  padding: 8px 10px;
  position: absolute;
  text-transform: uppercase;
  z-index: 2;
}

.save-file__badge {
  background: var(--cream);
  color: var(--ink);
  left: 18px;
  top: 18px;
}

.save-file__state {
  background: var(--coral);
  bottom: 18px;
  color: #fff;
  right: 18px;
}

.save-file__body {
  align-content: center;
  display: grid;
  padding: 48px;
}

.save-file__body h3 {
  color: var(--ink-deep);
  font-family: var(--pixel-font);
  font-size: 40px;
  line-height: 1.1;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.save-file__body > p:not(.pixel-label) {
  color: #36524f;
  font-size: 17px;
  margin-bottom: 28px;
}

.save-file__stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 30px;
}

.save-file__stats div {
  background: var(--mint);
  border: 3px solid var(--ink);
  min-height: 88px;
  padding: 11px;
}

.save-file__stats dt {
  font-family: var(--pixel-font);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.save-file__stats dd {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  margin: 8px 0 0;
}

.text-command {
  font-family: var(--pixel-font);
  font-size: 11px;
  font-weight: 700;
  padding: 10px 4px;
  text-transform: uppercase;
}

.text-command:hover,
.text-command:focus-visible {
  color: var(--blue);
  outline: 2px dashed var(--blue);
  outline-offset: 4px;
}

.empty-saves {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 34px;
}

.empty-save {
  align-items: center;
  background:
    linear-gradient(90deg, transparent 49%, rgba(16, 47, 53, 0.06) 50%, transparent 51%),
    #ebe5c8;
  border: 3px dashed #617772;
  display: grid;
  gap: 8px 16px;
  grid-template-columns: 54px 1fr;
  min-height: 112px;
  padding: 20px;
}

.empty-save > span {
  align-items: center;
  background: #d6d0b5;
  border: 3px solid #617772;
  display: flex;
  font-family: var(--pixel-font);
  font-weight: 700;
  grid-row: 1 / 3;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.empty-save strong {
  font-family: var(--pixel-font);
  font-size: 14px;
  text-transform: uppercase;
}

.empty-save small {
  color: #60706c;
  font-size: 13px;
}

.slot-command {
  align-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 #9a9272;
  color: var(--ink);
  display: inline-flex;
  font-family: var(--pixel-font);
  font-size: 9px;
  gap: 8px;
  grid-column: 2;
  justify-self: start;
  margin-top: 3px;
  min-height: 34px;
  padding: 7px 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.slot-command:hover,
.slot-command:focus-visible {
  background: var(--gold);
  box-shadow: 1px 1px 0 #9a9272;
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  transform: translate(2px, 2px);
}

.lab-districts {
  background-color: var(--ink-deep);
  background-image:
    linear-gradient(rgba(71, 131, 91, 0.16) 2px, transparent 2px),
    linear-gradient(90deg, rgba(71, 131, 91, 0.16) 2px, transparent 2px);
  background-size: 48px 48px;
  border-bottom: 4px solid var(--ink);
  border-top: 4px solid var(--ink);
  padding: 96px max(24px, calc((100vw - 1240px) / 2));
}

.district-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
}

.district-grid article {
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--gold-dark);
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 26px 22px;
  transition: transform 120ms steps(2, end), box-shadow 120ms steps(2, end);
}

.district-grid article:hover,
.district-grid article.is-active {
  box-shadow: 9px 9px 0 var(--gold-dark);
  transform: translate(-3px, -3px);
}

.district-grid article.is-active {
  border-color: var(--mint);
  outline: 3px solid var(--ink);
  outline-offset: -6px;
}

.district-grid h3 {
  color: var(--ink-deep);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.25;
  margin: 14px 0;
  text-transform: uppercase;
}

.district-grid article > p:not(.pixel-label) {
  color: #405c58;
  flex: 1;
  font-size: 14px;
  margin-bottom: 22px;
}

.district-command {
  align-items: center;
  align-self: flex-start;
  background: var(--ink-deep);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--gold-dark);
  color: var(--cream);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--pixel-font);
  font-size: 9px;
  gap: 7px;
  justify-content: center;
  min-height: 39px;
  padding: 8px 11px;
  text-transform: uppercase;
}

.district-command:hover,
.district-command:focus-visible,
.district-command[aria-pressed="true"] {
  background: var(--gold);
  box-shadow: 2px 2px 0 var(--coral);
  color: var(--ink);
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  transform: translate(2px, 2px);
}

.district-icon {
  background: var(--teal);
  border: 3px solid var(--ink);
  display: block;
  height: 64px;
  image-rendering: pixelated;
  position: relative;
  width: 64px;
}

.district-icon::before,
.district-icon::after {
  content: "";
  position: absolute;
}

.district-icon--ai::before {
  background: var(--cream);
  height: 28px;
  left: 15px;
  top: 14px;
  width: 28px;
}

.district-icon--ai::after {
  background: var(--ink);
  box-shadow: 20px 0 0 var(--ink);
  height: 7px;
  left: 19px;
  top: 24px;
  width: 7px;
}

.district-icon--math {
  background: var(--blue);
}

.district-icon--math::before {
  border-bottom: 31px solid var(--cream);
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  bottom: 12px;
  left: 11px;
}

.district-icon--math::after {
  background: var(--coral);
  height: 9px;
  left: 19px;
  top: 25px;
  width: 20px;
}

.district-icon--edu {
  background: var(--green);
}

.district-icon--edu::before {
  background: var(--cream);
  box-shadow: 22px 0 0 var(--cream);
  height: 33px;
  left: 8px;
  top: 12px;
  width: 20px;
}

.district-icon--edu::after {
  background: var(--ink);
  height: 36px;
  left: 28px;
  top: 10px;
  width: 3px;
}

.district-icon--public {
  background: var(--coral);
}

.district-icon--public::before {
  border: 7px solid var(--cream);
  border-radius: 50%;
  height: 35px;
  left: 12px;
  top: 10px;
  width: 35px;
}

.district-icon--public::after {
  background: var(--cream);
  bottom: 6px;
  height: 10px;
  left: 24px;
  width: 11px;
}

.quest-console {
  background: #fffef2;
  border: 4px solid var(--mint);
  box-shadow: 8px 8px 0 var(--gold-dark);
  display: grid;
  gap: 22px 28px;
  grid-template-columns: 116px minmax(0, 1fr) minmax(260px, 0.72fr);
  margin-top: 42px;
  padding: 24px;
  position: relative;
}

.quest-console::before {
  background: var(--coral);
  content: "QUEST SELECTED";
  color: #fff;
  font-family: var(--pixel-font);
  font-size: 8px;
  padding: 7px 10px;
  position: absolute;
  right: 18px;
  top: -17px;
}

.quest-console__map {
  background-color: #c9e8b8;
  background-image:
    linear-gradient(rgba(16, 47, 53, 0.16) 2px, transparent 2px),
    linear-gradient(90deg, rgba(16, 47, 53, 0.16) 2px, transparent 2px);
  background-size: 24px 24px;
  border: 3px solid var(--ink);
  height: 106px;
  position: relative;
  width: 106px;
}

.quest-console__map i {
  background: var(--blue);
  border: 2px solid var(--ink);
  height: 16px;
  position: absolute;
  width: 16px;
}

.quest-console__map i:nth-child(1) { left: 14px; top: 13px; }
.quest-console__map i:nth-child(2) { right: 14px; top: 18px; }
.quest-console__map i:nth-child(3) { bottom: 14px; left: 20px; }
.quest-console__map i:nth-child(4) { bottom: 18px; right: 16px; }

.quest-console__map span {
  animation: status-pulse 1.2s steps(2, end) infinite;
  background: var(--gold);
  border: 3px solid var(--ink);
  box-shadow: 2px 2px 0 var(--coral);
  height: 18px;
  left: 13px;
  position: absolute;
  top: 12px;
  transition: left 180ms steps(3, end), top 180ms steps(3, end);
  width: 18px;
}

.quest-console--math .quest-console__map span { left: 73px; top: 17px; }
.quest-console--education .quest-console__map span { left: 19px; top: 71px; }
.quest-console--public .quest-console__map span { left: 71px; top: 67px; }

.quest-console__brief h3 {
  color: var(--ink-deep);
  font-family: var(--pixel-font);
  font-size: 22px;
  line-height: 1.25;
  margin: 9px 0 10px;
  text-transform: uppercase;
}

.quest-console__brief > p:last-child {
  color: #3f5d59;
  margin: 0;
  max-width: 620px;
}

.quest-console__stats {
  border-left: 3px solid var(--ink);
  display: grid;
  margin: 0;
  padding-left: 22px;
}

.quest-console__stats div {
  border-bottom: 2px solid #b8c7ae;
  display: grid;
  gap: 8px;
  grid-template-columns: 108px 1fr;
  padding: 5px 0 9px;
}

.quest-console__stats div:last-child {
  border-bottom: 0;
}

.quest-console__stats dt {
  color: #52716b;
  font-family: var(--pixel-font);
  font-size: 8px;
  text-transform: uppercase;
}

.quest-console__stats dd {
  color: var(--ink-deep);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.quest-console__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  grid-column: 2 / -1;
}

.quest-steps {
  counter-reset: quest;
  display: grid;
  gap: 14px;
  list-style: none;
  margin-bottom: 0;
  padding: 0;
}

.quest-steps li {
  align-items: center;
  background: #fffef2;
  border: 3px solid var(--ink);
  display: grid;
  gap: 24px;
  grid-template-columns: 74px 1fr;
  min-height: 112px;
  padding: 18px 24px;
  position: relative;
}

.quest-steps li::before {
  background: var(--gold);
  bottom: -7px;
  content: "";
  height: 4px;
  left: 9px;
  position: absolute;
  right: -7px;
  z-index: -1;
}

.quest-steps li > span {
  align-items: center;
  background: var(--ink);
  border: 3px solid var(--gold);
  color: var(--cream);
  display: flex;
  font-family: var(--pixel-font);
  font-size: 18px;
  font-weight: 700;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.quest-steps strong {
  display: block;
  font-family: var(--pixel-font);
  font-size: 16px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.quest-steps p {
  color: #49635f;
  margin-bottom: 0;
}

.origin-story {
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
}

.origin-story__scene {
  background:
    linear-gradient(180deg, #214468 0 55%, #1a654e 55% 100%);
  border: 4px solid var(--ink);
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.origin-story__scene::before {
  background:
    linear-gradient(90deg, transparent 45%, rgba(255,255,255,0.15) 46% 54%, transparent 55%),
    #2a7957;
  bottom: 0;
  content: "";
  height: 44%;
  left: 0;
  position: absolute;
  width: 100%;
}

.origin-story__scene::after {
  background: var(--gold);
  box-shadow:
    34px 20px 0 var(--cream),
    -80px 43px 0 var(--cream),
    120px -10px 0 var(--cream),
    -120px -20px 0 var(--cream);
  content: "";
  height: 5px;
  left: 50%;
  position: absolute;
  top: 17%;
  width: 5px;
}

.origin-story__moon {
  background: var(--cream);
  border: 3px solid var(--ink);
  height: 62px;
  position: absolute;
  right: 12%;
  top: 12%;
  width: 62px;
}

.origin-story__lab {
  background: var(--cream);
  border: 4px solid var(--ink);
  bottom: 18%;
  height: 110px;
  left: 17%;
  position: absolute;
  width: 180px;
  z-index: 2;
}

.origin-story__lab::before {
  border-bottom: 58px solid var(--teal);
  border-left: 105px solid transparent;
  border-right: 105px solid transparent;
  content: "";
  left: -18px;
  position: absolute;
  top: -58px;
}

.origin-story__lab::after {
  background: var(--gold);
  border: 3px solid var(--ink);
  bottom: 0;
  content: "";
  height: 62px;
  left: 64px;
  position: absolute;
  width: 46px;
}

.origin-story__copy {
  align-content: center;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-left: 0;
  display: grid;
  padding: 52px;
}

.origin-story__copy h2 {
  font-family: var(--pixel-font);
  font-size: 38px;
  line-height: 1.15;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.origin-story__copy p:not(.pixel-label) {
  color: #3d5855;
  font-size: 17px;
}

.origin-story__copy p:last-child {
  margin-bottom: 0;
}

.access-terminal {
  background: var(--ink-deep);
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--green-dark);
  margin-bottom: 110px;
  max-width: 1240px;
  padding: 58px;
}

.terminal-links {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}

.terminal-links a {
  background: var(--cream);
  border: 3px solid var(--ink);
  display: grid;
  min-height: 180px;
  padding: 20px;
  text-decoration: none;
  transition: background 100ms steps(2, end), transform 100ms steps(2, end);
}

.terminal-links a:hover,
.terminal-links a:focus-visible {
  background: var(--gold);
  outline: 3px solid var(--cream);
  outline-offset: 3px;
  transform: translateY(-5px);
}

.terminal-links a > span {
  align-items: center;
  background: var(--blue);
  border: 3px solid var(--ink);
  color: #fff;
  display: flex;
  font-family: var(--pixel-font);
  font-size: 10px;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  margin-bottom: 22px;
  width: 54px;
}

.terminal-links strong {
  font-family: var(--pixel-font);
  font-size: 14px;
  line-height: 1.3;
  text-transform: uppercase;
}

.terminal-links small {
  align-self: end;
  color: #526a66;
  font-size: 12px;
  margin-top: 10px;
}

.lab-footer {
  align-items: center;
  background: var(--ink-deep);
  border-top: 4px solid var(--gold);
  color: var(--cream);
  display: flex;
  font-family: var(--pixel-font);
  font-size: 11px;
  justify-content: space-between;
  min-height: 100px;
  padding: 24px max(24px, calc((100vw - 1240px) / 2));
  text-transform: uppercase;
}

.lab-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.lab-footer a {
  color: #d6f3d3;
}

.lab-footer a:hover,
.lab-footer a:focus-visible {
  color: var(--gold);
  outline: 2px dashed var(--gold);
  outline-offset: 4px;
}

.retro-lab-home .reading-progress {
  background: transparent;
  height: 4px;
  left: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 500;
}

.retro-lab-home .reading-progress span {
  background: var(--coral);
  display: block;
  height: 100%;
  transform: scaleX(var(--reading-progress, 0));
  transform-origin: left;
}

.retro-lab-home .back-to-top {
  align-items: center;
  background: var(--gold);
  border: 3px solid var(--ink);
  bottom: 22px;
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  display: flex;
  font-family: var(--pixel-font);
  font-weight: 700;
  height: 44px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 22px;
  transform: translateY(12px);
  transition: opacity 120ms linear, transform 120ms steps(2, end);
  width: 44px;
  z-index: 100;
}

.retro-lab-home .back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.retro-lab-home .reveal-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 360ms steps(6, end), transform 360ms steps(6, end);
  transition-delay: var(--reveal-delay, 0ms);
}

.retro-lab-home .reveal-ready.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes status-pulse {
  0%, 45% { background: var(--mint); }
  46%, 100% { background: var(--gold); }
}

@keyframes caret-bounce {
  0%, 55% { transform: translateY(0); }
  56%, 100% { transform: translateY(5px); }
}

@media (max-width: 1080px) {
  .retro-hero__content {
    left: 53%;
    max-width: 46%;
    top: 10%;
  }

  .retro-hero h1 {
    font-size: 58px;
  }

  .retro-hero h1 span:last-child {
    margin-left: 32px;
  }

  .retro-hero__lede {
    font-size: 16px;
  }

  .command-menu {
    grid-template-columns: 130px repeat(5, 1fr);
  }

  .command-menu__title,
  .command-menu a {
    font-size: 10px;
    padding: 10px 9px;
  }

  .district-grid,
  .terminal-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .district-grid article {
    min-height: 280px;
  }

  .quest-console {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .quest-console__stats {
    border-left: 0;
    border-top: 3px solid var(--ink);
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
    padding-left: 0;
    padding-top: 14px;
  }

  .quest-console__stats div {
    border-bottom: 0;
    border-right: 2px solid #b8c7ae;
    display: block;
    padding: 0 14px;
  }

  .quest-console__stats div:last-child {
    border-right: 0;
  }

  .quest-console__stats dd {
    margin-top: 7px;
  }

  .quest-console__actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .lab-topbar {
    height: 66px;
    padding: 0 18px;
  }

  .lab-brand__mark {
    flex-basis: 32px;
    height: 32px;
    width: 32px;
  }

  .lab-brand__mark::before {
    left: 6px;
    top: 6px;
    width: 15px;
  }

  .lab-brand__mark::after {
    bottom: 6px;
    width: 15px;
  }

  .lab-brand__mark i {
    left: 10px;
    top: 6px;
  }

  .lab-brand strong {
    font-size: 14px;
  }

  .lab-brand small {
    display: none;
  }

  .lab-topbar .nav {
    background: var(--ink-deep);
    border: 3px solid var(--gold);
    box-shadow: 6px 6px 0 var(--green-dark);
    display: none;
    gap: 4px;
    padding: 10px;
    position: absolute;
    right: 16px;
    top: 60px;
    width: min(280px, calc(100vw - 32px));
  }

  .lab-topbar.nav-open .nav {
    display: grid;
  }

  .lab-topbar .nav a {
    border-color: rgba(244, 197, 66, 0.25);
    min-height: 42px;
  }

  .retro-hero {
    background-image:
      linear-gradient(180deg, rgba(7, 31, 43, 0.12) 0 40%, rgba(7, 31, 43, 0.94) 76% 100%),
      url("/assets/retro-lab-map-v1.webp");
    background-position: 38% center;
    height: min(750px, calc(100svh - 82px));
    min-height: 680px;
  }

  .retro-hero__content {
    bottom: 175px;
    left: 24px;
    max-width: 620px;
    right: 24px;
    top: auto;
  }

  .retro-hero h1 {
    font-size: 50px;
    margin-bottom: 14px;
  }

  .retro-hero h1 span {
    display: inline;
  }

  .retro-hero h1 span:last-child {
    margin-left: 0;
  }

  .retro-hero__lede {
    margin-bottom: 18px;
    max-width: 600px;
  }

  .map-status {
    left: 18px;
    top: 18px;
  }

  .retro-dialogue {
    bottom: 20px;
    grid-template-columns: 58px 1fr 46px;
    width: calc(100% - 36px);
  }

  .retro-hero__credit {
    display: none;
  }

  .command-menu {
    grid-template-columns: repeat(5, 1fr);
  }

  .command-menu__title {
    display: none;
  }

  .command-menu a {
    border-left: 2px solid var(--ink);
    justify-content: center;
    text-align: center;
  }

  .command-menu a:first-of-type {
    border-left: 0;
  }

  .command-menu a b {
    display: none;
  }

  .retro-section-heading {
    align-items: start;
    gap: 18px;
    grid-template-columns: 1fr;
  }

  .save-file {
    grid-template-columns: 1fr;
  }

  .save-file__screen {
    border-bottom: 4px solid var(--ink);
    border-right: 0;
    min-height: 320px;
  }

  .origin-story {
    grid-template-columns: 1fr;
  }

  .origin-story__scene {
    min-height: 330px;
  }

  .origin-story__copy {
    border-left: 4px solid var(--ink);
    border-top: 0;
  }
}

@media (max-width: 620px) {
  .retro-lab-home {
    font-size: 15px;
  }

  .retro-hero {
    background-position: 34% center;
    height: 720px;
    min-height: 720px;
  }

  .map-status {
    max-width: calc(100% - 36px);
  }

  .retro-hero__content {
    bottom: 206px;
    left: 18px;
    right: 18px;
  }

  .retro-hero h1 {
    font-size: 38px;
    line-height: 1;
    text-shadow: 3px 3px 0 var(--ink-deep), 5px 5px 0 var(--green-dark);
  }

  .retro-hero__lede {
    font-size: 14px;
    line-height: 1.45;
  }

  .pixel-button {
    font-size: 10px;
    min-height: 42px;
    padding: 9px 12px;
  }

  .pixel-button--cream {
    font-size: 10px !important;
  }

  .retro-dialogue {
    align-items: start;
    bottom: 18px;
    gap: 10px;
    grid-template-columns: 42px 1fr 34px;
    padding: 12px;
  }

  .retro-dialogue__portrait {
    height: 40px;
    width: 40px;
  }

  .retro-dialogue__portrait::before {
    height: 20px;
    left: 7px;
    top: 6px;
    width: 21px;
  }

  .retro-dialogue__portrait::after {
    height: 5px;
    left: 12px;
    top: 13px;
    width: 5px;
  }

  .retro-dialogue__portrait i {
    bottom: 4px;
    height: 6px;
    width: 28px;
  }

  .retro-dialogue p {
    font-size: 12px;
    line-height: 1.42;
  }

  .dialogue-caret {
    display: none;
  }

  .dialogue-next {
    box-shadow: 2px 2px 0 var(--coral);
    height: 32px;
    width: 32px;
  }

  .dialogue-next span {
    border-bottom-width: 5px;
    border-left-width: 8px;
    border-top-width: 5px;
  }

  .command-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: calc(100% - 28px);
  }

  .command-menu a {
    border-bottom: 2px solid var(--ink);
    min-height: 50px;
  }

  .command-menu a:nth-of-type(4) {
    border-left: 0;
  }

  .command-menu a:nth-of-type(4),
  .command-menu a:nth-of-type(5) {
    border-bottom: 0;
  }

  .command-menu a:last-child {
    grid-column: span 2;
  }

  .save-select,
  .field-method,
  .origin-story,
  .access-terminal {
    padding: 76px 0;
    width: calc(100% - 28px);
  }

  .retro-section-heading h2,
  .origin-story__copy h2 {
    font-size: 27px;
  }

  .save-file {
    box-shadow: 6px 6px 0 var(--green-dark);
  }

  .save-file__screen {
    min-height: 230px;
  }

  .save-file__body {
    padding: 28px 20px 30px;
  }

  .save-file__body h3 {
    font-size: 29px;
  }

  .save-file__body > p:not(.pixel-label) {
    font-size: 15px;
  }

  .save-file__stats {
    grid-template-columns: 1fr;
  }

  .save-file__stats div {
    min-height: 72px;
  }

  .empty-saves,
  .district-grid,
  .terminal-links {
    grid-template-columns: 1fr;
  }

  .lab-districts {
    padding: 76px 14px;
  }

  .district-grid article {
    min-height: auto;
  }

  .quest-console {
    gap: 18px;
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }

  .quest-console::before {
    right: 10px;
  }

  .quest-console__map {
    height: 94px;
    width: 94px;
  }

  .quest-console__map i:nth-child(2) { right: 8px; }
  .quest-console__map i:nth-child(4) { right: 10px; }
  .quest-console--math .quest-console__map span { left: 68px; }
  .quest-console--public .quest-console__map span { left: 66px; }

  .quest-console__brief h3 {
    font-size: 18px;
  }

  .quest-console__stats {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .quest-console__stats div,
  .quest-console__stats div:last-child {
    border-bottom: 2px solid #b8c7ae;
    border-right: 0;
    padding: 9px 0;
  }

  .quest-console__stats div:last-child {
    border-bottom: 0;
  }

  .quest-console__actions {
    display: grid;
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .quest-console__actions .pixel-button {
    width: 100%;
  }

  .quest-steps li {
    align-items: start;
    gap: 14px;
    grid-template-columns: 48px 1fr;
    padding: 15px;
  }

  .quest-steps li > span {
    font-size: 13px;
    height: 42px;
    width: 42px;
  }

  .quest-steps strong {
    font-size: 13px;
  }

  .origin-story__scene {
    min-height: 280px;
  }

  .origin-story__lab {
    left: 12%;
    transform: scale(0.82);
    transform-origin: bottom left;
  }

  .origin-story__copy {
    padding: 32px 22px;
  }

  .access-terminal {
    margin-bottom: 78px;
    padding: 32px 18px;
  }

  .terminal-links a {
    min-height: 140px;
  }

  .lab-footer {
    align-items: flex-start;
    display: grid;
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .retro-lab-home *,
  .retro-lab-home *::before,
  .retro-lab-home *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
