:root {
  --black: #050806;
  --panel: #0a0e0a;
  --green: #b8ff18;
  --green-dim: #547c12;
  --orange: #ff9418;
  --red: #ff3e1f;
  --ink: #e9f7c7;
  --line: rgba(184, 255, 24, .24);
  --mind-accent: var(--green);
}

body[data-fly-mood="CURIOUS"] { --mind-accent: #d8ff72; }
body[data-fly-mood="AGITATED"] { --mind-accent: var(--orange); }
body[data-fly-mood="OBSESSED"] { --mind-accent: var(--red); }
body[data-fly-mood="EXHAUSTED"] { --mind-accent: #8b9d79; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--black);
  font-family: "Lucida Console", Monaco, "Courier New", monospace;
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.15) 0 1px, transparent 1px 4px);
  opacity: .45;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.topbar {
  height: 62px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 2.4vw;
  position: relative;
  z-index: 3;
  font-size: .78rem;
  letter-spacing: .08em;
}

.brand {
  color: var(--green);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}

.brand-mark { color: var(--orange); margin-right: .5rem; }
.status { color: var(--green); }
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 1.2s steps(2) infinite;
}
.network-error .status-dot { background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.protocol { justify-self: end; color: #84956c; }

main { width: min(1500px, 100%); margin: 0 auto; }

.hero {
  min-height: 670px;
  display: grid;
  grid-template-columns: .84fr 1.28fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: 5vw 2.4vw 2.2vw;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40%;
  border-left: 1px dashed rgba(184,255,24,.12);
}

.eyebrow, .data-label, .tiny, .metric-note, .section-number {
  color: var(--green);
  font-size: .73rem;
  letter-spacing: .1em;
}

.eyebrow::before { content: "> "; color: var(--orange); }

h1 {
  font-size: clamp(3.5rem, 6.3vw, 7.6rem);
  line-height: .82;
  letter-spacing: -.09em;
  margin: 1.4rem 0 2rem;
  color: #f2f7e8;
  text-shadow: 4px 0 0 rgba(184,255,24,.18);
}

.blink { color: var(--green); animation: blink .9s steps(1) infinite; }

.lede {
  margin: 0;
  color: #a9b89a;
  font-size: clamp(.95rem, 1.2vw, 1.15rem);
  text-transform: uppercase;
}

.machine {
  position: relative;
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(410px, 1fr) 150px;
  min-width: 0;
  min-height: 590px;
  overflow: visible;
}

.machine-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: visible;
}

.machine-stage::before {
  content: "";
  position: absolute;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgba(184,255,24,.15);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(184,255,24,.08), inset 0 0 50px rgba(184,255,24,.04);
}

.fly-3d {
  position: absolute;
  inset: -4% -3% 0;
  z-index: 1;
  filter: drop-shadow(0 0 26px rgba(184,255,24,.12));
}
.fly-3d canvas { outline: none; }
.fly-3d.is-error::after {
  content: "3D NEURAL LINK UNAVAILABLE";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--orange);
  font-size: .72rem;
  letter-spacing: .08em;
}

.mental-hud {
  position: absolute;
  left: 3%;
  bottom: 4%;
  z-index: 7;
  width: min(380px, 48%);
  padding: .9rem 1rem;
  border: 1px solid color-mix(in srgb, var(--mind-accent) 62%, transparent);
  background: rgba(4,8,5,.86);
  box-shadow: 0 0 32px color-mix(in srgb, var(--mind-accent) 10%, transparent), inset 0 0 24px rgba(0,0,0,.35);
  backdrop-filter: blur(5px);
  transition: border-color .35s, box-shadow .35s;
}
.mental-hud > span {
  display: block;
  margin-bottom: .2rem;
  color: #71805f;
  font-size: .62rem;
  letter-spacing: .12em;
}
.mental-hud > strong {
  display: block;
  overflow: hidden;
  color: var(--mind-accent);
  font-size: clamp(1.25rem, 2.25vw, 2.25rem);
  line-height: 1;
  letter-spacing: -.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 18px color-mix(in srgb, var(--mind-accent) 46%, transparent);
  transition: color .35s, text-shadow .35s;
}
.mental-drive-track {
  height: 5px;
  margin: .72rem 0 .55rem;
  border: 1px solid color-mix(in srgb, var(--mind-accent) 34%, transparent);
  background: rgba(0,0,0,.45);
}
.mental-drive-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--mind-accent);
  box-shadow: 0 0 12px var(--mind-accent);
  transition: width .45s linear, background .35s;
}
.mental-readout {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: .75rem;
  color: #6f805c;
  font-size: .58rem;
  letter-spacing: .04em;
  white-space: nowrap;
}
.mental-readout b { color: var(--mind-accent); font-weight: 400; }
.mental-readout span:last-child { justify-self: end; color: var(--mind-accent); }
body[data-fly-mood="OBSESSED"] .mental-hud { animation: neural-alarm .42s steps(2) infinite; }
body[data-fly-mood="AGITATED"] .mental-hud { animation: neural-alarm .9s steps(2) infinite; }

.scan-line {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(184,255,24,.65);
  box-shadow: 0 0 12px var(--green);
  animation: scan 5s linear infinite;
  pointer-events: none;
}

.live-feed {
  position: relative;
  z-index: 5;
  min-width: 0;
  border: 1px solid rgba(184,255,24,.28);
  background: rgba(4,8,5,.9);
  box-shadow: 0 0 28px rgba(184,255,24,.05), inset 0 0 24px rgba(184,255,24,.025);
  overflow: hidden;
}
.live-feed::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 39px, rgba(184,255,24,.035) 39px 40px);
}
.live-feed-head {
  position: relative;
  z-index: 2;
  min-height: 32px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 1.25fr 1fr auto auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(184,255,24,.16);
  color: #6f805c;
  font-size: .64rem;
  letter-spacing: .06em;
  white-space: nowrap;
}
.live-feed-head b { color: var(--orange); font-weight: 400; }
.live-title { color: var(--green); }
.live-title i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse .7s steps(2) infinite;
}
.neural-scope {
  display: block;
  width: 100%;
  height: 82px;
}
.channel-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  align-items: center;
  gap: 15px;
  min-height: 34px;
  padding: 0 10px;
  border-top: 1px solid rgba(184,255,24,.12);
  color: #71805f;
  font-size: .59rem;
  letter-spacing: .05em;
  white-space: nowrap;
}
.channel-strip b { color: var(--green); font-weight: 400; }
.channel-strip .is-spike { color: var(--orange); text-shadow: 0 0 8px var(--orange); }
.hash-rule { justify-self: end; color: #586749; }

.machine-label {
  position: absolute;
  z-index: 3;
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: rgba(5,8,6,.82);
  color: var(--green);
  font-size: .67rem;
  letter-spacing: .08em;
}

.label-a { left: 9%; top: 21%; }
.label-b { left: 42%; top: 14%; }
.label-c { right: 7%; bottom: 22%; color: var(--orange); }

.crosshair {
  position: absolute;
  width: 19px;
  height: 19px;
  border: 1px solid var(--red);
  z-index: 3;
}
.crosshair::before, .crosshair::after { content:""; position:absolute; background:var(--red); }
.crosshair::before { width: 27px; height:1px; left:-5px; top:8px; }
.crosshair::after { width:1px; height:27px; top:-5px; left:8px; }
.crosshair-a { left: 47%; top: 40%; }
.crosshair-b { right: 18%; top: 58%; }

.countdown-block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.2rem;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.countdown-block strong {
  color: var(--orange);
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  line-height: 1;
  letter-spacing: -.08em;
}
.tiny { justify-self: end; color: #71805f; }

.telemetry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.metric {
  min-height: 175px;
  padding: 1.35rem 1.4rem;
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto 1fr auto;
}
.metric:last-child { border-right: 0; }
.metric-index { color: #4a5840; font-size: .75rem; }
.metric strong {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--green);
  font-size: clamp(1.25rem, 2.1vw, 2.25rem);
  letter-spacing: -.06em;
  white-space: nowrap;
}
.metric-note { grid-column: 1 / -1; color: #667356; font-size: .65rem; }
.warning-metric strong { color: var(--red); }

.lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  border-bottom: 1px solid var(--line);
}

.explainer, .terminal { padding: 2.5rem 2.4vw; }
.explainer { border-right: 1px solid var(--line); }
.section-number { margin: 0 0 2rem; }
.explainer ol { list-style: none; padding: 0; margin: 0; }
.explainer li {
  display: grid;
  grid-template-columns: 55px 1fr;
  gap: .8rem;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(184,255,24,.12);
  color: #b9c7ab;
}
.explainer li span { color: var(--orange); }

.terminal { background: #070a07; }
.terminal-head {
  display: flex;
  justify-content: space-between;
  color: var(--green);
  border-bottom: 1px solid var(--line);
  padding-bottom: .75rem;
  font-size: .75rem;
}
.terminal-head a { color: var(--green); text-decoration: none; }
.terminal-head a:hover, .terminal-head a:focus-visible { color: var(--orange); }
.log { padding-top: 1rem; color: #7f936b; font-size: .74rem; line-height: 1.8; }
.log-line { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; }
.log-line em { color: var(--green); font-style: normal; }
.log-line.warning em { color: var(--orange); }
.log-line.success em, .success-metric strong { color: var(--green); text-shadow: 0 0 12px rgba(184,255,24,.45); }

.new-block .machine { animation: block-hit 1.5s steps(3); }
.new-block .scan-line { background: var(--orange); box-shadow: 0 0 24px var(--orange); }

.manifesto {
  min-height: 310px;
  padding: 4.4rem 2.4vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-weight: 900;
  font-size: clamp(2rem, 5.4vw, 6.5rem);
  line-height: .92;
  letter-spacing: -.07em;
  border-bottom: 1px solid var(--line);
}
.manifesto p { margin: 0; }
.manifesto p:first-child { color: #eef5e7; }
.manifesto p:last-child { color: var(--green); }

footer {
  width: min(1500px, 100%);
  margin: 0 auto;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.4vw;
  color: #657057;
  font-size: .7rem;
  letter-spacing: .08em;
}
footer a { color: #81926c; text-decoration: none; }
footer a:hover, footer a:focus-visible { color: var(--green); }

@keyframes pulse { 50% { opacity: .2; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hover { 50% { transform: translateY(-6px); } }
@keyframes scan { from { top: 8%; } to { top: 92%; } }
@keyframes signal-travel { from { left: 0; } to { left: 100%; } }
@keyframes neural-flash {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.85); box-shadow: 0 0 32px var(--orange); }
}
@keyframes block-hit {
  0%, 100% { filter: none; }
  33% { filter: brightness(1.6) contrast(1.3); }
  66% { filter: hue-rotate(25deg); }
}
@keyframes neural-alarm { 50% { filter: brightness(1.22); } }

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .protocol { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 3.5rem; }
  .hero::before { display: none; }
  .machine { grid-template-rows: minmax(350px, 1fr) 150px; min-height: 520px; margin: 1rem 0; }
  .fly-3d { inset-inline: -8%; }
  .countdown-block { grid-template-columns: 1fr auto; }
  .countdown-block .tiny { grid-column: 1 / -1; justify-self: start; }
  .telemetry { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .topbar { height: 54px; padding-inline: 1rem; }
  .status { font-size: .65rem; }
  .hero { min-height: auto; padding: 3.5rem 1rem 1.4rem; }
  h1 { font-size: clamp(3.2rem, 16vw, 5.2rem); }
  .machine { grid-template-rows: 280px 174px; min-height: 454px; margin-inline: 0; }
  .fly-3d { inset: -2% -18% 0; }
  .mental-hud { left: 0; right: 0; bottom: 1%; width: auto; padding: .72rem .8rem; }
  .mental-hud > strong { font-size: 1.4rem; }
  .mental-readout { gap: .45rem; font-size: .53rem; }
  .machine-label { font-size: .55rem; }
  .label-a { left: 2%; }
  .label-b { left: 40%; top: 9%; }
  .label-c { right: 2%; }
  .live-feed-head { grid-template-columns: 1fr auto; gap: 4px 10px; padding-block: 6px; }
  .live-feed-head span:nth-child(2) { text-align: right; }
  .live-feed-head span:nth-child(3) { grid-column: 1; }
  .live-feed-head span:nth-child(4) { grid-column: 2; text-align: right; }
  .neural-scope { height: 78px; }
  .channel-strip { grid-template-columns: repeat(3, 1fr); gap: 5px; min-height: 52px; }
  .hash-rule { grid-column: 1 / -1; justify-self: start; }
  .countdown-block strong { font-size: 3.6rem; }
  .telemetry { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); min-height: 145px; padding-inline: 1rem; }
  .metric:last-child { border-bottom: 0; }
  .lower-grid { grid-template-columns: 1fr; }
  .explainer { border-right: 0; border-bottom: 1px solid var(--line); }
  .explainer, .terminal { padding: 2rem 1rem; }
  .manifesto { padding: 3.5rem 1rem; min-height: 260px; }
  footer { align-items: flex-start; flex-direction: column; gap: .5rem; padding: 1.4rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
