:root {
  --np-bg: #fdfdfd;
  --np-surface: #ffffff;
  --np-sunken: #f5f5f7;
  --np-border: rgba(0, 0, 0, 0.08);
  --np-border-strong: rgba(0, 0, 0, 0.14);
  --np-text: #1d1d1f;
  --np-text-soft: #515156;
  --np-text-faint: #86868b;
  --np-accent: #2f6df6;        /* Neptune blue */
  --np-live: #34c759;
  --np-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --np-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --np-bg: #0a0a0c; --np-surface: #16161a; --np-sunken: #0e0e10;
    --np-border: rgba(255,255,255,0.10); --np-border-strong: rgba(255,255,255,0.16);
    --np-text: #f5f5f7; --np-text-soft: #c7c7cc; --np-text-faint: #8e8e93;
    --np-accent: #6ea0ff;
  }
}

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 var(--np-ui); color: var(--np-text); background: var(--np-bg); }
.np-wrap { max-width: 920px; margin: 0 auto; padding: 56px 24px 96px; }
.np-back { font-size: 14px; color: var(--np-text-faint); text-decoration: none; }

.np-hero-head { text-align: center; margin: 28px 0 8px; }
.np-hero-head img { width: 132px; height: 132px; }
.np-hero-head h1 { font-size: 40px; margin: 14px 0 4px; letter-spacing: -0.02em; }
.np-tagline { font-size: 19px; color: var(--np-text-soft); margin: 0 auto 24px; max-width: 34em; }
.np-cta { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px; background: var(--np-accent); color: #fff; font-weight: 600; text-decoration: none; }
.np-cta .np-key { background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.5); color: #fff; border-radius: 6px; padding: 0 7px; font: 600 13px var(--np-mono); }
.np-cta-meta { display: block; margin-top: 10px; font-size: 13px; color: var(--np-text-faint); }

/* ---- Hero animation stage: a preview window opens ON TOP of the terminal ---- */
/* The terminal sits centered at rest; when the preview opens, the terminal
   eases up-and-left and the preview slides in over its lower-right. */
.np-stage { position: relative; max-width: 900px; margin: 40px auto 8px; min-height: 420px; }
.np-terminal { width: 56%; margin: 0 auto; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.np-stage.is-open .np-terminal { transform: translate(-20%, -24px); }

.np-win { background: var(--np-surface); border: 1px solid var(--np-border); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.18); overflow: hidden; }
.np-bar { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--np-sunken); border-bottom: 1px solid var(--np-border); }
.np-dots { display: flex; gap: 6px; }
.np-dots span { width: 11px; height: 11px; border-radius: 999px; }
.np-dots .c { background: #ff5f57; } .np-dots .m { background: #febc2e; } .np-dots .x { background: #28c840; }
.np-title { font-size: 12px; color: var(--np-text-soft); font-weight: 600; }
.np-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--np-text-faint); }
.np-pulse { width: 8px; height: 8px; border-radius: 999px; background: var(--np-live); }
@media (prefers-reduced-motion: no-preference) { .np-pulse { animation: np-pulse 2.4s ease-out infinite; } }
@keyframes np-pulse { 0% { box-shadow: 0 0 0 0 rgba(52,199,89,.4);} 70%{ box-shadow:0 0 0 6px rgba(52,199,89,0);} 100%{ box-shadow:0 0 0 0 rgba(52,199,89,0);} }

.np-term { padding: 16px 18px; font-family: var(--np-mono); font-size: 12px; line-height: 1.65; min-height: 150px; overflow: hidden; }
/* Lines never wrap (sized to fit) so the prompt glyph stays attached to its
   text. Uses nowrap, not pre: the HTML minifier reflows source lines and
   inserts newlines mid-element, which `pre` would render as breaks — nowrap
   collapses them to spaces. Intentional indents use &nbsp; to survive. */
.np-line { opacity: 0; transform: translateY(4px); transition: opacity .28s ease, transform .28s ease; white-space: nowrap; }
.np-line.is-shown { opacity: 1; transform: none; }
.np-line .dim { color: var(--np-text-faint); }
.np-line .accent { color: var(--np-accent); }
.np-line .green { color: #1f7a35; }
.np-line .kw { color: var(--np-accent); font-weight: 600; }
.np-line .path { color: #2a5db0; }
@media (prefers-color-scheme: dark) { .np-line .green { color:#5fd97c;} .np-line .path { color:#6cb3ff;} }
.np-caret { display: inline-block; width: 7px; height: 14px; vertical-align: -2px; background: var(--np-accent); margin-left: 2px; }
@media (prefers-reduced-motion: no-preference) { .np-caret { animation: np-blink 1s steps(2) infinite; } }
@keyframes np-blink { 50% { opacity: 0; } }

/* The preview window opens on top of the terminal, offset to the lower-right. */
.np-preview {
  position: absolute; right: 0; bottom: 0; width: 37.5%; z-index: 2;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.30);
  opacity: 0; transform: translate(14px, 26px) scale(0.95);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.2,1);
}
.np-preview.is-shown { opacity: 1; transform: none; }
/* During a loop reset, kill transitions so windows snap to start, no slide-back. */
.np-stage.is-resetting .np-line,
.np-stage.is-resetting .np-preview,
.np-stage.is-resetting .np-terminal { transition: none !important; }
/* 4:3 canvas; the near-square diagram is centered inside it. */
.np-preview .np-canvas { background: #fff; padding: 14px; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; }
.np-preview .np-canvas img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }

/* Review bar mirrors Neptunus's accept/reject window footer. */
.np-review { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--np-border); }
.np-review-hint { font-size: 11px; color: var(--np-text-faint); flex: 1; }
.np-review-actions { display: flex; gap: 8px; }
.np-btn { font: 600 12px var(--np-ui); padding: 5px 14px; border-radius: 8px; border: 1px solid var(--np-border-strong); color: var(--np-text); background: var(--np-surface); transition: transform .12s ease, filter .12s ease; }
.np-btn-primary { background: var(--np-accent); border-color: var(--np-accent); color: #fff; }
.np-btn.is-pressed { transform: scale(0.94); filter: brightness(0.9); }

/* Demo cursor that glides to Approve and clicks. */
.np-cursor { position: absolute; top: 0; left: 0; z-index: 5; opacity: 0; transform: translate(36px, 220px); transition: transform .65s cubic-bezier(.4, 0, .2, 1), opacity .3s ease; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.np-cursor.is-visible { opacity: 1; }
.np-stage.is-resetting .np-cursor { transition: none !important; }

@media (max-width: 720px) {
  .np-stage { padding-bottom: 0; }
  .np-terminal { width: 100%; }
  .np-stage.is-open .np-terminal { transform: none; }
  .np-preview { position: static; width: 100%; margin-top: 16px; transform: translateY(16px) scale(0.97); box-shadow: 0 24px 60px rgba(0,0,0,0.18); }
  .np-review-hint { display: none; }
}

/* Reduced motion: show the full scene statically, no looping animation. */
@media (prefers-reduced-motion: reduce) {
  .np-line, .np-preview { opacity: 1 !important; transform: none !important; transition: none; }
  /* Show only the flow preview statically (both windows share one spot). */
  .np-preview[data-preview="er"] { display: none; }
}

/* ---- Value / why ---- */
.np-value { margin: 64px auto 0; max-width: 640px; text-align: center; }
.np-value .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--np-accent); }
.np-value h2 { font-size: 28px; letter-spacing: -0.02em; margin: 8px 0 12px; }
.np-value p { color: var(--np-text-soft); font-size: 18px; line-height: 1.55; margin: 0; }

/* ---- Feature blocks ---- */
.np-features { margin: 72px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 34px 44px; }
.np-feature .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--np-accent); }
.np-feature h3 { font-size: 20px; margin: 7px 0 7px; letter-spacing: -0.01em; }
.np-feature p { margin: 0; color: var(--np-text-soft); }
@media (max-width: 720px) { .np-features { grid-template-columns: 1fr; gap: 28px; } }

/* ---- Connect / install ---- */
.np-connect { margin: 72px auto 0; text-align: center; }
.np-connect .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--np-accent); }
.np-connect h3 { font-size: 24px; margin: 7px 0 6px; }
.np-connect > p { color: var(--np-text-soft); margin: 0 auto 16px; max-width: 40em; }
.np-snippet { max-width: 720px; margin: 0 auto 14px; text-align: left; }
.np-snippet-label { display: block; font-size: 12px; font-weight: 600; color: var(--np-text-faint); margin-bottom: 6px; }
.np-code { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--np-sunken); border: 1px solid var(--np-border); border-radius: 10px; }
.np-code code { font: 13px/1.5 var(--np-mono); color: var(--np-text); overflow-x: auto; white-space: nowrap; flex: 1; }
.np-copy { flex-shrink: 0; font: 600 12px var(--np-ui); padding: 6px 14px; border-radius: 8px; border: 1px solid var(--np-border-strong); background: var(--np-surface); color: var(--np-text); cursor: pointer; }
.np-connect-note { font-size: 13px; color: var(--np-text-faint); opacity: 0.85; margin: 30px auto 0; max-width: 40em; }

/* ---- Changelog ---- */
.np-changelog { margin-top: 64px; }
.np-changelog h2 { font-size: 22px; margin: 0 0 16px; }
.np-rel { background: var(--np-sunken); border: 1px solid var(--np-border); border-radius: 12px; padding: 16px 20px; margin-bottom: 14px; }
.np-rel h3 { margin: 0 0 2px; font-size: 17px; }
.np-rel time { color: var(--np-text-faint); font-weight: 400; font-size: 14px; }
.np-rel h4 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--np-text-faint); }
.np-rel ul { margin: 0; padding-left: 20px; }
.np-rel li { margin: 2px 0; }
kbd { font: inherit; background: var(--np-sunken); border: 1px solid var(--np-border-strong); border-radius: 5px; padding: 1px 6px; }
