:root {
  --bg: #04110d;
  --bg-2: #071a14;
  --panel: #0c241c;
  --ink: #ecfdf5;
  --muted: #9dcdc0;
  --faint: #5f8f82;
  --line: color-mix(in oklab, #10b981 28%, transparent);
  --emerald: #10b981;
  --emerald-deep: #059669;
  --teal: #0f766e;
  --void: #022c22;
  --mint: #a7f3d0;
  --down: #fb7185;
  --shadow: 0 30px 80px rgb(0 0 0 / 0.35);
  --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 12% -10%, color-mix(in oklab, var(--emerald-deep) 28%, transparent), transparent 60%),
    linear-gradient(180deg, #06160f 0%, var(--bg) 38%, #030a08 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 20%, transparent 78%);
  opacity: 0.35;
}

a {
  color: var(--mint);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: white;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

p {
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--mint);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  background: var(--emerald-deep);
  color: white;
}

.skip:focus {
  top: 1rem;
}

.frame {
  position: fixed;
  inset: 14px;
  z-index: 8;
  pointer-events: none;
}

.frame__corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid color-mix(in oklab, var(--mint) 55%, transparent);
}

.frame__corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.frame__corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.frame__corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.frame__corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.nav,
.hero,
.strip,
.section,
.footer,
.missing {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav__links a:hover {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--emerald-deep);
  color: white;
}

.btn--primary:hover {
  background: #047857;
  color: white;
}

.btn--ghost {
  border-color: color-mix(in oklab, var(--mint) 28%, transparent);
  background: rgb(4 17 13 / 0.4);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 3.5rem;
  align-items: center;
  padding: 4.5rem 0 3.5rem;
}

.kicker {
  color: var(--emerald);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 0.7rem;
  font-size: clamp(3.4rem, 8vw, 6.4rem);
}

.hero h1 em {
  font-style: italic;
  color: var(--mint);
}

.lede {
  max-width: 38rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.def {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 1.1rem;
  max-width: 34rem;
  margin: 2.2rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.def dt {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--mint);
}

.def dd {
  margin: 0;
  color: var(--muted);
}

.def__pos {
  margin-right: 0.45rem;
  color: var(--faint);
  font-style: italic;
}

.board {
  position: relative;
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--panel) 86%, black);
  box-shadow: var(--shadow);
}

.board__glow {
  position: absolute;
  inset: auto auto -40% -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, color-mix(in oklab, var(--emerald) 30%, transparent), transparent 70%);
  pointer-events: none;
}

.board__head,
.card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.board__title {
  font-weight: 650;
  letter-spacing: -0.03em;
}

.board__sub,
.card p {
  color: var(--faint);
  font-size: 0.78rem;
}

.board__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--emerald);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--emerald) 70%, transparent);
  animation: pulse 1.8s ease-out infinite;
}

.board__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.stat {
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  background: color-mix(in oklab, #64748b 16%, var(--void));
}

.stat span,
.stat strong {
  display: block;
}

.stat span {
  color: var(--muted);
  font-size: 0.72rem;
}

.stat strong {
  margin-top: 0.1rem;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.stat--up {
  background: color-mix(in oklab, var(--emerald) 18%, var(--void));
  color: var(--emerald);
}

.stat--down {
  background: color-mix(in oklab, var(--down) 18%, var(--void));
  color: var(--down);
}

.card {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem 0.8rem;
  border-radius: 14px;
  background: color-mix(in oklab, white 4%, var(--bg-2));
}

.card h3 {
  font-size: 1rem;
  font-weight: 650;
}

.badge {
  flex: none;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
}

.badge--up {
  background: color-mix(in oklab, var(--emerald) 20%, transparent);
  color: var(--mint);
}

.badge--down {
  background: color-mix(in oklab, var(--down) 20%, transparent);
  color: #fecdd3;
}

.beats {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 1.7rem;
}

.beat {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 3px;
  transform-origin: center bottom;
  animation: rise 700ms calc(var(--i) * 12ms) both;
}

.beat--up { background: #10b981; }
.beat--down { background: #f43f5e; }

.strip {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  background: rgb(4 17 13 / 0.55);
}

.strip p {
  font-size: 0.95rem;
}

.section {
  padding: 5rem 0 0;
}

.section__head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section__head h2 {
  margin-top: 0.55rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.section__head p:last-child {
  margin-top: 0.8rem;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.features article {
  padding: 1.2rem 1.2rem 1.3rem;
  border-top: 2px solid var(--emerald-deep);
  border-radius: 0 0 16px 16px;
  background: color-mix(in oklab, var(--panel) 70%, black);
}

.features h3 {
  font-size: 1.15rem;
}

.features p {
  margin-top: 0.55rem;
  color: var(--muted);
}

.section--split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: start;
}

.section--split .section__head {
  margin-bottom: 0;
}

.code {
  margin: 0;
  overflow: auto;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #07140f;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.7;
}

.code__ok { color: var(--mint); }
.code__bad { color: #fda4af; }

.start {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.start__notes {
  display: grid;
  gap: 1rem;
  color: var(--muted);
}

.start__notes .btn {
  margin-right: 0.5rem;
  margin-top: 0.4rem;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 4.5rem 0 3rem;
  color: var(--faint);
  font-size: 0.92rem;
}

.missing {
  padding: 18vh 0 30vh;
}

.missing h1 {
  margin-top: 0.6rem;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}

.missing .lede {
  margin-bottom: 1.4rem;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes rise {
  from { transform: scaleY(0.2); opacity: 0.2; }
  to { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 860px) {
  .hero,
  .section--split,
  .start,
  .features {
    grid-template-columns: 1fr;
  }

  .nav__links a:not(.btn) {
    display: none;
  }

  .hero {
    padding-top: 2.6rem;
  }

  .strip {
    border-radius: 18px;
    text-align: left;
  }

  .frame {
    inset: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse, .beat { animation: none; }
}
