/* mylilvj.com — Algorave Floor. The page is a projected code buffer:
   black ground, phosphor green text, magenta keywords, amber only for the
   line that is playing or about to. One face, Martian Mono. */
@font-face {
  font-family: "Martian Mono";
  src: url(/fonts/martian-mono.woff2) format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --bk: #000;
  --buf: #0b0d0c;
  --line: #1d2a22;
  --gut: #3d5245;
  --grn: #39ff88;
  --soft: #86b496;
  --ink: #eafff2;
  --mag: #ff3bd4;
  --amb: #ffb000;
  --mono: "Martian Mono", ui-monospace, Consolas, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --tabs-h: 49px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bk); scrollbar-color: var(--line) var(--bk); scroll-padding-top: calc(var(--tabs-h) + 16px); }
body {
  margin: 0; background: var(--bk); color: var(--grn);
  font: 400 15px/1.7 var(--mono); font-stretch: 87.5%;
  -webkit-font-smoothing: antialiased; caret-color: var(--amb);
}
::selection { background: var(--mag); color: var(--bk); }
a { color: var(--grn); text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { color: var(--amb); }
:focus-visible { outline: 2px solid var(--amb); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; } /* .btn's display would otherwise beat the hidden attribute */
strong { color: var(--ink); font-weight: 600; }
.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: square; flex: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- tabs: editor tabs are the site nav ---------- */
.tabs {
  position: sticky; top: 0; z-index: 10; display: flex; overflow-x: auto; scrollbar-width: none;
  background: var(--bk); border-bottom: 1px solid var(--line); height: var(--tabs-h);
}
.tabs a {
  flex: none; display: flex; align-items: center; padding: 0 22px; font-size: 14px;
  color: var(--soft); text-decoration: none; border-right: 1px solid var(--line);
  transition: background .15s, color .15s;
}
.tabs a:hover { color: var(--grn); background: var(--buf); }
.tabs a[aria-current="page"] { background: var(--grn); color: var(--bk); font-weight: 600; }

/* ---------- buffer: numbered code lines ---------- */
.buf { counter-reset: ln; }
.ln {
  counter-increment: ln; display: grid; grid-template-columns: 3em minmax(0, 1fr);
  gap: 0 1.4em; padding: 3px 0; transition: background .12s;
}
.ln::before {
  content: counter(ln, decimal-leading-zero) / "";
  color: var(--gut); text-align: right; font-variant-numeric: tabular-nums; align-self: start; padding-top: .1em;
}
.ln > * { margin: 0; min-width: 0; }
/* the playing line flashes amber, like the line about to drop at an algorave */
.ln.is-step { background: var(--amb); }
.ln.is-step, .ln.is-step *, .ln.is-step::before { color: var(--bk); }
.ln.is-step::before { content: ">" counter(ln, decimal-leading-zero) / ""; }
@media (hover: hover) { /* touch screens keep :hover after a tap; mouse only */
  .ln:has(a:hover) { background: var(--amb); }
  .ln:has(a:hover), .ln:has(a:hover) *, .ln:has(a:hover)::before { color: var(--bk); }
}
.k { color: var(--mag); }
.s { color: var(--amb); }
.c { color: var(--soft); }

.display {
  font-size: clamp(3rem, 8vw, 6rem); line-height: .95; font-weight: 800; font-stretch: 112.5%;
  letter-spacing: -.04em; color: var(--ink); text-wrap: balance; padding: .12em 0;
}

/* ---------- buttons: square, prompt-led ---------- */
.acts { display: flex; flex-wrap: wrap; gap: 12px 16px; padding-left: 4.4em; }
.btn {
  display: inline-flex; align-items: center; gap: .8em; padding: 14px 20px;
  border: 2px solid var(--grn); background: none; color: var(--grn);
  font: 600 15px/1.2 var(--mono); font-stretch: 87.5%; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { color: var(--amb); border-color: var(--amb); background: var(--buf); }
.btn--p { background: var(--grn); color: var(--bk); }
.btn--p:hover { background: var(--amb); border-color: var(--amb); color: var(--bk); }
.btn--sm { padding: 8px 12px; font-size: 13px; border-width: 1px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- home stage: buffer left, projection right, status under ---------- */
.stage {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: 1fr auto;
  min-height: calc(100svh - var(--tabs-h)); border-bottom: 1px solid var(--line);
}
.stage-buf { padding: clamp(28px, 6vh, 72px) var(--pad); display: flex; flex-direction: column; justify-content: center; gap: 36px; }
.stage .display { font-size: clamp(3rem, 10vw, 9.5rem); line-height: 1.05; } /* the contract's ~150px headline; two lines on desktop need the extra leading */
.proj { margin: 0; border-left: 1px solid var(--line); background: var(--buf); display: flex; flex-direction: column; }
.proj iframe, .proj img { flex: 1; width: 100%; min-height: 320px; border: 0; object-fit: cover; display: block; }
.proj figcaption {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--soft);
}
.proj figcaption a { display: inline-flex; align-items: center; gap: .5em; color: var(--soft); }
.stage > .status { grid-column: 1 / -1; }

/* ---------- home tool rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 7.5em 1em; gap: 8px 28px;
  align-items: baseline; padding: 30px 0; border-top: 1px solid var(--line); color: var(--grn); text-decoration: none;
}
.row-name { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 800; font-stretch: 112.5%; letter-spacing: -.03em; color: var(--ink); line-height: 1.1; }
.row-tag { color: var(--mag); white-space: nowrap; text-align: right; }
.row .i { color: var(--soft); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.row:hover .row-name { color: var(--amb); }
.row:hover .i { color: var(--amb); transform: translateX(6px); }

/* ---------- content pages ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
.intro { padding: clamp(40px, 9vh, 104px) 0 48px; display: grid; gap: 32px; }
.blk { padding: 64px 0; border-top: 1px solid var(--line); }
.blk h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; font-stretch: 100%; line-height: 1.2;
  letter-spacing: -.02em; color: var(--ink); margin: 0 0 24px; text-wrap: balance;
}
.brace { color: var(--mag); font-weight: 400; }
.blk h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.prose p, .blk > p { max-width: 68ch; margin: 0 0 1em; }
.note { color: var(--soft); max-width: 68ch; }
.steps { max-width: 68ch; padding-left: 1.6em; }
.steps li { margin: 0 0 .6em; }
.steps li::marker { color: var(--mag); }

/* tiers: three panes split by rules, not cards */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); margin: 32px 0 20px; }
.tier { padding: 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.tier:last-child { border-right: 0; }
.tier--hi { background: var(--buf); }
.tier-name { color: var(--mag); font-size: 14px; }
.price { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; font-stretch: 112.5%; letter-spacing: -.04em; color: var(--ink); line-height: 1.05; margin: 6px 0 4px; }
.tier--hi .price { color: var(--amb); }
.list { list-style: none; padding: 0; margin: 18px 0 24px; flex: 1; }
.list li { padding: 7px 0; border-top: 1px dashed var(--line); }
.list li::before { content: "+ " / ""; color: var(--mag); }

/* table */
.tbl { overflow-x: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--ink); font-weight: 600; background: var(--buf); }
td.n { color: var(--soft); }
tbody tr:hover td { background: var(--buf); }

/* fact rows (how it works, before you buy) */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 0 48px; margin-top: 8px; }
.facts > div { padding: 22px 0; border-top: 1px solid var(--line); }
.facts p { margin: 0; color: var(--grn); }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 32px; }
.shots figure, .shot { margin: 0; }
.shots img, .shot img { border: 1px solid var(--line); }
.shots figcaption, .shot figcaption { font-size: 13px; color: var(--soft); padding-top: 8px; }

/* click-to-load embeds (YouTube, the web synth) */
.load {
  position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line);
  background: var(--buf);
  display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center;
}
.load--app { aspect-ratio: 16 / 10; }
.load iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.load-poster { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; object-position: top; }
.load > :not(.load-poster):not(iframe) { position: relative; }
/* with a poster, the label sits on a solid strip at the bottom so the still runs at full strength */
.load:has(.load-poster) { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 0; padding: 0; text-align: left; }
.load:has(.load-poster) > p { background: var(--buf); padding: 0 16px; border-top: 1px solid var(--line); }
.load:has(.load-poster) > .load-title { padding-top: 12px; }
.load:has(.load-poster) > .load-msg { border-top: 0; padding-bottom: 12px; }
.load:has(.load-poster) > button { align-self: stretch; justify-content: center; } /* play bar closes the strip */
.load-msg { margin: 0; color: var(--soft); }

/* x.o.x step row: a real pattern from the synth's demo set */
.xox { list-style: none; margin: 0; padding: 16px; display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 6px; border: 1px solid var(--line); background: var(--buf); }
.xox li { display: grid; grid-template-rows: auto 72px 1.2em; justify-items: center; gap: 6px; font-size: 13px; color: var(--soft); }
.xox b { font-weight: 600; color: var(--grn); }
.xox i { align-self: end; width: 100%; max-width: 18px; height: calc(var(--h, 0) * 100%); background: var(--grn); }
.xox .acc i { background: var(--mag); }
.xox s { text-decoration: none; color: var(--mag); }
.xox li.is-on b, .xox li.is-on s { color: var(--amb); }
.xox li.is-on i { background: var(--amb); }
.xox-cap { margin: 8px 0 0; font-size: 13px; color: var(--soft); }
.xox-cap code { color: var(--ink); font: inherit; }
.load-title { margin: 0; color: var(--ink); }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }

/* get-it blocks: each form of a tool is one block */
.get { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 48px; padding: 32px 0; border-top: 1px solid var(--line); }
.get:first-of-type { border-top: 0; padding-top: 0; }
.get h3 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); font-weight: 800; font-stretch: 112.5%; letter-spacing: -.03em; color: var(--ink); margin: 0 0 6px; }
.get .acts { padding-left: 0; margin-top: 16px; }

/* shell command with a copy button */
.cmd {
  display: flex; align-items: center; gap: 12px; margin: 16px 0; padding: 8px 8px 8px 16px;
  border: 1px solid var(--line); background: var(--buf); overflow-x: auto;
}
.cmd code { flex: 1; white-space: nowrap; color: var(--ink); font: inherit; }
.cmd code::before { content: "$ " / ""; color: var(--mag); }
pre.cmd code { white-space: pre; }
pre.cmd code::before { content: none; }

/* ---------- status bar ---------- */
.status {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; padding: 12px var(--pad);
  border-top: 1px solid var(--line); background: var(--bk); font-size: 13px; color: var(--soft);
}
.status .run { color: var(--grn); display: inline-flex; align-items: center; gap: 8px; }
.status .run::before { content: ""; width: 8px; height: 8px; background: var(--grn); animation: blink 1s steps(2) infinite; }
.status .grow { flex: 1; }
.status a { color: var(--soft); }
.status a:hover { color: var(--amb); }
@keyframes blink { 50% { opacity: .2; } }
.still .status .run::before { animation: none; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; grid-template-rows: auto auto auto; min-height: 0; }
  .proj { border-left: 0; border-top: 1px solid var(--line); }
  .proj iframe, .proj img { min-height: 56vw; }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row-what { grid-column: 1 / -1; grid-row: 2; }
  .row .i { display: none; }
  .tiers { grid-template-columns: 1fr; }
  .tier { border-right: 0; border-bottom: 1px solid var(--line); }
  .tier:last-child { border-bottom: 0; }
  .get { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .acts { padding-left: 0; }
  .ln { grid-template-columns: 2.2em minmax(0, 1fr); gap: 0 .8em; }
  .tabs a { flex: 1 1 auto; justify-content: center; padding: 0 8px; font-size: 12px; } /* all five fit at 360 */
  .cmd { flex-wrap: wrap; }
  .cmd code { white-space: normal; overflow-wrap: anywhere; }
  .xox { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
