/* ============================================================
   Moony Labs — design system
   Dark, protocol-lab. Governed by math, not management.
   ============================================================ */

:root {
  /* ground — true black, neutral elevations */
  --bg:        #0d0d11;   /* soft near-black */
  --bg-1:      #131319;   /* elevated surface */
  --bg-2:      #1a1a21;   /* card */
  --bg-3:      #23232b;   /* hover / inset */

  /* hairlines */
  --line:      rgba(240, 238, 245, 0.08);
  --line-2:    rgba(240, 238, 245, 0.15);

  /* ink */
  --text:      #f4f3f7;
  --dim:       #aeaab6;
  --mute:      #72707c;

  /* brand violet (accent, tweakable) */
  --acc:       #8b5cf6;
  --acc-bright:#a78bfa;
  --acc-deep:  #502792;
  --lav:       #e7d9fd;
  --glow:      rgba(139, 92, 246, 0.45);

  /* official brand gradient — lavender → warm cream */
  --grad:      linear-gradient(100deg, #D8C5FD 0%, #FFF2D9 100%);
  --grad-1:    #D8C5FD;
  --grad-2:    #FFF2D9;

  /* signal */
  --pos:       #5fd0a3;
  --warn:      #e0b15a;

  /* texture */
  --grid-rgb:  231, 217, 253;
  --grid-a:    0.045;
  --grid-size: 30px;

  /* soft depth */
  --shadow:    0 1px 0 rgba(255,255,255,0.04) inset, 0 18px 44px -26px rgba(0,0,0,0.8);
  --shadow-lg: 0 1px 0 rgba(255,255,255,0.05) inset, 0 40px 90px -44px rgba(0,0,0,0.85);

  /* type */
  --display: "Space Grotesk", "Hanken Grotesk", system-ui, sans-serif;
  --body:    "Hanken Grotesk", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* metrics */
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --r: 14px;
  --r-sm: 9px;
  --section-y: clamp(80px, 11vw, 150px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* page texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(var(--grid-rgb), var(--grid-a)) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--grid-rgb), var(--grid-a)) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  opacity: 1;
}
body.tex-dots::before {
  background:
    radial-gradient(circle, rgba(var(--grid-rgb), calc(var(--grid-a) * 1.8)) 1px, transparent 1.4px);
  background-size: var(--grid-size) var(--grid-size);
}
body.tex-flat::before { display: none; }

/* ambient glow blobs */
.aura {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.22;
}
.aura.a1 { top: -240px; left: 50%; width: 640px; height: 420px; transform: translateX(-50%);
  background: radial-gradient(circle, var(--glow), transparent 70%); }
.aura.a2 { display: none; }

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

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: var(--section-y); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -0.02em; line-height: 1.04; }
h1 { font-size: clamp(40px, 6.4vw, 76px); }
h2 { font-size: clamp(30px, 4.2vw, 50px); }
h3 { font-size: clamp(20px, 2.4vw, 25px); letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--acc-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--acc), transparent);
}
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--dim); line-height: 1.62; }
.mono { font-family: var(--mono); }
.acc { color: var(--acc-bright); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 13.5px; font-weight: 500;
  letter-spacing: 0.01em;
  padding: 13px 20px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--grad); color: #0a0710; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10) inset, 0 10px 34px -14px var(--grad-1);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,0.16) inset, 0 16px 44px -14px var(--grad-1); }
.btn-ghost {
  background: rgba(231,217,253,0.02); color: var(--text); border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--acc); background: rgba(139,92,246,0.08); transform: translateY(-2px); }

/* ---------- header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(13,13,17,0.86), rgba(13,13,17,0.5));
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand .glyph { font-size: 26px; line-height: 1; color: var(--acc-bright); }
.brand b { font-family: var(--display); font-weight: 600; font-size: 17.5px; letter-spacing: -0.01em; }
.brand b span { color: var(--mute); font-weight: 500; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--dim); text-decoration: none; transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 540px) { .nav-cta .btn-ghost { display: none; } }

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(40px, 6vw, 72px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 4vw, 60px); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-top: 22px; }
.hero h1 .em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 22px; max-width: 33em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.facts {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: 38px;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: linear-gradient(180deg, rgba(231,217,253,0.025), transparent);
}
.fact { flex: 1 1 120px; padding: 15px 18px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.fact .v { font-family: var(--display); font-size: 21px; font-weight: 600; margin-top: 5px; letter-spacing: -0.01em; }
.fact .v small { font-size: 12px; color: var(--dim); font-family: var(--mono); font-weight: 400; }

/* hero curve panel */
.curve-panel {
  position: relative; border: 1px solid var(--line); border-radius: var(--r);
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(139,92,246,0.09), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg));
  padding: 18px 18px 14px; overflow: hidden;
}
.curve-panel .cp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.curve-panel .cp-title { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.curve-panel .cp-eq { font-family: var(--mono); font-size: 12.5px; color: var(--acc-bright); }
.curve-svg { width: 100%; display: block; }
.curve-readout { display: flex; gap: 22px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--mono); }
.curve-readout .ro { font-size: 11px; color: var(--mute); letter-spacing: 0.05em; }
.curve-readout .ro b { display: block; font-size: 16px; color: var(--text); font-weight: 500; margin-top: 3px; }

/* ---------- generic section header ---------- */
.shead { max-width: 40em; }
.shead h2 { margin-top: 16px; }
.shead p { margin-top: 18px; }
.center { text-align: center; margin-inline: auto; }
.center .eyebrow { justify-content: center; }
.center .eyebrow::before { display: none; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 18px; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .g-3 { grid-template-columns: 1fr; } .g-2 { grid-template-columns: 1fr; } }

.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  padding: 26px; transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card .ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(139,92,246,0.28), rgba(139,92,246,0.06));
  border: 1px solid var(--line-2); color: var(--acc-bright); margin-bottom: 18px;
}
.card .ico svg { width: 21px; height: 21px; }
.card h3 { margin-bottom: 9px; }
.card p { color: var(--dim); font-size: 15.5px; line-height: 1.6; }
.card .num {
  position: absolute; top: 20px; right: 24px;
  font-family: var(--mono); font-size: 12px; color: var(--mute); letter-spacing: 0.1em;
}

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--dim); padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: rgba(231,217,253,0.02);
}

/* ---------- how it works / reserve flow ---------- */
.flow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .flow { grid-template-columns: 1fr; } }
.flow-card { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; background: var(--bg-1); }
.flow-card .lbl { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.flow-card.buy .lbl { color: var(--pos); }
.flow-card.sell .lbl { color: var(--warn); }
.flow-card .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.flow-card p { color: var(--dim); font-size: 15px; margin-top: 12px; }
.flow-card .fee { margin-top: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--mute); }
.flow-card .fee b { color: var(--text); font-weight: 500; }

/* ---------- interactive calculator ---------- */
.calc {
  border: 1px solid var(--line-2); border-radius: var(--r);
  background:
    radial-gradient(130% 100% at 100% 0%, rgba(139,92,246,0.08), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  overflow: hidden;
}
.calc-grid { display: grid; grid-template-columns: 1.15fr 1fr; }
@media (max-width: 880px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-plot { padding: 22px; border-right: 1px solid var(--line); position: relative; }
@media (max-width: 880px) { .calc-plot { border-right: 0; border-bottom: 1px solid var(--line); } }
.calc-plot .cp-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
#bigCurve { width: 100%; display: block; cursor: crosshair; }
.calc-side { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.calc-side .ctl-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); display: flex; justify-content: space-between; }
.calc-side .ctl-lbl b { color: var(--acc-bright); font-weight: 500; }
input[type="range"] { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--bg-3); margin-top: 12px; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--acc-bright); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--acc), 0 0 14px var(--glow); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--acc-bright); border: 3px solid var(--bg); cursor: grab; }
.readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.readouts .ro { background: var(--bg-1); padding: 14px 16px; }
.readouts .ro .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.readouts .ro .v { font-family: var(--display); font-size: 23px; font-weight: 600; margin-top: 5px; letter-spacing: -0.01em; }
.readouts .ro .v small { font-family: var(--mono); font-size: 11px; color: var(--dim); font-weight: 400; }
.calc-note { font-family: var(--mono); font-size: 11.5px; color: var(--mute); line-height: 1.5; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { font-family: var(--mono); font-size: 12px; padding: 6px 14px; border-radius: 6px; border: 0; background: transparent; color: var(--dim); cursor: pointer; transition: all .15s ease; }
.seg button.on { background: var(--acc); color: #0a0710; font-weight: 600; }
.usd-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 14px; background: var(--bg); }
.usd-input span { font-family: var(--mono); color: var(--mute); font-size: 14px; }
.usd-input input { flex: 1; background: transparent; border: 0; color: var(--text); font-family: var(--mono); font-size: 16px; padding: 12px 0; outline: none; }

/* ---------- Labs role / principles ---------- */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 720px) { .principles { grid-template-columns: 1fr; } }
.principle { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; background: var(--bg-1); display: flex; gap: 14px; }
.principle .pic { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--acc-bright); background: rgba(139,92,246,0.07); }
.principle .pic svg { width: 17px; height: 17px; }
.principle h3 { font-size: 17px; }
.principle p { color: var(--dim); font-size: 14.5px; margin-top: 6px; line-height: 1.55; }
.principle .meta { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.principle .meta a { color: var(--acc-bright); text-decoration: none; }
.principle .meta a:hover { text-decoration: underline; }

.disclaim {
  margin-top: 22px; border: 1px dashed var(--line-2); border-radius: var(--r);
  padding: 20px 24px; background: rgba(231,217,253,0.015);
  font-size: 15px; color: var(--dim); display: flex; gap: 14px; align-items: flex-start;
}
.disclaim .qm { font-family: var(--display); font-size: 30px; color: var(--acc-deep); line-height: 0.8; }

/* ---------- quick start ---------- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; border: 1px solid var(--line); border-radius: var(--r); padding: 26px 24px 24px; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); }
.step::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  font-family: var(--mono); font-size: 12px; color: var(--acc-bright);
  border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 9px; display: inline-block; margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--dim); font-size: 14.5px; line-height: 1.55; }

/* ---------- address block ---------- */
.addr-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--bg-1); }
.addr-row .al { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); min-width: 120px; }
.addr-row code { flex: 1; min-width: 200px; font-family: var(--mono); font-size: 12.5px; color: var(--lav); word-break: break-all; }
.copy-btn { font-family: var(--mono); font-size: 11px; color: var(--dim); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 11px; cursor: pointer; transition: all .15s ease; }
.copy-btn:hover { color: var(--text); border-color: var(--acc); }
.copy-btn.ok { color: var(--pos); border-color: var(--pos); }

/* ---------- CTA band ---------- */
/* ---------- for developers (CLI teaser) ---------- */
.dev-grid { display: grid; grid-template-columns: 1.02fr 1.18fr; gap: clamp(30px, 4.5vw, 64px); align-items: center; }
@media (max-width: 880px) { .dev-grid { grid-template-columns: 1fr; gap: 30px; } }
.dev-copy .lead { margin-top: 18px; }
.dev-list { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dev-list li { position: relative; padding-left: 26px; color: var(--dim); font-size: 15px; line-height: 1.5; }
.dev-list li b { color: var(--text); font-weight: 600; }
.dev-list li svg { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; color: var(--acc-bright); }
.dev-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.band {
  border: 1px solid var(--line-2); border-radius: 20px; padding: clamp(34px, 5vw, 60px);
  text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(90% 140% at 50% -20%, rgba(139,92,246,0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg));
}
.band .glyph-bg { position: absolute; font-size: 360px; right: -60px; bottom: -150px; color: rgba(231,217,253,0.025); font-family: var(--display); pointer-events: none; }
.band h2 { position: relative; }
.band p { position: relative; margin: 18px auto 28px; max-width: 30em; }
.band .hero-cta { position: relative; justify-content: center; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding-block: 56px 40px; margin-top: var(--section-y); }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 30px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr 1fr; gap: 28px; } }
@media (max-width: 620px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand .glyph { font-size: 30px; color: var(--acc-bright); }
.foot-brand p { color: var(--mute); font-size: 13.5px; margin-top: 12px; max-width: 26em; line-height: 1.6; }
.fcol h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px; font-weight: 500; }
.fcol a { display: block; color: var(--dim); text-decoration: none; font-size: 14px; padding: 5px 0; transition: color .15s ease; }
.fcol a:hover { color: var(--acc-bright); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--mute); }
.foot-base a { color: var(--mute); text-decoration: none; }
.foot-base a:hover { color: var(--dim); }

/* ---------- reveal (content always visible; entrance is a no-op enhancement) ---------- */
.rv { opacity: 1; transform: none; }

/* ---------- lineage (Code Inc. → Moony Labs → Moony) ---------- */
.lineage { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; margin-top: 30px; }
.lineage.lineage-2 { grid-template-columns: 1fr auto 1fr; max-width: 880px; margin-left: auto; margin-right: auto; }
@media (max-width: 820px) { .lineage.lineage-2 { grid-template-columns: 1fr; } }
.lin-node { border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 20px; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); display: flex; flex-direction: column; }
.lin-node.accent { border-color: var(--line-2); background: radial-gradient(120% 120% at 100% 0%, rgba(139,92,246,0.12), transparent 55%), linear-gradient(180deg, var(--bg-2), var(--bg-1)); }
.lin-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.lin-h { font-family: var(--display); font-size: 21px; font-weight: 600; margin-top: 8px; letter-spacing: -0.01em; }
.lin-node.accent .lin-h { color: var(--acc-bright); }
.lin-d { color: var(--dim); font-size: 13.5px; line-height: 1.55; margin-top: 10px; flex: 1; }
.lin-tag { margin-top: 16px; font-family: var(--mono); font-size: 10.5px; color: var(--mute); border-top: 1px solid var(--line); padding-top: 12px; letter-spacing: 0.02em; display: flex; align-items: center; gap: 9px; }
.lin-tag .fc { height: 13px; width: auto; display: inline-block; opacity: 0.92; }
.lin-tag .fc-sep { color: var(--line-2); }
.lin-arrow { display: grid; place-items: center; width: 46px; color: var(--mute); }
.lin-arrow svg { width: 20px; height: 20px; }
@media (max-width: 820px) {
  .lineage { grid-template-columns: 1fr; }
  .lin-arrow { width: auto; height: 34px; }
  .lin-arrow svg { transform: rotate(90deg); }
}

/* ---------- binary theme (⍜ = 1 + 0) — faint hero field ---------- */
.hero { position: relative; }
.hero > .wrap { position: relative; z-index: 2; }
.hero-binary {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  font-family: var(--mono); font-size: 13px; line-height: 1.7; letter-spacing: 0.4em;
  color: rgba(216, 197, 253, 0.15); white-space: pre; -webkit-user-select: none; user-select: none;
  -webkit-mask-image: radial-gradient(125% 105% at 86% 10%, #000 0%, rgba(0,0,0,0.4) 44%, transparent 78%);
          mask-image: radial-gradient(125% 105% at 86% 10%, #000 0%, rgba(0,0,0,0.4) 44%, transparent 78%);
}
.hero-binary .on { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; opacity: 0.65; }

/* hero layout — headline-led, horizontal status-bar anchor */
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); max-width: 14ch; }
.hero .lead { max-width: 42ch; }

/* trust / ecosystem strip (Helius-style "built on" row) */
.trust-strip { margin-top: clamp(40px, 5vw, 56px); padding-top: clamp(26px, 3vw, 32px); border-top: 1px solid var(--line); display: flex; align-items: center; gap: clamp(20px, 4vw, 40px); flex-wrap: wrap; }
.ts-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); flex: none; }
.ts-items { display: flex; align-items: center; gap: clamp(20px, 3.5vw, 36px); flex-wrap: wrap; }
.ts-item { display: inline-flex; align-items: center; gap: 9px; font-family: var(--body); font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--dim); opacity: 0.82; transition: opacity .2s ease, color .2s ease; text-decoration: none; }
.ts-item:hover { opacity: 1; color: var(--text); }
.ts-item img { height: 15px; width: auto; display: block; }
.ts-item img.ts-solana { height: 13px; }
.ts-item svg { width: 16px; height: 16px; color: var(--acc-bright); flex: none; }

/* ---------- ethos strip (cypherpunk tenets) ---------- */
.ethos-sec { padding-block: clamp(8px, 2vw, 20px); }
.ethos { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ethos-item { padding: 28px 26px 28px 0; }
.ethos-item + .ethos-item { padding-left: 26px; border-left: 1px solid var(--line); }
.ethos-n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--mute); }
.ethos-item p { font-family: var(--display); font-size: clamp(16px, 1.4vw, 19px); font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; margin-top: 14px; color: var(--text); }
.ethos-item p .gk { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 900px) {
  .ethos { grid-template-columns: 1fr 1fr; }
  .ethos-item { padding: 24px 22px; border-top: 1px solid var(--line); }
  .ethos-item:nth-child(-n+2) { border-top: 0; }
  .ethos-item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .ethos-item:nth-child(even) { border-left: 1px solid var(--line); }
}
@media (max-width: 540px) {
  .ethos { grid-template-columns: 1fr; }
  .ethos-item, .ethos-item + .ethos-item { padding: 20px 0; border-left: 0; border-top: 1px solid var(--line); }
  .ethos-item:first-child { border-top: 0; }
}

/* ---------- statement blocks (oversized editorial blips) ---------- */
.statement { padding-block: clamp(96px, 15vw, 200px); }
.statement-k { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mute); display: inline-flex; align-items: center; gap: 12px; margin-bottom: clamp(26px, 4vw, 46px); }
.statement-k::before { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, var(--acc-bright), transparent); }
.statement p { font-family: var(--display); font-weight: 600; font-size: clamp(33px, 5.2vw, 68px); line-height: 1.06; letter-spacing: -0.035em; max-width: 19ch; color: var(--text); text-wrap: balance; }
.statement p .gk { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.statement .sfoot { font-family: var(--body); font-size: clamp(16px, 1.5vw, 19px); font-weight: 400; line-height: 1.55; letter-spacing: normal; color: var(--dim); max-width: 46ch; margin-top: clamp(24px, 3vw, 36px); }
/* numeric variant */
.statement .fig { font-family: var(--display); font-weight: 600; font-size: clamp(72px, 15vw, 220px); line-height: 0.9; letter-spacing: -0.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.statement .fig-sub { display: block; margin-top: 22px; }

/* ---------- hero: specification datasheet (visual anchor) ---------- */
.hero-grid { align-items: center; }
.hero-lead-col h1 { margin-top: 22px; }
.hero-lead-col .lead { margin-top: 22px; max-width: 31em; }

/* ---------- hero: specification datasheet (visual anchor) ---------- */
.hero-grid { align-items: center; }
.hero-lead-col h1 { margin-top: 22px; }
.hero-lead-col .lead { margin-top: 22px; max-width: 31em; }
.hero-lead-col .hero-cta { margin-top: 30px; }

.spec {
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  overflow: hidden; font-family: var(--mono);
  box-shadow: 0 40px 80px -50px rgba(0,0,0,0.9);
}
.spec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-1);
}
.spec-id { display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; letter-spacing: 0.13em; color: var(--text); white-space: nowrap; }
.spec-mark { height: 17px; width: auto; display: block; }
.spec-status { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; letter-spacing: 0.12em; color: var(--mute); text-transform: uppercase; white-space: nowrap; }
.ha-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 9px var(--pos); flex: none; }
.spec-rows { margin: 0; padding: 0; }
.spec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.spec-row:last-child { border-bottom: 0; }
.spec-row dt { margin: 0; font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.spec-row dd { margin: 0; font-size: 13.5px; color: var(--text); text-align: right; white-space: nowrap; }
.spec-row dd .sd { color: var(--mute); }
.spec-row dd sup { color: var(--acc-bright); font-size: 0.7em; }
.spec-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); background: var(--bg-1); }
.spec-foot code { font-size: 11.5px; color: var(--dim); letter-spacing: 0.01em; }
.spec-verify { font-size: 11.5px; color: var(--acc-bright); text-decoration: none; white-space: nowrap; }
.spec-verify:hover { text-decoration: underline; }

/* ---------- brand wordmark (core logo) ---------- */
.brand-wordmark { display: block; height: 21px; width: auto; }
.foot-wordmark { display: block; height: 30px; width: auto; }
/* dot-matrix mark — expressive / decorative contexts only */
.band-mark { position: absolute; height: 460px; width: auto; right: -30px; bottom: -150px; opacity: 0.07; pointer-events: none; }

/* density */
body.dense { --section-y: clamp(56px, 8vw, 104px); }
body.dense .card { padding: 22px; }

/* ============================================================
   OPEN-SOURCE LAYER — badges, terminal, code, source callouts
   ============================================================ */

/* GitHub link in nav */
.gh-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--dim);
  text-decoration: none; padding: 8px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: rgba(231,217,253,0.02);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.gh-link:hover { color: var(--text); border-color: var(--line-2); background: rgba(231,217,253,0.05); }
.gh-link svg { width: 16px; height: 16px; }
.gh-link .stars { display: inline-flex; align-items: center; gap: 4px; color: var(--mute); padding-left: 9px; border-left: 1px solid var(--line); }
.gh-link .stars svg { width: 12px; height: 12px; color: var(--warn); }
@media (max-width: 620px) { .gh-link .label, .gh-link .stars { display: none; } .gh-link { padding: 9px; } }

/* README-style status badges */
.badges { display: flex; flex-wrap: wrap; gap: 7px; }
.badge {
  display: inline-flex; align-items: stretch; border-radius: 6px; overflow: hidden;
  font-family: var(--mono); font-size: 11px; line-height: 1; border: 1px solid var(--line);
}
.badge .bk { background: var(--bg-3); color: var(--dim); padding: 6px 9px; display: flex; align-items: center; gap: 5px; letter-spacing: 0.02em; }
.badge .bk svg { width: 11px; height: 11px; opacity: 0.8; }
.badge .bv { background: rgba(139,92,246,0.16); color: var(--acc-bright); padding: 6px 9px; display: flex; align-items: center; gap: 4px; font-weight: 500; letter-spacing: 0.02em; }
.badge.ok .bv { background: rgba(95,208,163,0.13); color: var(--pos); }
.badge.ok .bv::before { content: "✓"; font-size: 10px; }

/* terminal block */
.term { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden;
  background: linear-gradient(180deg, #0a0612, #070510); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg-1); }
.term-bar .tdot { width: 11px; height: 11px; border-radius: 50%; opacity: 0.85; }
.term-bar .tdot.r { background: #f0625a; } .term-bar .tdot.y { background: #e0b15a; } .term-bar .tdot.g { background: #5fd0a3; }
.term-bar .ttitle { margin-left: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.term-bar .tcopy { margin-left: auto; }
.term-body { padding: 18px 18px 20px; font-family: var(--mono); font-size: 13px; line-height: 1.85; overflow-x: auto; }
.term-body .ln { display: block; white-space: pre; }
.term-body .cm { color: var(--mute); }
.term-body .pr { color: var(--pos); -webkit-user-select: none; user-select: none; }
.term-body .fl { color: var(--acc-bright); }
.term-body .ar { color: var(--lav); }
.term-body .out { color: var(--dim); }

/* code card */
.code-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-1); }
.code-bar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.code-bar .fname { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.code-bar .lang { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; }
.code-bar .tcopy { margin-left: auto; }
.code-body { margin: 0; padding: 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.8; overflow-x: auto; color: var(--text); }
.code-body .c-cm { color: var(--mute); }
.code-body .c-kw { color: var(--acc-bright); }
.code-body .c-fn { color: var(--lav); }
.code-body .c-nm { color: var(--pos); }
.code-body .c-st { color: var(--warn); }

/* source / license callout */
.os-callout {
  display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center;
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 24px 26px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(139,92,246,0.10), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
@media (max-width: 680px) { .os-callout { grid-template-columns: 1fr; } }
.os-callout .repo { display: flex; align-items: center; gap: 11px; }
.os-callout .repo svg { width: 22px; height: 22px; color: var(--text); flex: none; }
.os-callout .repo .rp { font-family: var(--mono); font-size: 14.5px; color: var(--text); white-space: nowrap; }
.os-callout .repo .rp b { color: var(--acc-bright); font-weight: 500; }
.os-callout .rmeta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 18px; font-family: var(--mono); font-size: 12px; color: var(--mute); }

/* mobile: shrink code so it fits, wrap long lines so nothing is cut off */
@media (max-width: 600px) {
  .term-body { font-size: 11px; line-height: 1.65; padding: 14px 14px 16px; }
  .term-body .ln { white-space: pre-wrap; overflow-wrap: anywhere; }
  .term-bar .ttitle { font-size: 10.5px; }
}
@media (max-width: 400px) {
  .term-body { font-size: 10px; }
}
.os-callout .rmeta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.os-callout .rmeta .dotc { width: 9px; height: 9px; border-radius: 50%; }
.os-actions { display: flex; gap: 10px; flex-wrap: wrap; }
