@font-face {
  font-family: Jersey;
  src: url("./fonts/jersey-10.woff") format("woff");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0b1012;
  --panel: #101719;
  --line: #32403d;
  --muted: #95a59e;
  --text: #edf1df;
  --lime: #c3f77b;
  --mint: #80dcc1;
  --amber: #ffcc83;
  --pixel: Jersey, "Courier New", monospace;
  --mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--mono);
  min-height: 100svh;
}
body:after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(#566f5e44 0.6px, transparent 0.8px);
  background-size: 5px 5px;
  opacity: 0.25;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 0;
}
button:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
button:hover {
  color: var(--lime);
}
[hidden] {
  display: none !important;
}
.topbar {
  border-bottom: 1px solid var(--line);
  background: #101617;
}
.bar-inner,
main {
  width: min(1352px, 100%);
  margin: auto;
  padding: 0 clamp(16px, 4.2vw, 66px);
}
.bar-inner {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand,
.tools,
.tool,
.section-head,
.console-bar,
.command-line,
footer,
.eyebrow,
.dialog-top,
.launch {
  display: flex;
  align-items: center;
}
.brand {
  gap: 12px;
  font: 29px/0.95 var(--pixel);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-icon {
  display: inline-block;
  position: relative;
  width: 26px;
  height: 30px;
  filter: drop-shadow(0 0 7px #b6f76727);
}
.brand-icon i,
.brand-icon b {
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 1%, 88% 37%, 88% 55%, 50% 99%, 12% 55%, 12% 37%);
  background: var(--lime);
}
.brand-icon b {
  clip-path: polygon(49% 9%, 58% 47%, 49% 89%, 80% 50%, 80% 40%);
  background: #487b48;
}
.tools {
  gap: 8px;
}
.tool {
  height: 34px;
  gap: 8px;
  border: 1px solid #34413f;
  padding: 0 10px;
  border-radius: 3px;
  color: #b6c3b8;
  font-size: 11px;
  white-space: nowrap;
}
.tool.square {
  font: 23px/1 var(--mono);
  padding: 0 8px;
}
.keyicon {
  width: 14px;
  height: 14px;
  border: 1px solid #8a9b91;
  text-align: center;
  font: bold 11px/12px var(--mono);
  border-radius: 2px;
}
.tool:hover,
.route:hover,
#contacts button:hover {
  background: #1c2825;
  border-color: #748b64;
}
main {
  padding-top: clamp(14px, 2.5vw, 34px);
  padding-bottom: 20px;
}
.console {
  border: 1px solid #4a5c50;
  background: #101719;
  border-radius: 3px;
  overflow: hidden;
}
.console-bar {
  height: 32px;
  padding: 0 14px;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #34443c;
  background: #18211f;
  color: #b4c3b3;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.console-bar > span:first-child,
footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}
.console-bar > span:last-child {
  color: #96ad91;
}
.lamp {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--lime);
  box-shadow: 0 0 7px #b5fc6b55;
}
.stage {
  position: relative;
  width: 100%;
  height: clamp(350px, 43vw, 575px);
  overflow: hidden;
  isolation: isolate;
  background: #071115;
}
#space {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  touch-action: manipulation;
}
.raster {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 2px, #030904 3px);
  opacity: 0.12;
  z-index: 2;
}
.corner {
  width: 12px;
  height: 12px;
  border-color: #a6c890;
  border-style: solid;
  position: absolute;
  pointer-events: none;
  z-index: 3;
  opacity: 0.72;
}
.tl {
  top: 11px;
  left: 11px;
  border-width: 1px 0 0 1px;
}
.tr {
  top: 11px;
  right: 11px;
  border-width: 1px 1px 0 0;
}
.bl {
  bottom: 11px;
  left: 11px;
  border-width: 0 0 1px 1px;
}
.br {
  bottom: 11px;
  right: 11px;
  border-width: 0 1px 1px 0;
}
#title-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #040c10a8 0%,
    #07101560 37%,
    transparent 60%
  );
}
.intro {
  margin-left: clamp(26px, 4.5vw, 75px);
  max-width: 43%;
  position: relative;
  z-index: 3;
}
.eyebrow {
  gap: 9px;
  color: #b4d7a3;
  font-size: clamp(9px, 1vw, 12px);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: bold;
}
.eyebrow i {
  width: 17px;
  height: 2px;
  background: var(--lime);
}
h1 {
  font: normal clamp(78px, 9vw, 139px) / 0.74 var(--pixel);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 20px 0 22px;
  color: #eff3df;
  text-shadow: 3px 3px #34493b;
}
h1 em {
  font-style: normal;
  color: var(--lime);
  text-shadow: 3px 3px #405b37;
}
.intro p {
  font: clamp(12px, 1.1vw, 15px) / 1.65 var(--mono);
  color: #c0cec1;
  max-width: 360px;
  margin: 0 0 24px;
}
.primary {
  background: var(--lime);
  color: #142013;
  border: 1px solid #e4ffb0;
  border-radius: 2px;
  box-shadow: 0 3px 0 #63813d;
  font-weight: 700;
  padding: 10px 20px;
  min-height: 41px;
}
.primary:hover {
  color: #071108;
  background: #dafa9d;
}
.launch {
  pointer-events: auto;
  gap: 12px;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.playmark {
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #263d20;
}
.command-line {
  gap: 12px;
  min-height: 40px;
  padding: 7px 14px;
  font-size: 12px;
  color: #b4c1b8;
  border-top: 1px solid #35433e;
}
.prompt-mark {
  color: var(--lime);
  font: bold 17px var(--mono);
}
.command-line .plain {
  margin-left: auto;
  color: var(--lime);
  white-space: nowrap;
}
.section-head {
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
}
.section-head h2 {
  font: normal 26px/1 var(--pixel);
  letter-spacing: 0.025em;
  margin: 0;
}
.section-head > span,
footer {
  font-size: 11px;
  color: var(--muted);
}
.routes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.route {
  display: flex;
  align-items: center;
  text-align: left;
  gap: clamp(8px, 1.3vw, 20px);
  padding: 13px 15px;
  background: #101819;
  border: 1px solid #34423d;
  border-radius: 3px;
  min-height: 81px;
}
.route canvas {
  width: clamp(40px, 4.3vw, 64px);
  height: auto;
  image-rendering: pixelated;
}
.route > span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.route small,
.readouts small,
.tiny {
  font: 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.route strong {
  font: normal clamp(23px, 2.1vw, 30px) / 1.02 var(--pixel);
  color: #e4ead8;
}
.route > span > span {
  font-size: 11px;
  margin-top: 3px;
  color: #a4b2a8;
}
.route b {
  align-self: flex-start;
  margin-left: auto;
  color: #7f9386;
  font-weight: 400;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  gap: 12px;
  color: #819187;
}
footer .lamp {
  width: 5px;
  height: 5px;
  background: #718a77;
  box-shadow: none;
}
#flight-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sector,
.score {
  position: absolute;
  top: 17px;
  background: #071013d9;
  border: 1px solid #45584c;
  border-radius: 2px;
  padding: 5px 9px;
}
.sector {
  left: 19px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.sector strong {
  font: 25px/1 var(--pixel);
}
.sector span,
.score {
  font-size: 11px;
  color: #c8d5c4;
}
.score {
  right: 19px;
}
.coin {
  color: var(--amber);
}
.link-button {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: #16231adc;
  border: 1px solid var(--lime);
  color: var(--lime);
  pointer-events: auto;
  padding: 8px 14px;
  white-space: nowrap;
}
#contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#contacts button {
  border: 1px solid var(--line);
  padding: 7px 10px;
  min-height: 37px;
  border-radius: 2px;
  background: #141c1d;
  font-size: 12px;
}
.contact-icon {
  margin-right: 6px;
}
.wisp,
.bit {
  color: var(--amber);
}
.relay {
  color: var(--mint);
}
.vault,
.gate {
  color: var(--lime);
}
#contacts button[aria-pressed="true"] {
  border-color: var(--lime);
  color: var(--lime);
}
.readouts {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 35px;
  margin-top: 14px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
.readouts > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.readouts strong,
.keyline {
  font: 14px var(--mono);
  color: var(--lime);
  letter-spacing: 0.06em;
}
dialog {
  background: #101a1c;
  color: var(--text);
  padding: 0;
  border: 1px solid #738969;
  border-radius: 4px;
  width: min(490px, calc(100vw - 26px));
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 18px 80px #000b;
}
dialog::backdrop {
  background: #040a0dbb;
  backdrop-filter: blur(3px);
}
.dialog-top {
  justify-content: space-between;
  background: #1c2823;
  border-bottom: 1px solid var(--line);
  padding: 6px 14px;
  font: 11px var(--mono);
  color: #b5d99f;
  letter-spacing: 0.09em;
}
.dialog-top button {
  font-size: 21px;
  line-height: 1;
  width: 30px;
  height: 28px;
}
#dialog-content {
  padding: 20px 24px 24px;
}
dialog h2 {
  font: normal 40px/0.98 var(--pixel);
  margin: 0 0 12px;
}
dialog p {
  font-size: 13px;
  color: #c8d3c8;
}
dialog .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.secondary,
.option,
.cal button {
  border: 1px solid #526456;
  background: #1b2827;
  border-radius: 2px;
  min-height: 39px;
  padding: 7px 13px;
}
.option {
  color: var(--lime);
  min-width: 58px;
}
.option:hover,
.secondary:hover {
  border-color: var(--lime);
}
.diagram {
  margin: 16px 0 8px;
  padding: 10px 4px;
  text-align: center;
  background: #0b1418;
  border: 1px solid #304139;
  border-radius: 2px;
}
.diagram canvas {
  width: min(100%, 320px);
  image-rendering: pixelated;
}
.glyph-word {
  font: bold 30px var(--mono);
  letter-spacing: 0.23em;
  color: var(--amber);
}
.keyline {
  padding: 7px 0;
}
.feedback {
  color: var(--amber);
  font-size: 12px;
}
.answer-input {
  color: var(--lime);
  background: #0a1316;
  border: 1px solid #5e755c;
  min-height: 42px;
  flex: 1;
  min-width: 115px;
  width: 145px;
  padding: 8px 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal span {
  text-align: center;
  color: #a4b2a7;
  font-size: 10px;
}
.cal button {
  padding: 4px 0;
  min-height: 31px;
  font-size: 12px;
}
.cal .marked {
  color: var(--amber);
  border-color: #927956;
}
.manual-list {
  padding-left: 20px;
  font-size: 13px;
  color: #bfcdc0;
}
.manual-list li {
  padding: 4px 0;
}
.manual-list b {
  color: var(--lime);
}
@media (max-width: 700px) {
  .bar-inner {
    height: 54px;
  }
  .brand {
    font-size: 24px;
    gap: 6px;
  }
  .brand-icon {
    width: 22px;
    height: 26px;
  }
  .tool {
    font-size: 10px;
    padding: 0 7px;
  }
  .tools {
    gap: 4px;
  }
  .bar-inner,
  main {
    padding-inline: 12px;
  }
  .stage {
    height: 380px;
  }
  .intro {
    margin-left: 25px;
    max-width: 52%;
  }
  .intro p {
    font-size: 12px;
  }
  .routes {
    gap: 6px;
  }
  .route {
    padding: 10px 8px;
    gap: 5px;
    flex-wrap: wrap;
  }
  .route canvas {
    width: 34px;
  }
  .route b {
    display: none;
  }
  .route strong {
    font-size: 22px;
  }
  .route > span > span {
    font-size: 10px;
  }
  .route small {
    font-size: 9px;
  }
  .section-head {
    margin-top: 16px;
  }
  .command-line {
    font-size: 11px;
  }
}
@media (max-width: 520px) and (orientation: portrait) {
  .stage.title-mode {
    height: clamp(460px, 64svh, 590px);
  }
  .stage:not(.title-mode) {
    height: clamp(290px, 44svh, 390px);
  }
  #title-screen {
    align-items: flex-end;
    background: linear-gradient(0deg, #071014 0%, #071014db 27%, #07101400 67%);
  }
  .intro {
    margin: 0 23px 22px;
    max-width: 95%;
  }
  .intro h1 {
    font-size: clamp(63px, 16vw, 82px);
    line-height: 0.8;
    margin: 12px 0;
  }
  .intro p {
    max-width: 310px;
    margin-bottom: 15px;
    line-height: 1.45;
  }
  .intro .eyebrow {
    font-size: 9px;
  }
  .launch {
    min-height: 37px;
    padding: 7px 14px;
  }
  .routes {
    grid-template-columns: 1fr;
  }
  .route {
    min-height: 52px;
    flex-wrap: nowrap;
    padding: 6px 12px;
    gap: 13px;
  }
  .route canvas {
    width: 41px;
  }
  .route > span {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 8px;
  }
  .route > span > span {
    grid-column: 2;
  }
  .route b {
    display: block;
    align-self: center;
  }
  .tool-name {
    display: none;
  }
  .readouts {
    gap: 8px 18px;
  }
  .section-head > span {
    font-size: 10px;
  }
  .console-bar {
    padding: 0 10px;
  }
  .command-line {
    padding: 7px 9px;
    gap: 7px;
  }
  .score {
    right: 11px;
  }
  .sector {
    left: 11px;
  }
  .sector,
  .score {
    top: 11px;
  }
  .sector strong {
    font-size: 20px;
  }
  .tools .square {
    font-size: 20px;
  }
  .section-head h2 {
    font-size: 24px;
  }
  footer {
    font-size: 9px;
  }
}
@media (max-height: 550px) and (orientation: landscape) {
  .bar-inner {
    height: 40px;
  }
  main {
    padding-top: 7px;
  }
  .stage,
  .stage:not(.title-mode) {
    height: clamp(240px, 65svh, 350px);
  }
  .intro h1 {
    font-size: 60px;
    margin: 9px 0;
  }
  .intro p {
    max-width: 340px;
    font-size: 10px;
    margin: 0 0 9px;
  }
  .launch {
    min-height: 30px;
    padding: 5px 13px;
  }
  .console-bar {
    height: 22px;
  }
  .command-line {
    min-height: 30px;
  }
  .tool {
    height: 29px;
  }
  dialog {
    max-height: 95dvh;
  }
}
body.expanded .topbar {
  position: sticky;
  top: 0;
  z-index: 4;
}
body.expanded main {
  max-width: none;
  padding: 0 4px;
}
body.expanded .stage {
  height: 70svh;
}

.cal .month {
  grid-column: 1/-1;
  text-align: center;
  font-size: 14px;
  color: var(--lime);
  margin-bottom: 5px;
}
