:root {
  --bg: #090c12;
  --bg-2: #0d1119;
  --panel: #11161f;
  --line: #202836;
  --text: #d8dee8;
  --dim: #7a8493;
  --faint: #48515f;
  --accent: #2dd4bf;
  --cc: #5cb0ff;
  --cx: #c08cff;
  --you: #7ee0a3;
  --amber: #ffc777;
  --err: #ff7a85;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0 1px, transparent 1px 42px),
    var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
}
.wrap { width: min(1080px, 92vw); margin: 0 auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); text-decoration: none; }
b { font-weight: 700; color: var(--text); }
.accent { color: var(--accent); }
.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.defs { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(9,12,18,.86);
  backdrop-filter: blur(10px);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { color: var(--text); font-weight: 700; letter-spacing: .02em; }
.brand-caret { color: var(--accent); }
.topnav { display: flex; gap: 22px; align-items: center; font-size: .9rem; }
.topnav a { color: var(--dim); }
.topnav a:hover, .topnav .gh { color: var(--text); }

.hero { padding: 16px 0 12px; display: grid; align-items: center; }
.term {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  box-shadow: 0 30px 90px -42px rgba(0,0,0,.9);
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.016);
}
.tdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tdot.r { background: #ff5f56; } .tdot.y { background: #ffbd2e; } .tdot.g { background: #27c93f; }
.term-name { color: var(--dim); font-size: .82rem; margin-left: 8px; }
.term-tag {
  margin-left: auto;
  color: var(--amber);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.term-tag.released { color: var(--you); }
.term-tag.held { color: var(--amber); }
.hero-term::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 42px 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45,212,191,.65), transparent);
  animation: trace 3.6s ease-in-out infinite;
}
@keyframes trace {
  0%, 100% { opacity: .24; transform: translateX(-18%); }
  50% { opacity: .8; transform: translateX(18%); }
}
.terminal-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto auto auto;
  gap: 8px;
  padding: clamp(16px, 2vw, 24px);
}
.hero-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  color: var(--dim);
  font-size: .9rem;
}
.prompt-mini {
  color: var(--accent);
  font-weight: 700;
  flex: none;
}
h1 {
  color: var(--text);
  max-width: 720px;
  font-size: clamp(2.2rem, 4.8vw, 3.15rem);
  line-height: 1.04;
  letter-spacing: 0;
}
h1 span { color: var(--you); }
.hero-note {
  max-width: 760px;
  color: var(--dim);
  font-size: clamp(.92rem, 1.4vw, 1.02rem);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  font: 600 .86rem var(--mono);
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-go { color: #041d18; border-color: var(--accent); background: var(--accent); }
.btn-ghost { color: var(--dim); }
.replay .icon { width: 1.05rem; height: 1.05rem; }
.terminal-prompt {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.terminal-prompt::-webkit-scrollbar { display: none; }
.command-buffer {
  display: none;
  align-items: center;
  gap: 3px;
  min-height: 30px;
  min-width: min(210px, 42vw);
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid rgba(45,212,191,.38);
  border-radius: 6px;
  color: var(--text);
  background: rgba(45,212,191,.045);
  font: 600 .72rem var(--mono);
  white-space: nowrap;
  overflow: hidden;
}
.terminal-prompt.commanding .command-buffer { display: inline-flex; }
.terminal-prompt.commanding .cmd-chip { opacity: .38; }
.terminal-prompt.commanding .cmd-chip.active,
.terminal-prompt.commanding .cmd-chip:hover,
.terminal-prompt.commanding .cmd-chip:focus-visible { opacity: 1; }
.buffer-caret {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}
.cmd-chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--dim);
  font: 600 .72rem var(--mono);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}
.cmd-chip .icon { color: var(--faint); }
.cmd-chip:hover,
.cmd-chip:focus-visible,
.cmd-chip.active {
  outline: none;
  border-color: rgba(45,212,191,.55);
  background: rgba(45,212,191,.045);
  color: var(--text);
  transform: translateY(-1px);
}
.cmd-chip:hover .icon,
.cmd-chip:focus-visible .icon,
.cmd-chip.active .icon { color: var(--accent); }
.cmd-chip.confirm { border-color: rgba(126,224,163,.32); color: var(--you); }
.cmd-chip.confirm .icon { color: var(--you); }
.term-body {
  align-self: end;
  padding: 0;
  min-height: 106px;
  max-height: 128px;
  overflow-y: auto;
  font-size: clamp(.82rem, 1.2vw, .94rem);
  line-height: 1.72;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body::-webkit-scrollbar { width: 8px; }
.term-body::-webkit-scrollbar-track { background: transparent; }
.term-body::-webkit-scrollbar-thumb { background: rgba(122,132,147,.28); border-radius: 999px; }
.tl { display: block; }
.tl .lbl { font-weight: 700; }
.tl .role { color: var(--faint); font-size: .72rem; letter-spacing: .08em; margin-left: 8px; }
.tl-tales, .tl-rec { color: var(--accent); }
.tl-sys, .muted { color: var(--dim); }
.tl-cc { color: var(--cc); }
.tl-cx { color: var(--cx); }
.tl-you, .tl-ok { color: var(--you); }
.tl-warn { color: var(--amber); }
.tl-diff { color: var(--text); }
.tl-diff .file { color: var(--you); }
.tl-diff .meta { color: var(--faint); }
.tl-runtime { animation: terminalIn .22s ease both; }
.tl-prompt { color: var(--text); }
.tl-prompt .pc { color: var(--accent); font-weight: 700; }
.indent { padding-left: 18px; }
.cursor { display: inline-block; width: 9px; color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes terminalIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.hero-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding-top: 6px;
  color: var(--dim);
  font-size: .78rem;
  border-top: 1px solid rgba(32,40,54,.7);
}
.hero-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quiet-action {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: 600 .76rem var(--mono);
  cursor: pointer;
}
.quiet-action:hover { color: var(--text); }
.quiet-action:focus-visible,
.btn:focus-visible,
.cmd-chip:focus-visible,
.demo-play:focus-visible {
  outline: 2px solid rgba(45,212,191,.75);
  outline-offset: 2px;
}
.scanline {
  pointer-events: none;
  position: absolute;
  inset: 42px 0 0;
  background: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 100% 4px;
  mix-blend-mode: overlay;
  opacity: .28;
}

.band { padding: 74px 0; border-top: 1px solid var(--line); }
.band.alt { background: rgba(255,255,255,.012); }
#why { padding-top: 16px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: .8rem;
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.band h2 { font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.14; font-weight: 700; letter-spacing: 0; }
.band h2 code { color: var(--accent); background: var(--panel); padding: 1px 8px; border-radius: 6px; border: 1px solid var(--line); font-size: .82em; }
.lead { color: var(--dim); max-width: 700px; margin-top: 18px; font-size: 1rem; }
.transcript-list { margin: 34px 0; border-top: 1px solid var(--line); }
.line-card {
  border-bottom: 1px solid var(--line);
  color: var(--dim);
}
.line-card summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
}
.line-card summary::-webkit-details-marker { display: none; }
.line-card summary::before { content: "▸"; color: var(--faint); transition: transform .15s ease; }
.line-card[open] summary::before { transform: rotate(90deg); }
.line-card summary span { color: var(--text); font-weight: 700; }
.line-card summary em { margin-left: auto; color: var(--faint); font-style: normal; font-size: .72rem; letter-spacing: .1em; }
.line-card.cc summary span { color: var(--cc); }
.line-card.cx summary span { color: var(--cx); }
.line-card.you-line summary span { color: var(--you); }
.line-card p { padding: 0 0 18px 24px; max-width: 700px; }
.receipts { color: var(--dim); max-width: 760px; font-size: .95rem; border-left: 2px solid var(--line); padding-left: 18px; }
.run-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 36px;
  border: 1px solid var(--line);
  background: var(--line);
}
.run-timeline div { min-height: 170px; padding: 20px; background: var(--bg-2); }
.run-timeline span { color: var(--accent); font-size: .78rem; }
.run-timeline strong { display: block; color: var(--text); margin-top: 28px; }
.run-timeline p { color: var(--dim); font-size: .86rem; margin-top: 8px; }
.report { margin-top: 36px; border-top: 1px solid var(--line); }
.report div {
  display: grid;
  grid-template-columns: 28px 1fr 100px 140px;
  align-items: baseline;
  gap: 16px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}
.report .icon { color: var(--accent); }
.report span { color: var(--dim); }
.report strong { color: var(--accent); font-size: 1.7rem; }
.report em { color: var(--faint); font-style: normal; }
.demo-term, .code-term { margin-top: 32px; }
.demo-wrap { position: relative; aspect-ratio: 16/9; background: #000; }
.demo-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10,13,19,.72);
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  transition: opacity .25s ease;
}
.demo-play .icon { grid-area: 1 / 1; width: 26px; height: 26px; }
.demo-play .i-pause { display: none; }
.demo-play[data-playing="true"] { opacity: 0; }
.demo-wrap:hover .demo-play { opacity: 1; }
.demo-play[data-playing="true"] .i-play { display: none; }
.demo-play[data-playing="true"] .i-pause { display: block; }
.code { padding: 22px; font-size: .9rem; line-height: 1.9; overflow-x: auto; white-space: pre; }
.code .c { color: var(--faint); font-style: italic; }
.code .p { color: var(--accent); }
.code .s { color: var(--you); }
.start-foot { color: var(--dim); margin-top: 22px; font-size: .92rem; }
.foot { border-top: 1px solid var(--line); padding: 34px 0 50px; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; }
.foot-links { display: flex; gap: 18px; align-items: center; font-size: .9rem; }
.foot-links a { color: var(--dim); }
.mit { color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .72rem; }
.foot-sig { color: var(--faint); font-size: .82rem; margin-top: 16px; }
.reveal { opacity: 0; transform: translateX(-10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .run-timeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wrap { width: min(100vw - 28px, 1080px); }
  .topnav { gap: 12px; font-size: .78rem; }
  .topnav a:nth-child(1), .topnav a:nth-child(2) { display: none; }
  body {
    background: #000;
    overflow: hidden;
  }
  .topbar,
  main > section:not(.hero),
  .foot,
  .term-bar { display: none; }
  .hero { min-height: 100svh; padding: 0; }
  .hero .wrap { width: 100%; }
  .term {
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    background: #020303;
    box-shadow: none;
  }
  .terminal-stage {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    padding: 18px 16px;
  }
  .hero-mark,
  h1,
  .hero-note,
  .terminal-prompt,
  .hero-status,
  .hero-ctas,
  .scanline { display: none; }
  .term-body {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    font-size: .82rem;
    line-height: 1.78;
  }
  .tl { margin-bottom: 2px; }
  .tl-runtime { animation-duration: .16s; }
  .run-timeline { grid-template-columns: 1fr; }
  .report div { grid-template-columns: 24px 1fr; padding: 14px 0; }
  .report strong, .report em { grid-column: 2; }
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .term-tag, .hero-term::before { animation: none; }
  .buffer-caret { animation: none; }
  .tl-runtime { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .scanline { display: none; }
}
