.prototype-header {
  width: min(100% - 1.5rem, 76rem);
}

.prototype-main {
  width: min(100% - 1.5rem, 76rem);
}

.prototype-intro {
  display: grid;
  gap: 1.5rem;
  padding: clamp(2.75rem, 8vw, 5.5rem) 0 2rem;
}

.prototype-intro h1 {
  margin: 0;
  font-size: clamp(4rem, 17vw, 8rem);
  line-height: 0.75;
  letter-spacing: -0.08em;
  text-transform: uppercase;
}

.prototype-intro > p {
  max-width: 35rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.relay-shell {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.play-surface {
  position: relative;
  min-height: clamp(22rem, 68vh, 38rem);
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
  background:
    radial-gradient(circle at 50% 50%, rgb(126 215 255 / 13%), transparent 35%),
    #121815;
  outline: none;
  user-select: none;
}

.play-surface:focus-visible {
  box-shadow: inset 0 0 0 4px var(--lime);
}

.field-grid {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 3rem 3rem;
  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}

.field-label {
  position: absolute;
  z-index: 2;
  left: 1rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-label-top {
  top: 1rem;
}

.field-label-bottom {
  bottom: 1rem;
}

.signal {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 5rem;
  height: 5rem;
  background: rgb(200 255 61 / 13%);
  border: 1px solid rgb(200 255 61 / 70%);
  border-radius: 50%;
  box-shadow: 0 0 3rem rgb(200 255 61 / 24%);
  transform: translate(-50%, -50%);
  transition:
    top 100ms ease-out,
    left 100ms ease-out;
  place-items: center;
  pointer-events: none;
}

.signal::before,
.signal::after {
  position: absolute;
  content: "";
  background: rgb(200 255 61 / 55%);
}

.signal::before {
  width: 8rem;
  height: 1px;
}

.signal::after {
  width: 1px;
  height: 8rem;
}

.signal span {
  z-index: 1;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 1.5rem var(--lime);
}

.signal[data-pulse="odd"] span {
  animation: signal-pulse 320ms ease-out;
}

.status-panel {
  padding: 1.25rem;
  border-top: 1px solid var(--line);
}

.status-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.status-heading .eyebrow {
  margin-bottom: 0.35rem;
}

.status-heading h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.event-count {
  color: var(--lime);
  font-size: 2.4rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.input-badges {
  display: grid;
  gap: 0.6rem;
  margin: 1.5rem 0;
}

.input-badge {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.75rem;
  padding: 0.75rem;
  background: #202421;
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.badge-light {
  flex: 0 0 auto;
  width: 0.75rem;
  height: 0.75rem;
  background: #686d69;
  border-radius: 50%;
}

.input-badge[data-seen="true"] {
  border-color: rgb(200 255 61 / 45%);
}

.input-badge[data-seen="true"] .badge-light {
  background: var(--lime);
  box-shadow: 0 0 1rem rgb(200 255 61 / 65%);
}

.input-badge span:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.input-badge strong {
  font-size: 0.85rem;
}

.input-badge small {
  color: var(--muted);
}

.last-input-block,
.history-block {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.last-input-block > span,
.history-block > span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.last-input-block output {
  font-size: 1rem;
  font-weight: 750;
}

.position-row {
  display: flex;
  gap: 0.6rem;
  padding-bottom: 1rem;
}

.position-row span {
  flex: 1;
  padding: 0.6rem 0.75rem;
  color: var(--muted);
  background: #121513;
  border-radius: 0.6rem;
  font-size: 0.72rem;
}

.position-row output {
  float: right;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.input-history {
  display: grid;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.input-history li {
  color: var(--muted);
  font-size: 0.75rem;
}

.input-history li::before {
  margin-right: 0.45rem;
  color: var(--lime);
  content: "↳";
}

.restart-button {
  width: 100%;
  min-height: 3rem;
  margin-top: 1rem;
  color: #101211;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
}

.restart-button:hover,
.restart-button:focus-visible {
  background: var(--lime);
  outline: 3px solid rgb(200 255 61 / 30%);
  outline-offset: 3px;
}

.instructions {
  padding: 4rem 0 5rem;
}

.instructions h2 {
  max-width: 16ch;
  margin: 0 0 2rem;
  font-size: clamp(2.25rem, 8vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.instruction-grid {
  display: grid;
  gap: 0.75rem;
}

.instruction-grid article {
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.instruction-grid article > span {
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 800;
}

.instruction-grid h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}

.instruction-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

@keyframes signal-pulse {
  0% {
    transform: scale(1);
  }
  55% {
    transform: scale(2.25);
    opacity: 0.35;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (min-width: 48rem) {
  .prototype-intro {
    grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
    align-items: end;
  }

  .relay-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.7fr);
  }

  .status-panel {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .instruction-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .signal {
    transition: none;
  }

  .signal[data-pulse="odd"] span {
    animation: none;
  }
}
