* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
}

body {
  margin: 0;
  background: #0b100e;
  color: #ebf4e7;
  font:16px/1.55 "Segoe UI",sans-serif;
}

button,select,input {
  font:inherit;
}

button,select,.verify {
  color: inherit;
  background: #19231d;
  border: 1px solid #435747;
  border-radius: 9px;
  padding:10px 14px;
}

button:not(:disabled),select,.verify {
  cursor:pointer;
}

button:disabled {
  opacity:.45;
}

a {
  color: inherit;
  text-decoration:none;
}

button:focus-visible,a:focus-visible,select:focus-visible,.verify:focus-within {
  outline: 3px solid #c4ff6b;
  outline-offset:4px;
}

[hidden] {
  display:none!important;
}

header,footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px max(5vw,18px);
  border-bottom:1px solid #344136;
}

nav {
  display: flex;
  align-items: center;
  gap:24px;
}

.logo {
  font: 850 19px/1 "Segoe UI",sans-serif;
  letter-spacing: .15em;
  color:#c4ff6b;
}

.hero {
  min-height: 605px;
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  background:#070a08;
}

.wafer {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:linear-gradient(90deg,#080b09 3%,#080b09bb 33%,transparent 68%),url(wafer.webp) right 48%/auto 125% no-repeat;
}

.heroText {
  margin: 5vw;
  max-width:520px;
}

.label,.meter,small,.heroBadge {
  font: 600 12px/1.45 Consolas,monospace;
  letter-spacing: .12em;
  color:#b6cbba;
}

.hero h1 {
  font-size: clamp(74px,10vw,162px);
  line-height: .83;
  letter-spacing: -.09em;
  margin:26px 0;
}

.hero h1 i {
  font-weight: 800;
  color:#c4ff6b;
}

.heroText>p:not(.label) {
  max-width: 330px;
  font-size:19px;
}

.primary {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  background: #c4ff6b;
  color: #112308;
  border: 0;
  border-radius: 40px;
  padding: 14px 22px;
  font-weight:800;
}

.primary:hover {
  background:#e0ffa9;
}

.heroBadge {
  position: absolute;
  right: 5vw;
  bottom: 24px;
  background: #15201ae8;
  padding: 8px 14px;
  border-radius:30px;
}

#bench,#rules {
  max-width: 1440px;
  margin: auto;
  padding:72px 5vw;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom:24px;
}

.section-title>p {
  max-width: 340px;
  color:#b6cbba;
}

h2 {
  font-size: clamp(36px,5vw,74px);
  line-height: 1;
  margin: 10px 0;
  letter-spacing:-.06em;
}

.bench {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap:24px;
}

.instrument,.control {
  border: 1px solid #4a6250;
  border-radius: 22px;
  background: #101a14;
  padding:20px;
}

.meter,.stats,.receipt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap:12px;
}

#wave {
  width: 100%;
  background: #06100a;
  display: block;
  border: 1px solid #304c39;
  border-radius: 8px;
  margin:13px 0;
}

.sockets {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap:8px;
}

.sockets button {
  border-radius: 5px 5px 12px 12px;
  padding:11px 3px;
}

.sockets button[aria-pressed=true] {
  background: #baf862;
  color:#10200d;
}

.control label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom:10px;
}

.stats {
  margin:21px 0;
}

.stats strong {
  display: block;
  font:700 24px Consolas,monospace;
}

.receipt {
  border-block: 1px solid #344c3b;
  margin-top: 22px;
  padding:14px 0;
}

.receipt div {
  flex:1;
}

.receipt p {
  margin:0;
}

.verify input {
  display: block;
  max-width: 165px;
  padding: 0;
  border: 0;
  background: none;
  font-size:12px;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap:32px;
}

.notes p,footer span {
  color:#bbcabd;
}

dialog {
  background: #101a14;
  color: #fff;
  border: 1px solid #485f4e;
  border-radius: 12px;
  max-width:min(92vw,900px);
}

dialog video {
  max-width: 100%;
  display:block;
}

dialog::backdrop {
  background:#050905d9;
}

@media(max-width:720px) {
  header {
    padding: 12px 14px;
    gap:10px;
  }
  .logo {
    font-size: 14px;
    white-space:nowrap;
  }
  nav {
    gap: 8px;
    font-size:13px;
  }
  nav button {
    padding:7px;
  }
  nav a:last-of-type {
    display:none;
  }
  .hero {
    min-height: 620px;
    align-items:end;
  }
  .wafer {
    background:linear-gradient(0deg,#080b09 0%,#080b09cb 34%,transparent 72%),url(wafer.webp) 69% top/auto 75% no-repeat;
  }
  .heroText {
    margin:0 21px 68px;
  }
  .hero h1 {
    font-size:76px;
  }
  .heroBadge {
    left: 21px;
    right: auto;
    font-size:10px;
  }
  .bench,.notes {
    grid-template-columns:1fr;
  }
  .section-title {
    display:block;
  }
  #bench,#rules {
    padding:48px 16px;
  }
  .receipt {
    flex-wrap:wrap;
  }
  .receipt div {
    flex-basis:100%;
  }
  footer {
    gap: 15px;
    font-size:12px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }
}

:root {
  --phosphor: #c4ff6b;
  --instrument: #101a14;
  --signal:#79ad70;
}

.hero {
  min-height: 658px;
  min-height: clamp(615px,78svh,810px);
  border-bottom:1px solid #496844;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,#87ff7310 0 1px,transparent 1px 5px);
  opacity: .35;
  z-index:-1;
}

.heroText {
  position: relative;
  z-index:1;
}

.heroText>.label {
  color: var(--phosphor);
  display: flex;
  align-items: center;
  gap:11px;
}

.heroText>.label::before {
  content: "";
  width: 25px;
  height: 1px;
  background:currentColor;
}

.reticle {
  position: absolute;
  top: 27%;
  right: 13%;
  width: clamp(150px,26vw,350px);
  aspect-ratio: 1.12;
  border: 1px solid #a3f57545;
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(-17deg);
  box-shadow:0 0 70px #91ef4d1f;
}

.reticle::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  border:1px dashed #b5fd8b55;
}

.reticle span {
  position: absolute;
  top: -28px;
  right: 0;
  color: #d5ffbb;
  font: 11px Consolas,monospace;
  letter-spacing: .12em;
  transform: rotate(17deg);
  text-shadow:0 1px 6px #000;
}

.heroBadge b,.signal {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
  margin-right: 7px;
  vertical-align:2px;
}

body[data-phase=running],body[data-phase=complete] {
  --signal:#c4ff6b;
}

body[data-phase=tripped] {
  --signal:#ffac6e;
}

.instrument {
  box-shadow:inset 0 2px 0 #a2ff8832,0 12px 60px #0005;
}

.meter strong {
  color: var(--signal);
  font-size:16px;
}

.stats>div:first-child strong {
  color:var(--signal);
}

body[data-phase=running] .signal {
  animation:trigger 1s ease-in-out infinite alternate;
}

@keyframes trigger {
  to {
    box-shadow:0 0 21px 3px var(--signal);
  }
}

@media(max-width:720px) {
  .hero {
    min-height: 650px;
    min-height:clamp(580px,90svh,715px);
  }
  .reticle {
    right: 16%;
    top: 13%;
    width:46vw;
  }
  .reticle span {
    font-size:9px;
  }
  .heroText>.label {
    font-size:10px;
  }
  .heroText>p:not(.label) {
    font-size:17px;
  }
}

@media(prefers-reduced-motion:reduce) {
  body[data-phase=running] .signal {
    animation:none;
  }
}

.control label {
  font-weight:600;
}

.forecast {
  font: 600 13px/1.45 Consolas,monospace;
  border-left: 2px solid #a5dc62;
  background: #a5dc6210;
  padding: 9px 12px;
  margin: 14px 0 6px;
  color:#d3f4bd;
}

.forecast[data-trip=true] {
  color: #ffc08f;
  border-color: #ffac6e;
  background:#ffac6e12;
}

.projection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom:12px;
}

.projection strong {
  font: 600 14px Consolas,monospace;
  color:#d4edca;
}

.projection button {
  font-size:13px;
}

.stats {
  flex-wrap:wrap;
}

.stats>div {
  flex:1 0 80px;
}

#status {
  min-height:1.55em;
}

@media(max-width:420px) {
  .heroText {
    margin-inline:16px;
  }
  .hero h1 {
    font-size:clamp(64px,19vw,76px);
  }
  .heroBadge {
    left:16px;
  }
  .instrument,.control {
    padding:14px;
  }
  .sockets {
    gap:5px;
  }
  .sockets button {
    font-size:14px;
  }
  .stats small {
    font-size: 10px;
    letter-spacing:.06em;
  }
  .stats strong {
    font-size:20px;
  }
  .control #run {
    width:100%;
  }
  #stop {
    margin-top:8px;
  }
}

.verify {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height:46px;
}

.verify input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor:pointer;
}

.verify:hover,button:not(:disabled):not(.primary):hover {
  border-color:#9bb4a0;
}
