/* DSH third-party long-term memory plugin (unofficial) · landing page
   dark / grid / glow · no external fonts, no CDN, no trackers */

:root {
  --bg: #04060b;
  --bg-2: #070c14;
  --panel: rgba(10, 16, 26, 0.72);
  --panel-solid: #0a1019;
  --line: rgba(120, 180, 220, 0.14);
  --line-strong: rgba(52, 245, 197, 0.32);
  --ink: #e6f0fb;
  --dim: #8ba1bd;
  --dim3: #5d748f;
  --accent: #34f5c5;
  --accent-soft: rgba(52, 245, 197, 0.12);
  --violet: #7b61ff;
  --amber: #ffb457;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Segoe UI Var", "Segoe UI", system-ui, -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

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

/* ── ambience ─────────────────────────────────────────────────────────── */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
}

.grid-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(90, 160, 200, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 160, 200, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 78%);
}

.glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.glow.a { width: 620px; height: 620px; top: -220px; left: -140px; background: radial-gradient(circle, rgba(52, 245, 197, 0.28), transparent 65%); }
.glow.b { width: 680px; height: 680px; top: 120px; right: -220px; background: radial-gradient(circle, rgba(123, 97, 255, 0.26), transparent 65%); }

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ── layout ───────────────────────────────────────────────────────────── */
.wrap { width: min(var(--maxw), calc(100% - 44px)); margin-inline: auto; }

main, header, footer { position: relative; z-index: 2; }

/* ── nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(4, 6, 11, 0.92), rgba(4, 6, 11, 0.55));
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 64px;
}

.brand {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.brand i { color: var(--accent); font-style: normal; opacity: 0.8; }
.brand em {
  font-style: normal;
  font-size: 10px;
  padding: 2px 6px;
  margin-left: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  padding: 7px 11px;
  border-radius: 8px;
  transition: color 0.18s, background 0.18s;
}
.nav-links a:hover { color: var(--ink); background: rgba(120, 180, 220, 0.08); }

.lang { flex: 0 0 auto; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(9, 14, 22, 0.7); }
.lang button {
  white-space: nowrap;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero { padding: 92px 0 58px; }

.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line-strong), transparent);
}

h1 {
  background: linear-gradient(96deg, #2ee8bb 0%, #86e6ff 46%, #9d86ff 80%, #7b61ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  font-weight: 650;
  max-width: 20ch;
}
h1 span { color: inherit; background: none; }

.lede {
  color: var(--dim);
  font-size: clamp(15px, 1.5vw, 18px);
  max-width: 62ch;
  margin: 0 0 34px;
}
.lede b { color: var(--ink); font-weight: 600; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 54px; }

.btn {
  --cut: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(11, 17, 27, 0.8);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: all 0.18s;
  cursor: pointer;
}
.btn:hover { border-color: var(--line-strong); background: rgba(52, 245, 197, 0.08); transform: translateY(-1px); }
.btn.primary {
  color: #04120e;
  background: linear-gradient(120deg, var(--accent), #7ef0d4 55%, #9be9ff);
  border-color: transparent;
  box-shadow: 0 12px 34px -14px rgba(52, 245, 197, 0.8);
}
.btn.primary:hover { box-shadow: 0 16px 40px -12px rgba(52, 245, 197, 0.95); }
.btn svg { width: 16px; height: 16px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stats li {
  background: rgba(7, 11, 18, 0.9);
  padding: 18px 20px;
}
.stats strong {
  display: block;
  font-family: var(--mono);
  font-size: 23px;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stats span { font-size: 11.5px; color: var(--dim3); letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--mono); }

/* ── section chrome ───────────────────────────────────────────────────── */
section.block { padding: 74px 0; border-top: 1px solid rgba(120, 180, 220, 0.09); }

.sec-head { margin-bottom: 38px; }
.sec-num {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}
h2 {
  font-size: clamp(25px, 3.1vw, 36px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-weight: 640;
}
.sec-head p { color: var(--dim); margin: 0; max-width: 66ch; }

/* ── feature cards ────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  padding: 24px 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(52, 245, 197, 0.06), transparent 55%),
    var(--panel);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.05), transparent 40%);
  opacity: 0;
  transition: opacity 0.25s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card:hover::after { opacity: 1; }

.card .ic {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.card .ic svg { width: 17px; height: 17px; }
.card h3 { font-size: 15.5px; margin: 0 0 8px; font-weight: 620; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--dim); font-size: 13.5px; line-height: 1.62; }
.card code, .term code, .dl-card code, .faq code, .step code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: #b9f6e6;
  background: rgba(52, 245, 197, 0.09);
  border: 1px solid rgba(52, 245, 197, 0.16);
  padding: 1px 5px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ── pipeline ─────────────────────────────────────────────────────────── */
.pipe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: stretch;
  counter-reset: step;
}
.pipe-step {
  position: relative;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 13, 21, 0.82);
}
.pipe-step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--accent);
  opacity: 0.85;
  display: block;
  margin-bottom: 10px;
}
.pipe-step h4 { margin: 0 0 7px; font-size: 14px; font-weight: 620; }
.pipe-step p { margin: 0; font-size: 12.8px; color: var(--dim); line-height: 1.55; }
.pipe-step.hot { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(52, 245, 197, 0.09), 0 18px 40px -28px rgba(52, 245, 197, 0.7); }

.note {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background: rgba(52, 245, 197, 0.05);
  border-radius: 0 10px 10px 0;
  color: var(--dim);
  font-size: 13.5px;
}
.note b { color: var(--ink); }

/* ── steps + terminal ─────────────────────────────────────────────────── */
.start-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 26px; align-items: start; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 13, 21, 0.72);
}
.steps .n {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
}
.steps h4 { margin: 2px 0 5px; font-size: 14.5px; font-weight: 620; }
.steps p { margin: 0; font-size: 13.2px; color: var(--dim); }

.term {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(9, 14, 22, 0.96), rgba(5, 8, 13, 0.96));
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--dim3);
  text-transform: uppercase;
}
.term-bar i { width: 8px; height: 8px; border-radius: 50%; background: #2b3a4d; display: inline-block; }
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: auto; }
.term pre {
  margin: 0;
  padding: 18px 16px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.6px;
  line-height: 1.85;
  color: #cfe4f5;
}
.term .cmt { color: #56708c; }
.term .flag { color: var(--accent); }
.term .path { color: #ffce80; }

/* ── downloads ────────────────────────────────────────────────────────── */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.dl-card.big { border-color: var(--line-strong); background: radial-gradient(130% 110% at 100% 0%, rgba(123, 97, 255, 0.1), transparent 60%), var(--panel); }
.dl-top { display: flex; align-items: flex-start; gap: 12px; }
.dl-top .ic { flex: none; margin: 0; }
.dl-meta { min-width: 0; }
.dl-meta h4 { margin: 0; font-size: 14.5px; font-weight: 620; word-break: break-all; }
.dl-meta .sz { font-family: var(--mono); font-size: 11.5px; color: var(--dim3); letter-spacing: 0.04em; }
.dl-card p.hint { margin: 0; font-size: 12.8px; color: var(--dim); }
.dl-card .sha { font-family: var(--mono); font-size: 10.5px; color: var(--dim3); word-break: break-all; line-height: 1.5; }

.dl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.dl-btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: rgba(52, 245, 197, 0.1);
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.16s;
}
.dl-btn:hover { background: rgba(52, 245, 197, 0.2); box-shadow: 0 10px 26px -16px var(--accent); }
.dl-btn[disabled] { opacity: 0.55; cursor: progress; }
.dl-btn.ghost { background: transparent; color: var(--dim); border-color: var(--line); }
.dl-btn.ghost:hover { color: var(--ink); background: rgba(120, 180, 220, 0.08); }

.progress {
  height: 3px;
  border-radius: 999px;
  background: rgba(120, 180, 220, 0.14);
  overflow: hidden;
  display: none;
}
.progress.on { display: block; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #9be9ff); transition: width 0.12s linear; }

.dl-status { font-family: var(--mono); font-size: 11px; color: var(--dim3); min-height: 15px; }
.dl-status.ok { color: var(--accent); }
.dl-status.bad { color: #ff7a7a; }

.parts { font-family: var(--mono); font-size: 10.5px; color: var(--dim3); }
.parts a { color: var(--dim); }

/* ── faq ──────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 10px; }
details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 13, 21, 0.7);
  padding: 0 18px;
}
details[open] { border-color: var(--line-strong); }
summary {
  cursor: pointer;
  padding: 16px 0;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+";
  font-family: var(--mono);
  color: var(--accent);
  font-size: 15px;
  width: 14px;
}
details[open] summary::before { content: "−"; }
details p { margin: 0 0 16px 24px; color: var(--dim); font-size: 13.4px; }

/* ── footer ───────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 54px;
  color: var(--dim3);
  font-size: 12.5px;
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 26px; justify-content: space-between; align-items: flex-start; }
.foot-col h5 { margin: 0 0 9px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; color: var(--dim); text-transform: uppercase; font-weight: 500; }
.foot-col a { display: block; color: var(--dim); text-decoration: none; padding: 2.5px 0; font-size: 12.5px; }
.foot-col a:hover { color: var(--accent); }
.legal { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(120, 180, 220, 0.07); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-family: var(--mono); font-size: 11px; }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .start-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero { padding: 62px 0 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #bg { display: none; }
  * { transition: none !important; animation: none !important; }
}

/* ── hero grid + injection preview ─────────────────────────────────────── */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 46px;
  align-items: center;
}

.preview {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(9, 16, 26, 0.95), rgba(5, 9, 14, 0.95));
  box-shadow: 0 30px 70px -50px rgba(52, 245, 197, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12px;
}
.preview::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, rgba(123, 97, 255, 0.14), transparent 60%);
}
.pv-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--dim3);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pv-bar i { width: 7px; height: 7px; border-radius: 50%; background: #24313f; }
.pv-bar i:nth-child(1) { background: #ff5f57; }
.pv-bar i:nth-child(2) { background: #febc2e; }
.pv-bar i:nth-child(3) { background: #28c840; }
.pv-bar span { margin-left: auto; letter-spacing: 0.1em; }
.pv-body { padding: 15px 14px 17px; position: relative; }
.pv-sec { color: var(--accent); font-size: 10.5px; letter-spacing: 0.1em; margin: 12px 0 5px; }
.pv-sec:first-child { margin-top: 0; }
.pv-line { color: #b9d4e6; line-height: 1.75; padding-left: 11px; position: relative; }
.pv-line::before { content: "·"; position: absolute; left: 0; color: var(--dim3); }
.pv-line em { color: var(--dim3); font-style: normal; }
.pv-muted { color: var(--dim3); padding-left: 11px; line-height: 1.75; }
.pv-budget { margin-top: 15px; padding-top: 12px; border-top: 1px dashed rgba(120, 180, 220, 0.18); }
.pv-budget .meter { height: 4px; border-radius: 999px; background: rgba(120, 180, 220, 0.14); overflow: hidden; margin: 7px 0 6px; }
.pv-budget .meter i { display: block; height: 100%; width: 15%; background: linear-gradient(90deg, var(--accent), #9be9ff); }
.pv-budget .row { display: flex; justify-content: space-between; color: var(--dim3); font-size: 10.5px; letter-spacing: 0.06em; }

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .preview { order: 2; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:last-child { grid-column: 1 / -1; }
}

/* ── unofficial marking ──────────────────────────────────────────────────── */
.brand em.unofficial {
  border-color: rgba(255, 180, 87, 0.45);
  color: var(--amber);
  letter-spacing: 0.06em;
}

.notice-bar {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 180, 87, 0.22);
  background: linear-gradient(90deg, rgba(255, 180, 87, 0.1), rgba(255, 180, 87, 0.03) 45%, rgba(4, 6, 11, 0));
  font-size: 12.5px;
  color: #e7d3b6;
}
.notice-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}
.notice-bar strong {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(255, 180, 87, 0.4);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.notice-bar span { color: #cbb69c; line-height: 1.5; }

.legal.disclaimer {
  display: block;
  border-top: 0;
  padding-top: 4px;
  color: var(--dim3);
  line-height: 1.6;
  max-width: 92ch;
}
