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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lime); text-decoration-color: rgba(158, 240, 26, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--lime); }

code { font-family: var(--mono); font-size: 0.92em; }
:not(pre) > code { color: var(--lime-dim); background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 5px; padding: 0.1em 0.38em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--lime); color: #000; padding: 8px 12px; border-radius: 6px; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 4px; }

/* ── nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-grid { display: flex; align-items: center; gap: 20px; height: 58px; }
.brand {
  font-family: var(--mono); font-weight: 700; font-size: 16px;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
}
.brand-mark { color: var(--lime); }
.nav nav { display: flex; gap: 18px; margin-left: auto; }
.nav nav a { font-family: var(--mono); font-size: 13.5px; color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--lime); }
.nav-cta {
  font-family: var(--mono); font-size: 13px; text-decoration: none;
  color: var(--lime); border: 1px solid rgba(158, 240, 26, 0.35);
  padding: 6px 12px; border-radius: 6px; white-space: nowrap;
}
.nav-cta:hover { background: var(--lime-glow); }
/* The nav used to be hidden outright on a phone, which put the Moshpit Manager
   and the blog out of reach there. It now drops to its own row and scrolls
   sideways, so every destination stays reachable at any width. */
@media (max-width: 860px) {
  .nav-grid { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px 14px; }
  .nav-cta { margin-left: auto; }
  .nav nav {
    order: 3; width: 100%; margin-left: 0; gap: 16px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav a { white-space: nowrap; }
}

/* ── hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 9vw, 108px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line-soft);
}
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 50%;
  width: 900px; height: 700px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--lime-glow), transparent 62%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 30%, transparent 75%);
  opacity: 0.55;
}
.hero .wrap { position: relative; z-index: 1; }

.kicker {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em;
  text-transform: lowercase; color: var(--lime-dim); margin: 0 0 14px;
}

h1 {
  font-size: clamp(38px, 7.2vw, 72px); line-height: 1.02;
  letter-spacing: -0.035em; font-weight: 800; margin: 0 0 20px;
  max-width: 22ch;
}
/* The hero headline carries its own line break, so it must not be re-wrapped. */
.hero h1 { max-width: none; }
.lime { color: var(--lime); }

.lede { font-size: clamp(16.5px, 2vw, 20px); color: var(--ink-2); max-width: 62ch; margin: 0 0 26px; }
.small { font-size: 14px; }
.muted { color: var(--muted); }

/* ── install box ─────────────────────────────────────────────────── */
.install {
  display: flex; align-items: stretch; gap: 0;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); max-width: 560px; overflow: hidden;
  margin: 0 0 14px;
}
.install code {
  flex: 1 1 auto; min-width: 0; padding: 13px 16px;
  color: var(--ink); font-size: 14.5px; overflow-x: auto; white-space: nowrap;
  background: none; border: 0;
}
.install-hero { box-shadow: 0 0 0 1px rgba(158, 240, 26, 0.12), 0 0 40px -12px var(--lime-glow); }
.copy {
  flex: 0 0 auto; border: 0; border-left: 1px solid var(--line);
  background: var(--panel-2); color: var(--lime);
  font-family: var(--mono); font-size: 13px; padding: 0 16px; cursor: pointer;
}
.copy:hover { background: var(--lime); color: #000; }
.copy[data-done="1"] { background: var(--lime); color: #000; }
/* On a phone the install line is wider than the screen. Wrapping beats a
   scrollbar here: the copy button means nobody has to select the text. */
@media (max-width: 560px) {
  .install { align-items: stretch; }
  .install code { white-space: normal; overflow-wrap: anywhere; overflow-x: visible; }
}

/* ── stats ───────────────────────────────────────────────────────── */
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 34px 0 0; padding: 0; }
.stats li { display: flex; flex-direction: column; }
.stats strong { font-family: var(--mono); font-size: 30px; color: var(--lime); line-height: 1.1; }
.stats span { font-size: 13.5px; color: var(--muted); max-width: 22ch; }

/* ── engines strip ───────────────────────────────────────────────── */
.strip { border-bottom: 1px solid var(--line-soft); background: var(--bg-alt); padding: 22px 0; }
.strip-label { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 12px; letter-spacing: 0.06em; }
.engines { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.engines code {
  color: var(--ink-2); background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 11px; font-size: 13.5px;
}

/* ── bands ───────────────────────────────────────────────────────── */
.band { padding: clamp(48px, 7vw, 88px) 0; border-bottom: 1px solid var(--line-soft); }
.band-alt { background: var(--bg-alt); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.band-stack { grid-template-columns: minmax(0, 1fr); }
.band h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 800; margin: 0 0 16px; max-width: 20ch; }
.band-copy p { color: var(--ink-2); margin: 0 0 14px; max-width: 58ch; }
.band-copy p:last-child { margin-bottom: 0; }
.band-copy strong { color: var(--ink); }
.band h2:last-child { margin-bottom: 0; }

/* A full-width band splits its copy into heading | prose, so the terminal
   underneath gets the whole column without stranding the text on one side. */
.band-stack .band-copy {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px clamp(32px, 5vw, 64px); align-items: start; margin-bottom: 34px;
}
.band-stack .band-head h2 { margin-bottom: 0; max-width: 16ch; }
.band-stack .band-body p { max-width: none; }

@media (max-width: 900px) {
  .band-grid { grid-template-columns: minmax(0, 1fr); }
  .band-stack .band-copy { grid-template-columns: minmax(0, 1fr); }
  .band-stack .band-head h2 { max-width: none; }
}

/* ── terminal ────────────────────────────────────────────────────── */
.term {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 24px 60px -30px #000;
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #2a2d2f; }
.dot:first-child { background: #3a3d3f; }
.term-title { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 8px; }
.term-body {
  margin: 0; padding: 16px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.62;
  color: var(--ink-2); tab-size: 2;
}
.term-body code { font-size: inherit; color: inherit; background: none; border: 0; padding: 0; white-space: pre; }
.tl-p { color: var(--lime); user-select: none; }
.tl-cmd { color: var(--ink); }
.tl-dim { color: var(--muted); }
.tl-warn { color: var(--warn); }
.lang-js { color: #c9ccce; }

/* ── cta ─────────────────────────────────────────────────────────── */
.cta { padding: clamp(56px, 8vw, 96px) 0; text-align: center; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: auto 0 -60% 50%;
  width: 820px; height: 560px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--lime-glow), transparent 65%);
  pointer-events: none;
}
.cta .wrap { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(30px, 5vw, 50px); letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; }
.cta .lede { margin-inline: auto; }
.cta .install { margin-inline: auto; }
.cta .small { margin-top: 18px; }

/* ── page head (inner pages) ─────────────────────────────────────── */
.page-head { padding: clamp(44px, 6vw, 76px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line-soft); }
.page-head h1 { max-width: none; }

/* ── command tables ──────────────────────────────────────────────── */
.cmd-groups { display: grid; gap: 40px; }
.cmd-head {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--lime-dim); margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.cmds { width: 100%; border-collapse: collapse; }
.cmds td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--ink-2); font-size: 15px; }
.cmds td:first-child { width: 34%; white-space: nowrap; }
.cmds tr:hover td { background: rgba(158, 240, 26, 0.035); }
.verb { color: var(--lime) !important; background: none !important; border: 0 !important; padding: 0 !important; font-size: 14px; }
.aliases { display: block; margin-top: 3px; }
.aliases code { color: var(--muted); background: none; border: 0; padding: 0; font-size: 12.5px; }
@media (max-width: 680px) {
  .cmds td, .cmds td:first-child { display: block; width: auto; white-space: normal; border-bottom: 0; padding-bottom: 2px; }
  .cmds td:last-child { padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
}

/* ── footer ──────────────────────────────────────────────────────── */
.foot { padding: 52px 0 44px; background: var(--bg-alt); border-top: 1px solid var(--line-soft); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot-brand .brand { font-size: 16px; margin: 0 0 10px; }
.creed { font-family: var(--mono); font-size: 12.5px; color: var(--lime-dim); margin: 0 0 12px; max-width: 34ch; }
.foot-brand .muted { font-size: 13.5px; margin: 0; }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-head { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 2px; text-transform: uppercase; }
.foot-col a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.foot-col a:hover { color: var(--lime); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ── blog ────────────────────────────────────────────────────────── */
.post-list { display: grid; gap: 26px; max-width: 760px; }
.post-card { padding-bottom: 24px; border-bottom: 1px solid var(--line-soft); }
.post-card:last-child { border-bottom: 0; }
.post-card h2 { font-size: clamp(22px, 3.2vw, 30px); letter-spacing: -0.02em; font-weight: 800; margin: 0 0 8px; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--lime); }
.post-meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.post-dek { color: var(--ink-2); margin: 0 0 10px; font-size: 16px; }
.post-more { margin: 0; }
.post-more a { font-family: var(--mono); font-size: 13px; text-decoration: none; }
.page-head .kicker a { color: inherit; text-decoration: none; }
.page-head .kicker a:hover { color: var(--lime); }
.post-title { max-width: 20ch; }

/* post body. One column, measure capped, terminal panes break the measure. */
.prose { max-width: 720px; }
.prose p { color: var(--ink-2); margin: 0 0 20px; }
.prose h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; font-weight: 800; color: var(--ink); margin: 40px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose strong { color: var(--ink); }
.prose .prose-list { margin: 0 0 22px; padding-left: 20px; color: var(--ink-2); }
.prose .prose-list li { margin-bottom: 10px; }
.prose .term { margin: 26px 0 28px; }
@media (min-width: 900px) { .prose .term-wide { width: calc(100% + 160px); max-width: none; } }
