/* Lustrew Desktop public pages (Overview + Download).
   Tokens mirror the app's "Luminous" system (ada-copilot-py static/css/galaxy.css):
   an indigo ground, Nunito, one brand blue; violet only as a faint wash behind. */

:root {
  color-scheme: dark;

  --ground: #070A1C;
  --ground-deep: #04061A;
  --surface: #141B40;
  --surface-2: #1A2352;
  --surface-hover: #232D63;
  --glass: rgba(20, 26, 58, 0.62);
  --glass-2: rgba(27, 34, 80, 0.66);
  --well: rgba(3, 5, 16, 0.55);
  --hairline: rgba(255, 255, 255, 0.07);
  --edge: rgba(160, 180, 255, 0.16);
  --fill: rgba(255, 255, 255, 0.06);
  --fill-2: rgba(255, 255, 255, 0.10);

  --text: #EEF1FF;
  --text-2: #B3BBDD;
  --text-3: #959ECA;

  --accent: #4572FD;
  --accent-text: #9AB0FF;
  --accent-subtle: rgba(69, 114, 253, 0.16);
  --violet-soft: #B9A4FF;
  --violet-subtle: rgba(139, 92, 246, 0.16);
  --orb: linear-gradient(140deg, #3C66F4 0%, #3A64F2 45%, #5B4FE8 100%);

  --ok-text: #5BE08E;
  --bad-text: #FF8F8F;

  --rim: inset 0 1px 0 0 rgba(255, 255, 255, 0.075);
  --elev-2: 0 18px 44px -10px rgba(2, 4, 18, 0.60);
  --elev-3: 0 36px 90px -12px rgba(2, 4, 18, 0.72);
  --glow-soft: 0 14px 40px -16px rgba(69, 114, 253, 0.60);
  --focus: #8FA8FF;

  --font-sans: 'Nunito', ui-sans-serif, -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --section: clamp(72px, 10vw, 128px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Base ────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px; line-height: 1.55;
  color: var(--text);
  background-color: var(--ground);
  background-image:
    radial-gradient(70% 46% at 12% -8%, rgba(69, 114, 253, 0.20), transparent 70%),
    radial-gradient(46% 36% at 96% 2%, rgba(139, 92, 246, 0.09), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
code, pre, .mono { font-family: var(--font-mono); }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--surface-2); color: var(--text); padding: 10px 16px; border-radius: var(--r-sm);
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--text-2); }
.quiet { color: var(--text-3); }
.tnum { font-variant-numeric: tabular-nums; }

/* ── Buttons, chips ──────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--orb); color: #fff;
  font-weight: 700; font-size: 15.5px; letter-spacing: 0.01em;
  box-shadow: var(--glow-soft), var(--rim);
  cursor: pointer; text-decoration: none;
  transition: filter 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }
.btn.lg { min-height: 52px; padding: 0 28px; font-size: 16.5px; }

.btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--fill); color: var(--text);
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--edge);
  transition: background-color 160ms var(--ease);
}
.btn-quiet:hover { background: var(--fill-2); text-decoration: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--fill); color: var(--text-2);
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.chip.beta { background: var(--violet-subtle); color: var(--violet-soft); }
.chip.cur { background: var(--accent-subtle); color: var(--accent-text); }

.copy-btn {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
  border: 0; border-radius: 999px; background: var(--fill); color: var(--text-2);
  font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.copy-btn:hover { background: var(--fill-2); color: var(--text); }

/* ── Site nav + footer ───────────────────────────────── */

.site-nav {
  display: flex; align-items: center; gap: 24px;
  height: 72px;
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 38px; height: 38px; }
.wordmark .name { font-weight: 800; font-size: 18px; letter-spacing: 0.005em; }
.site-nav .links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav .links a {
  color: var(--text-2); font-weight: 700; font-size: 15px;
  padding: 8px 14px; border-radius: 999px;
}
.site-nav .links a:hover { color: var(--text); background: var(--fill); text-decoration: none; }
.site-nav .links a[aria-current="page"] { color: var(--text); background: var(--fill); }
.stamp {
  margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .stamp { display: none; }
  .wordmark .name { font-size: 16px; }
  .site-nav { gap: 12px; }
  .site-nav .links a { padding: 8px 10px; font-size: 14px; }
}
@media (max-width: 400px) { .wordmark .name { display: none; } }

.site-foot { margin-top: var(--section); border-top: 1px solid var(--hairline); }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
  padding-top: 32px; padding-bottom: 48px;
}
.site-foot .who { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14.5px; }
.site-foot .who img { width: 26px; height: 26px; }
.site-foot .who b { color: var(--text); font-weight: 800; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14.5px; }
.site-foot nav a { color: var(--text-2); }
.site-foot nav a:hover { color: var(--text); }
.site-foot .live { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.site-foot .copyright { width: 100%; font-size: 13px; color: var(--text-3); }

/* ── Section scaffolding ─────────────────────────────── */

.section { margin-top: var(--section); }
.section-head { display: grid; gap: 10px; margin-bottom: 36px; max-width: 760px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.01em; }
.section-head p { color: var(--text-2); font-size: 17px; }

/* ═════════════════════ Overview ═════════════════════ */

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); }
.hero-grid { display: grid; gap: 28px 64px; align-items: end; }
@media (min-width: 1040px) { .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.hero h1 {
  font-size: clamp(2.35rem, 5.6vw, 4.1rem); font-weight: 900;
  letter-spacing: -0.025em; line-height: 1.06; max-width: 15ch;
}
.hero h1 .soft { color: var(--accent-text); }
.hero .sub { margin-top: 22px; font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); max-width: 54ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.cta-meta { font-size: 14px; color: var(--text-3); }
.cta-meta .mono { font-size: 12.5px; }

.needs { display: grid; gap: 2px; }
.needs li {
  list-style: none; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--hairline); color: var(--text-2); font-size: 15px;
}
.needs li:last-child { border-bottom: 1px solid var(--hairline); }
.needs b { color: var(--text); font-weight: 700; display: block; }
.ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--fill); color: var(--accent-text);
}

/* Showcase: example runs inside a faithful Lustrew Desktop window */

.show-menu {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px;
}
.show-menu button {
  position: relative; border: 0; cursor: pointer;
  min-height: 42px; padding: 0 18px; border-radius: 999px;
  background: var(--fill); color: var(--text-2);
  font-weight: 700; font-size: 14.5px;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.show-menu button:hover { color: var(--text); background: var(--fill-2); }
.show-menu button[aria-selected="true"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--edge); }
.show-menu .prog {
  position: absolute; left: 18px; right: 18px; bottom: 6px; height: 2px;
  border-radius: 1px; overflow: hidden; opacity: 0; background: var(--fill-2);
}
.show-menu button.touring .prog { opacity: 1; }
.show-menu .prog i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.show-menu button.touring .prog i { animation: prog-fill linear forwards; animation-duration: var(--prog-dur, 5s); }
@keyframes prog-fill { to { transform: scaleX(1); } }
@media (max-width: 720px) {
  .show-menu { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .show-menu button { white-space: nowrap; flex: none; }
}

.show-stage { position: relative; }
.app-window {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  background-color: #080B20;
  background-image:
    radial-gradient(60% 60% at 18% 0%, rgba(69, 114, 253, 0.22), transparent 70%),
    radial-gradient(50% 50% at 100% 100%, rgba(139, 92, 246, 0.10), transparent 70%);
  box-shadow: 0 0 0 1px var(--edge), var(--elev-3);
  padding: 0 8px 8px;
}
.app-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 44px; padding: 0 10px; font-size: 13px;
}
.app-bar .t { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.app-bar .t img { width: 20px; height: 20px; }
.app-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--well); font-size: 12px; font-weight: 700; }
.app-switch span { padding: 3px 12px; border-radius: 999px; color: var(--text-3); }
.app-switch span.on { background: var(--fill-2); color: var(--text); }
.app-controls { justify-self: end; color: var(--text-3); letter-spacing: 6px; font-size: 12px; }
@media (max-width: 560px) { .app-switch { display: none; } .app-bar { grid-template-columns: 1fr auto; } }
.app-cols { display: flex; gap: 8px; align-items: stretch; }

.app-side {
  width: 220px; flex: none; display: flex; flex-direction: column;
  padding: 12px 10px 10px; border-radius: var(--r-md);
  background: var(--glass); box-shadow: var(--rim);
  font-size: 13px; color: var(--text-2);
}
@media (max-width: 879px) { .app-side { display: none; } }
.side-top { display: flex; gap: 6px; margin-bottom: 10px; }
.side-sq { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--fill); }
.side-nav p { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; }
.side-nav svg { flex: none; color: var(--text-3); }
.side-h { display: flex; justify-content: space-between; align-items: center; margin: 14px 8px 4px; font-size: 12px; color: var(--text-3); }
.side-dd { background: var(--fill); border-radius: 999px; padding: 1px 9px; }
.side-g { margin: 10px 8px 2px; font-size: 11.5px; color: var(--text-3); }
.side-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; }
.side-row.active-row { background: var(--accent-subtle); color: var(--text); }
.sr-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-a { flex: none; margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.side-chats { flex: 1; min-height: 0; overflow: hidden; }
.side-user { display: flex; align-items: center; gap: 9px; padding: 10px 6px 2px; color: var(--text); }
.td { width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--orb); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

.app-main {
  position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column;
  border-radius: var(--r-md); background: var(--glass-2); box-shadow: var(--rim);
}
.app-body { flex: 1; min-height: 430px; padding: 24px 26px 8px; }
@media (max-width: 640px) { .app-body { padding: 18px 14px 6px; min-height: 400px; } }

.app-input {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 16px 16px; padding: 10px 12px 10px 14px;
  background: var(--surface-2); border-radius: 999px;
  box-shadow: 0 0 0 1px var(--edge), 0 8px 30px -16px rgba(69, 114, 253, 0.5);
  font-size: 14px;
}
.ai-ic { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--fill); color: var(--text-2); font-size: 13px; }
.app-ph { flex: 1; color: var(--text-3); }
.ai-send { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--orb); color: #fff; }
.type-ghost { flex: 1; display: none; white-space: nowrap; overflow: hidden; }
.app-input.typing .type-ghost { display: block; }
.app-input.typing .app-ph { display: none; }
.type-ghost::after { content: ""; display: inline-block; width: 1px; height: 14px; background: var(--text); margin-left: 2px; vertical-align: -2px; }

.app-status { display: flex; align-items: center; gap: 16px; padding: 8px 10px 0; font-size: 12px; color: var(--text-3); }
.app-status .cx { display: inline-flex; align-items: center; gap: 5px; }
.app-status .cx i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); }
.app-ver { margin-left: auto; font-family: var(--font-mono); }

/* transcript */
.msg.user { display: flex; justify-content: flex-end; }
.bub-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg.user p { background: var(--accent-subtle); color: var(--text); border-radius: 16px 16px 4px 16px; padding: 10px 16px; max-width: 46ch; font-size: 15px; box-shadow: inset 0 0 0 1px rgba(69, 114, 253, 0.28); }
.msg-time { font-size: 11.5px; color: var(--text-3); }
.msg.ada { display: flex; gap: 12px; margin-top: 20px; }
.msg.ada .ava { flex: none; width: 26px; height: 26px; }
.msg-body { flex: 1; min-width: 0; }
.ada-line { font-size: 15px; }

.vig-plan { display: grid; gap: 8px; }
.ck-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.ck { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-subtle); color: var(--accent-text); font-size: 11px; }
.vig-done { margin-top: 16px; font-size: 13px; color: var(--text-3); }

.src-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.src-lbl { font-size: 12px; color: var(--text-3); }
.chip-src { font-size: 12.5px; padding: 3px 11px; border-radius: 999px; background: var(--fill); color: var(--text-2); }

.out-card { margin-top: 16px; max-width: 560px; padding: 16px 18px; border-radius: var(--r-md); background: var(--well); }
.rep-h { font-weight: 800; font-size: 16px; margin-bottom: 12px; }
.tbar { height: 9px; border-radius: 5px; background: var(--fill-2); margin-bottom: 8px; }
.attach-h { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }

.art { display: flex; align-items: center; gap: 14px; max-width: 460px; margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--well); }
.art-ic { flex: none; color: var(--accent-text); }
.art-n { font-weight: 700; font-size: 15px; }
.art-m { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.art-act { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent-text); }
.savebox { max-width: 380px; margin: 12px 0 0 36px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--edge), var(--elev-2); }
.save-t { font-size: 12px; color: var(--text-3); }
.save-p { font-family: var(--font-mono); font-size: 12.5px; margin-top: 8px; }
.save-ok { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--accent-text); }

.sheet-wrap { overflow-x: auto; }
.sheet { border-collapse: separate; border-spacing: 2px; font-family: var(--font-mono); font-size: 12.5px; }
.sheet td { padding: 7px 16px; background: var(--fill); min-width: 80px; border-radius: 4px; }
.sheet .sh { background: transparent; color: var(--text-3); min-width: 30px; text-align: center; }
.sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet .total { color: var(--accent-text); font-weight: 700; }

.mini-browser { max-width: 460px; margin-top: 16px; border-radius: var(--r-md); overflow: hidden; background: var(--well); }
.mb-bar { display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: var(--fill); font-size: 12px; }
.mb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fill-2); }
.mb-url { margin-left: 8px; color: var(--text-3); font-family: var(--font-mono); }
.mb-body { display: grid; gap: 12px; padding: 16px; font-size: 13px; }
.mb-row { display: flex; align-items: center; gap: 14px; }
.mb-l { min-width: 72px; color: var(--text-3); }
.mb-select { font-family: var(--font-mono); font-size: 12.5px; background: var(--fill); border-radius: 6px; padding: 4px 10px; }
.mb-check { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; background: var(--accent); color: #fff; font-size: 11px; }
.mb-dl { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; background: var(--fill); font-family: var(--font-mono); font-size: 12px; }
.mb-ok { color: var(--accent-text); font-family: var(--font-sans); font-weight: 700; }

.flist { display: grid; gap: 4px; max-width: 460px; font-size: 13.5px; }
.flist p { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 9px; }
.flist .fm { color: var(--text-3); font-size: 12px; }
.flist .fsel { background: var(--accent-subtle); color: var(--text); }

.hit { position: relative; display: inline-block; padding: 0 3px; }
.reticle { position: absolute; inset: -4px -6px; opacity: 0; pointer-events: none; }
.reticle b { position: absolute; width: 8px; height: 8px; border: 0 solid var(--accent); }
.reticle b:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.reticle b:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.reticle b:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.reticle b:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

/* the full-task run with the Task panel */
.task-wrap { display: grid; gap: 18px; }
@media (min-width: 760px) { .task-wrap { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.task-panel { padding: 14px 12px 10px; border-radius: var(--r-md); background: var(--well); font-size: 12.5px; }
.tp-tabs { display: flex; align-items: center; gap: 14px; padding: 0 4px 10px; font-weight: 700; }
.tp-tab { color: var(--text-3); }
.tp-tab.on { color: var(--text); }
.tp-x { margin-left: auto; color: var(--text-3); }
.tp-status { display: flex; align-items: center; gap: 10px; padding: 0 4px; margin-bottom: 10px; }
.tp-run { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 700; }
.tp-run i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.tp-run.done i { animation: none; }
.tp-count, .tp-time { color: var(--text-3); font-variant-numeric: tabular-nums; }
.tp-stop { margin-left: auto; color: var(--bad-text); font-weight: 700; }
.tp-run.done ~ .tp-stop { display: none; }
.tp-sum { color: var(--text-3); padding: 0 4px; margin-bottom: 10px; line-height: 1.45; }
.tp-steps { display: grid; gap: 2px; }
.tstep { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 9px; opacity: 0.45; transition: opacity 260ms, background-color 260ms; }
.tstep.running { opacity: 1; background: var(--accent-subtle); }
.tstep.done { opacity: 0.9; }
.ts-ico { flex: none; margin-top: 2px; color: var(--accent-text); }
.ts-main { min-width: 0; }
.ts-t { font-size: 13px; font-weight: 700; color: var(--text); }
.ts-th { color: var(--text-3); margin-top: 2px; line-height: 1.45; display: none; }
.tstep.running .ts-th, .tstep.done .ts-th { display: block; }
.ts-state { flex: none; margin-left: auto; margin-top: 2px; position: relative; width: 16px; height: 16px; }
.ts-state .dot { position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); opacity: 0; }
.tstep.running .ts-state .dot { opacity: 1; animation: pulse 1s ease-in-out infinite; }
.ts-state .ok { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: var(--accent-subtle); color: var(--accent-text); font-size: 10px; opacity: 0; }
.tstep.done .ts-state .ok { opacity: 1; }
.tstep.done .ts-state .dot { opacity: 0; animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* run player: .anim items appear in --d order after the ask is typed */
.js .vig .anim { opacity: 0; }
.vig.play .anim { animation: vig-in 300ms var(--ease) forwards; animation-delay: calc(var(--d) * 380ms + var(--lead, 0ms)); }
@keyframes vig-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vig.play .reticle.anim { animation: ret-in 160ms ease-out forwards; animation-delay: calc(var(--d) * 380ms + var(--lead, 0ms)); }
@keyframes ret-in { from { opacity: 0; transform: scale(1.4); } to { opacity: 1; transform: none; } }

/* Lustrew AI's cursor doing the clicks */
.ada-cur {
  position: absolute; z-index: 6; width: 16px; height: 16px; opacity: 0; pointer-events: none; color: #fff;
  transition: left 460ms cubic-bezier(0.3, 0.8, 0.3, 1), top 460ms cubic-bezier(0.3, 0.8, 0.3, 1), opacity 220ms;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.65));
}
.ada-cur.on { opacity: 1; }
.ada-cur .ring { position: absolute; left: -8px; top: -8px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.ada-cur.click .ring { animation: cur-click 380ms ease-out 1; }
@keyframes cur-click { from { transform: scale(0.4); opacity: 0.9; } to { transform: scale(1.25); opacity: 0; } }

.replay {
  display: none; position: absolute; right: 8px; bottom: -40px;
  border: 0; background: none; cursor: pointer; padding: 8px 10px;
  color: var(--text-3); font-weight: 700; font-size: 13px;
}
.replay:hover { color: var(--text); }
.js .replay { display: block; }

@media (prefers-reduced-motion: reduce) {
  .js .vig .anim, .vig.play .anim { opacity: 1; animation: none; }
  .reticle { opacity: 1; }
  .tp-run i, .tstep.running .ts-state .dot { animation: none; }
}

/* How it works: four steps along one line */
.flow { display: grid; gap: 28px; list-style: none; counter-reset: step; }
@media (min-width: 760px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.flow li { position: relative; padding-top: 26px; border-top: 1px solid var(--hairline); }
.flow li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -13px; left: 0;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ground); box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--accent-text); font-size: 12.5px; font-weight: 800;
}
.flow .ico { margin-bottom: 16px; }
.flow h3 { font-size: 19px; font-weight: 800; }
.flow p { margin-top: 6px; color: var(--text-2); font-size: 15.5px; max-width: 34ch; }

/* Stays in your hands: two-column rows with a hairline */
.promises { display: grid; gap: 0 48px; list-style: none; }
@media (min-width: 860px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.promises li {
  display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: center;
  padding: 18px 0; border-top: 1px solid var(--hairline); font-size: 16px; color: var(--text-2);
}
.promises b { color: var(--text); font-weight: 800; }

.caps { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin-top: 36px; }
.caps li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--fill); color: var(--text-2); font-size: 14.5px; font-weight: 700; }
.caps svg { color: var(--accent-text); flex: none; }

/* Get it: two rows, one per thing you install */
.get-rows { list-style: none; }
.get-rows li {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 22px 0; border-top: 1px solid var(--hairline);
}
.get-rows li:last-child { border-bottom: 1px solid var(--hairline); }
.get-rows .ico { width: 48px; height: 48px; border-radius: 14px; }
.get-rows h3 { font-size: 18px; font-weight: 800; }
.get-rows p { color: var(--text-3); font-size: 14.5px; margin-top: 2px; }
.get-rows .mono { font-size: 12.5px; }
@media (max-width: 600px) {
  .get-rows li { grid-template-columns: 40px minmax(0, 1fr); }
  .get-rows li > :last-child { grid-column: 1 / -1; justify-self: start; }
  .get-rows .ico { width: 40px; height: 40px; }
}
.get-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; font-size: 14.5px; }

/* ═════════════════════ Download ═════════════════════ */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; padding: clamp(28px, 5vw, 56px) 0 28px; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 900; letter-spacing: -0.02em; }
.page-head .sub { color: var(--text-2); font-size: 17px; margin-top: 8px; }
.channel-switch { margin-left: auto; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hairline); }
.channel-switch button { border: 0; background: none; cursor: pointer; min-height: 36px; padding: 0 18px; border-radius: 999px; color: var(--text-3); font-weight: 700; font-size: 14px; }
.channel-switch button[aria-pressed="true"] { background: var(--fill-2); color: var(--text); }
.channel-switch button:hover { color: var(--text); }

/* the one raised element: the release you are about to download */
.release {
  border-radius: var(--r-xl); background: var(--glass-2);
  box-shadow: var(--rim), 0 0 0 1px var(--edge), var(--elev-2);
  overflow: hidden;
}
.release-top { display: grid; gap: 22px 40px; padding: clamp(22px, 3.2vw, 36px); align-items: center; }
@media (min-width: 860px) { .release-top { grid-template-columns: minmax(0, 1fr) auto; } }
.rel-name { font-size: 14px; font-weight: 700; color: var(--text-3); }
.rel-ver { font-size: clamp(2.6rem, 6vw, 3.8rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.rel-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; color: var(--text-3); font-size: 14px; }
.rel-meta .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.rel-dl { display: grid; gap: 10px; justify-items: start; }
@media (min-width: 860px) { .rel-dl { justify-items: end; text-align: right; } }
.rel-file { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3); }

.rel-notes { padding: clamp(20px, 3vw, 30px) clamp(22px, 3.2vw, 36px); border-top: 1px solid var(--hairline); }
.rel-notes h2 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.rel-hash { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px clamp(22px, 3.2vw, 36px); border-top: 1px solid var(--hairline); background: var(--well); font-size: 13px; color: var(--text-3); }
.rel-hash .mono { color: var(--text-2); font-size: 12.5px; }
.rel-hash a { margin-left: auto; font-weight: 700; }

.changelog { color: var(--text-2); font-size: 15px; }
.changelog ul { list-style: none; display: grid; gap: 6px; margin: 4px 0 14px; }
.changelog li { position: relative; padding-left: 18px; }
.changelog li::before { content: ""; position: absolute; left: 3px; top: 0.66em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-text); opacity: 0.7; }
.changelog:not(.changelog-plain) { display: grid; gap: 12px 48px; }
.changelog .cl-h { font-size: 12.5px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.changelog .cl-sec > ul:last-child { margin-bottom: 0; }
.changelog p + p { margin-top: 8px; }
.changelog code { font-size: 0.9em; background: var(--fill); padding: 1px 5px; border-radius: 5px; }
.changelog-plain { white-space: pre-wrap; }
@media (min-width: 1100px) { .release .changelog:not(.changelog-plain) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.beta-note { margin-top: 14px; color: var(--text-3); font-size: 14px; }
.beta-note:empty { display: none; }

.ext-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  margin-top: 28px; padding: 20px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.ext-row .ico { width: 48px; height: 48px; border-radius: 14px; }
.ext-row h2 { font-size: 17px; font-weight: 800; }
.ext-row p { color: var(--text-3); font-size: 14.5px; margin-top: 2px; }
@media (max-width: 600px) {
  .ext-row { grid-template-columns: 40px minmax(0, 1fr); }
  .ext-row > :last-child { grid-column: 1 / -1; justify-self: start; }
  .ext-row .ico { width: 40px; height: 40px; }
}

.dl-grid { display: grid; gap: var(--section) 64px; margin-top: var(--section); }
.dl-grid > *, .hero-grid > *, .release-top > * { min-width: 0; }
@media (min-width: 1100px) { .dl-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); margin-top: 88px; } }
.col-h { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 800; margin-bottom: 18px; letter-spacing: -0.01em; }

/* version history: flat rows that open in place */
.ledger-list { border-top: 1px solid var(--hairline); }
.lrow { border-bottom: 1px solid var(--hairline); }
.lrow summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 70px auto 92px minmax(0, 1fr) 16px; gap: 14px; align-items: center;
  padding: 14px 4px; font-size: 14.5px;
}
.lrow summary::-webkit-details-marker { display: none; }
.lrow summary:hover .ver { color: var(--accent-text); }
.lrow .ver { font-weight: 800; font-variant-numeric: tabular-nums; }
.lrow .tags { display: flex; gap: 6px; }
.lrow .date { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.lrow .excerpt { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .chev { color: var(--text-3); transition: transform 200ms var(--ease); }
.lrow details[open] .chev { transform: rotate(90deg); }
.lrow .body { padding: 4px 4px 22px 88px; }
.lrow .facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; font-size: 13px; color: var(--text-3); }
.lrow .facts .mono { font-size: 12px; overflow-wrap: anywhere; }
.lrow .facts a { font-weight: 700; }
.lrow.stub summary { cursor: default; }
@media (max-width: 720px) {
  .lrow summary { grid-template-columns: auto auto 1fr 16px; row-gap: 4px; }
  .lrow .date { justify-self: end; }
  .lrow .excerpt { grid-column: 1 / -1; grid-row: 2; }
  .lrow .chev { grid-column: 4; grid-row: 1; }
  .lrow .body { padding-left: 4px; }
}
.show-earlier { margin-top: 18px; }

/* side column: verify + requirements */
.side-sec + .side-sec { margin-top: 64px; }
.side-sec .lede { color: var(--text-2); font-size: 15px; margin: -8px 0 18px; }
.vsteps { list-style: none; counter-reset: v; }
.vsteps > li { position: relative; padding: 18px 0 18px 40px; border-top: 1px solid var(--hairline); }
.vsteps > li::before {
  counter-increment: v; content: counter(v);
  position: absolute; left: 0; top: 18px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--fill); color: var(--accent-text); font-size: 12.5px; font-weight: 800;
}
.vsteps h3 { font-size: 16px; font-weight: 800; }
.vsteps p { color: var(--text-2); font-size: 14.5px; margin-top: 4px; }
.cmd { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 8px 8px 12px; border-radius: var(--r-sm); background: var(--well); box-shadow: inset 0 0 0 1px var(--hairline); }
.cmd code { flex: 1; min-width: 0; font-size: 12px; color: var(--text); overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.pub-hash { margin-top: 10px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--text); word-spacing: 2px; overflow-wrap: anywhere; }
.hash-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#hash-input {
  width: 100%; margin-top: 12px; height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-sm);
  background: var(--well); color: var(--text); font-family: var(--font-mono); font-size: 12.5px;
  box-shadow: inset 0 0 0 1px var(--edge);
}
#hash-input::placeholder { color: var(--text-3); font-family: var(--font-sans); font-size: 14px; }
#hash-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
#hash-input.ok { box-shadow: inset 0 0 0 2px var(--ok-text); }
#hash-input.bad { box-shadow: inset 0 0 0 2px var(--bad-text); }
#verify-status { margin-top: 10px; font-size: 14px; font-weight: 700; }
#verify-status:empty { display: none; }
#verify-status.ok { color: var(--ok-text); }
#verify-status.bad { color: var(--bad-text); }
.verify-foot { margin-top: 8px; font-size: 13px; color: var(--text-3); }

.reqs { display: grid; grid-template-columns: auto 1fr; gap: 0 20px; }
.reqs dt, .reqs dd { padding: 14px 0; border-top: 1px solid var(--hairline); font-size: 15px; }
.reqs dt { color: var(--text-3); font-weight: 700; }
.reqs dd { color: var(--text-2); }

/* loading and error states */
.fade-swap { transition: opacity 150ms ease-out; }
.fade-swap.out { opacity: 0; }
.skeleton { border-radius: var(--r-lg); background: var(--fill); min-height: 64px; animation: pulse 1.6s ease-in-out infinite; }
.fetch-note { margin-top: 10px; font-size: 13px; color: var(--text-3); }
.fade-swap [data-ssr] ~ .skeleton, .fade-swap [data-ssr] ~ .fetch-note { display: none; }
.state-error { color: var(--bad-text); font-size: 15px; }
.state-error .retry { margin-left: 10px; border: 0; background: var(--fill); color: var(--text); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-weight: 700; }
.ssr-stale { margin-top: 10px; font-size: 13px; color: var(--text-3); }
.empty-card { padding: 28px; border-radius: var(--r-xl); background: var(--glass-2); box-shadow: var(--rim), 0 0 0 1px var(--edge); color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
