:root {
  color-scheme: dark;
  --space: #050813;
  --cyan: #61f6ff;
  --cyan-dim: rgba(97, 246, 255, .62);
  --red: #ff4c65;
  --yellow: #fff06b;
  --blue: #5b7cff;
  --green: #6dff8e;
  --ink: #091126;
  --panel: rgba(5, 12, 31, .92);
  --white: #f5fbff;
  --muted: #a4c6d5;
  --line: rgba(97, 246, 255, .32);
}

* { box-sizing: border-box; }

html { background: var(--space); scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(41, 74, 197, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 74, 197, .16) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, #142c58 0%, var(--space) 48rem);
  background-size: 24px 24px, 24px 24px, auto;
  color: var(--white);
  font-family: "Courier New", ui-monospace, monospace;
  letter-spacing: .035em;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: -4rem;
  left: 1rem;
  padding: .5rem .75rem;
  color: var(--space);
  background: var(--yellow);
}

.skip-link:focus { top: 1rem; }

.site-header {
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

main { padding: 0; }

.section-block { margin: clamp(2.5rem, 6vw, 5rem) 0; }

.section-heading { max-width: 760px; margin-bottom: 1.5rem; }
.section-heading.compact { margin-bottom: 1rem; }
.section-heading p:not(.section-kicker) { color: var(--muted); }
.objects .section-heading { max-width: none; }

@media (min-width: 960px) {
  .objects .section-heading > p:not(.section-kicker) { white-space: nowrap; }
}

.briefing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(290px, .92fr);
  gap: 1rem;
  align-items: start;
}

a { color: var(--yellow); }
a:hover, a:focus-visible { color: var(--cyan); }

.top-nav {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 .75rem;
  font-size: clamp(.61rem, 1.8vw, .76rem);
}

.top-nav a, footer a, .text-link {
  text-decoration: none;
}

.top-nav a:hover, .top-nav a:focus-visible, footer a:hover, footer a:focus-visible, .text-link:hover, .text-link:focus-visible {
  text-decoration: underline;
}

.eyebrow, .section-kicker {
  margin: 0;
  color: var(--yellow);
  font-size: clamp(.65rem, 1.9vw, .82rem);
}

h1, h2, h3 { margin: 0; font-weight: normal; }

h1 {
  margin: 0;
  color: var(--cyan);
  font-size: clamp(1.65rem, 5vw, 3rem);
  line-height: .94;
  letter-spacing: .02em;
  text-shadow: 0 0 18px rgba(97, 246, 255, .62);
}

h1 span { color: var(--yellow); }

h2 {
  margin-top: .6rem;
  color: var(--yellow);
  font-size: clamp(.93rem, 2.7vw, 1.25rem);
  line-height: 1.45;
}

h3 {
  color: var(--yellow);
  font-size: .92rem;
}

.release-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.button {
  display: inline-block;
  padding: .75rem .95rem;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  background: rgba(9, 17, 38, .82);
  font-size: clamp(.65rem, 1.8vw, .78rem);
  text-decoration: none;
  box-shadow: inset 0 0 14px rgba(51, 76, 255, .25);
}

.button:hover, .button:focus-visible {
  color: var(--space);
  background: var(--cyan);
  text-decoration: none;
}

.button.primary {
  border-color: var(--yellow);
  color: var(--yellow);
}

.button.primary:hover, .button.primary:focus-visible {
  background: var(--yellow);
  color: var(--space);
}

.panel {
  margin-top: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 0 26px rgba(51, 76, 255, .12), inset 0 0 28px rgba(97, 246, 255, .035);
}

main > .section-block:first-child { margin-top: 1.25rem; }

.panel p:not(.section-kicker):not(.state) {
  margin: .9rem 0 0;
  color: #e7f8ff;
  font-size: clamp(.73rem, 2vw, .9rem);
  line-height: 1.7;
}

.panel strong { color: var(--yellow); font-weight: normal; }

.controls dl {
  display: grid;
  grid-template-columns: minmax(7rem, .75fr) minmax(0, 2fr);
  gap: 0;
  margin: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.controls dl div { display: contents; }
.controls dt, .controls dd {
  margin: 0;
  padding: .65rem .25rem;
  border-bottom: 1px solid var(--line);
  font-size: clamp(.68rem, 1.8vw, .8rem);
  line-height: 1.45;
}
.controls dt { color: var(--yellow); }
.controls dd { color: #e7f8ff; }
.hint { color: var(--cyan-dim) !important; }

.sprite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.sprite-card {
  min-height: 196px;
  padding: .9rem;
  border: 1px solid var(--line);
  background: rgba(9, 17, 38, .65);
}

.sprite-icon {
  display: block;
  width: 100%;
  height: 54px;
  margin: 0 0 .65rem;
  overflow: visible;
}

.state {
  margin: .4rem 0 .5rem;
  font-size: .63rem;
}
.state.collect { color: var(--green); }
.state.destroy { color: var(--red); }
.state.survive { color: var(--cyan); }

.sprite-card p:last-child {
  margin: 0;
  color: #e7f8ff;
  font-size: .69rem;
  line-height: 1.55;
}

.text-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: .75rem;
}

.release-links { text-align: center; }
.release-links .section-heading { margin-inline: auto; }

footer {
  margin-top: 0;
  padding: 0 0 3rem;
  color: var(--muted);
  font-size: .64rem;
  line-height: 1.6;
  text-align: center;
}

footer p { margin: .3rem 0; }
footer span { color: var(--cyan-dim); padding: 0 .3rem; }

@media (max-width: 540px) {
  .site-header, main, footer { width: min(100% - 1rem, 1120px); }
  .controls dl { grid-template-columns: 1fr; }
  .controls dt { padding-bottom: .15rem; border-bottom: 0; }
  .controls dd { padding-top: .15rem; }
}

@media (max-width: 880px) {
  .briefing-grid { grid-template-columns: 1fr; }
  .sprite-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  .sprite-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .site-header h1 { animation: terminal-flicker 5s infinite steps(1, end); }
  @keyframes terminal-flicker { 96% { opacity: 1; } 97% { opacity: .95; } 98% { opacity: 1; } }
}
