@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=DM+Mono:wght@400;500&family=Noto+Serif+SC:wght@500;600;700&family=Source+Sans+3:wght@400;500;600&display=swap");

:root {
  --ink: #110e08;
  --ink-2: #1a1510;
  --paper: #16120c;
  --surface: #1c1812;
  --neon: #ccff00;
  --neon-rgb: 204, 255, 0;
  --on-primary: #110e08;
  --white: #f6f3ea;
  --muted: #a39884;
  --faint: #6e6758;
  --line: #2c261c;
  --line-strong: #3d3426;
  --up: #8fe36a;
  --warn: #e3b35a;
  --clay: #d46a4a;
  --max-page: 1180px;
  --font-serif: "Noto Serif SC", "Cormorant Garamond", "Songti SC", serif;
  --font-sans: "Source Sans 3", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  color-scheme: dark;
}

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

html,
body {
  min-height: 100%;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body,
#app {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
#app {
  flex: 1;
}

html {
  scroll-behavior: smooth;
}

body {
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(var(--neon-rgb), 0.08), transparent 55%),
    radial-gradient(800px 500px at 0% 100%, rgba(var(--neon-rgb), 0.05), transparent 50%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--neon);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 50;
  background: var(--neon);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 4px;
}
.skip:focus {
  top: 12px;
}

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 22px;
  pointer-events: none;
  z-index: 20;
  background-image: url("/assets/rail.png");
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  mix-blend-mode: luminosity;
}
.rail-l {
  left: 0;
  border-right: 1px solid var(--line);
}
.rail-r {
  right: 0;
  border-left: 1px solid var(--line);
}

.seal-watermark {
  position: fixed;
  right: 48px;
  bottom: 40px;
  width: 180px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.wrap {
  width: min(var(--max-page), calc(100% - 2.5rem));
  margin-inline: auto;
}
@media (min-width: 1024px) {
  .wrap {
    width: min(var(--max-page), calc(100% - 7rem));
  }
}

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: 52ch;
}
.d1 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: clamp(42px, 7vw, 96px);
  line-height: 0.98;
  color: var(--white);
}
.d2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.d3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 40px);
  letter-spacing: -0.02em;
}
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--neon);
  color: var(--on-primary);
  border: 1px solid var(--neon);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: transform 0.2s var(--spring), box-shadow 0.25s, background 0.2s;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(var(--neon-rgb), 0.28);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-plain {
  background: transparent;
  color: var(--white);
  border-color: var(--line-strong);
}
.btn-plain:hover:not(:disabled) {
  background: var(--surface);
  box-shadow: none;
  border-color: var(--neon);
  color: var(--neon);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}
.arw {
  font-family: var(--font-serif);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
  transition: 0.2s var(--ease);
}
.chip:hover,
.chip[data-active="true"] {
  color: var(--ink);
  background: var(--neon);
  border-color: var(--neon);
}
.chip img {
  border-radius: 50%;
}

.field {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--white);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--font-mono);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(var(--neon-rgb), 0.18);
}
.field::placeholder {
  color: var(--faint);
}

.lnk {
  background-image: linear-gradient(var(--neon), var(--neon));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size 0.35s var(--ease);
}
.lnk:hover {
  background-size: 100% 1px;
  color: var(--neon);
}

header.site {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 14, 8, 0.86);
  backdrop-filter: blur(12px);
}
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(var(--neon-rgb), 0.35);
}
.nav-links {
  display: none;
  align-items: center;
  gap: 1.4rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--neon);
}
.nav-spacer {
  flex: 1;
}
.mobile-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 12px;
}
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .mobile-nav {
    display: none;
  }
}

main {
  position: relative;
  z-index: 1;
  flex: 1;
}

footer.site {
  margin-top: 6rem;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.foot-grid {
  display: grid;
  gap: 1.5rem;
  padding: 2.5rem 0 1.5rem;
}
@media (min-width: 640px) {
  .foot-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.foot-note {
  padding-bottom: 2rem;
  color: var(--faint);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: end;
  padding-top: 3.5rem;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    padding-top: 5rem;
  }
}
.hero-art {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper);
}
.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--neon);
  z-index: 2;
}
.hero-art::before {
  top: 8px;
  left: 8px;
  border-top: 1px solid;
  border-left: 1px solid;
}
.hero-art::after {
  right: 8px;
  bottom: 8px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}
.hero-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neon);
  text-shadow: 0 1px 8px #000;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-block: 1px solid var(--line);
  margin-top: 3rem;
}
.stats > div {
  padding: 1.2rem 1rem;
  border-left: 1px solid var(--line);
}
.stats > div:nth-child(odd) {
  border-left: 0;
}
@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .stats > div {
    border-left: 1px solid var(--line);
  }
  .stats > div:first-child {
    border-left: 0;
  }
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 3.5rem 0 1rem;
}

.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 800px;
}
.tbl th {
  text-align: left;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.tbl td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl tbody tr:hover {
  background: rgba(var(--neon-rgb), 0.04);
}
.tbl .r {
  text-align: right;
}
.tok {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tok-img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface);
}
.wliq {
  display: inline-block;
  width: 52px;
  height: 5px;
  margin-left: 8px;
  vertical-align: middle;
  background: rgba(246, 243, 234, 0.12);
  border-radius: 3px;
  overflow: hidden;
}
.wliq-fill {
  display: block;
  height: 100%;
  background: var(--neon);
  border-radius: 3px;
}

.steps {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
  margin-top: 1.5rem;
}
@media (min-width: 640px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}
.steps li {
  background: var(--paper);
  padding: 1.4rem;
  list-style: none;
}
.steps .seal-n {
  color: var(--neon);
}

.model-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 4px;
  padding: 1rem;
}
.grid-2 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.launch-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .launch-grid {
    grid-template-columns: minmax(0, 1fr) 20rem;
  }
}
.drop {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed var(--line-strong);
  color: var(--faint);
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  background: var(--surface);
}
.drop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.model-list {
  max-height: 20rem;
  overflow: auto;
  border-top: 1px solid var(--line);
}
.model-list button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.model-list button:hover,
.model-list button[data-active="true"] {
  background: rgba(var(--neon-rgb), 0.08);
}
.model-list button[data-active="true"] {
  outline: 1px solid var(--neon);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0;
}

.cards {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .cards {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem;
  min-height: 16rem;
}
.card .meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  font-size: 11px;
}
.card .meta div {
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 10px;
}

.chat-layout {
  display: grid;
  gap: 1rem;
  padding: 2rem 0;
}
@media (min-width: 1024px) {
  .chat-layout {
    grid-template-columns: 18rem minmax(0, 1fr);
  }
}
.thread {
  min-height: 22rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 1rem;
  max-height: 28rem;
  overflow: auto;
}
.bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
}
.bubble.user {
  align-self: flex-end;
  background: var(--neon);
  color: var(--ink);
}
.bubble.assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
}

.docs-layout {
  display: grid;
  gap: 2.5rem;
  padding: 2.5rem 0;
}
@media (min-width: 1024px) {
  .docs-layout {
    grid-template-columns: 14rem minmax(0, 1fr);
  }
}
.toc {
  position: sticky;
  top: 1.5rem;
}
.toc a {
  display: block;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 14px;
  border-radius: 4px;
}
.toc a:hover {
  color: var(--neon);
  background: var(--surface);
}
.prose {
  max-width: 70ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.prose h1,
.prose h2 {
  color: var(--white);
  font-family: var(--font-serif);
  font-weight: 600;
}
.prose h1 {
  font-size: 2rem;
}
.prose h2 {
  font-size: 1.35rem;
  margin-top: 0.2rem;
}
.prose section {
  margin-top: 2.4rem;
}
.prose code,
.prose pre {
  font-family: var(--font-mono);
  font-size: 12px;
}
.prose pre {
  background: var(--surface);
  color: var(--neon);
  padding: 12px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  margin: 0.6rem 0;
}
.prose a {
  color: var(--neon);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.grades {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 1.5rem;
}
@media (min-width: 640px) {
  .grades {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .grades {
    grid-template-columns: repeat(6, 1fr);
  }
}
.grades a {
  background: var(--paper);
  padding: 1rem;
}
.grades a:hover {
  background: var(--surface);
}
.finding {
  display: grid;
  gap: 8px;
  padding: 1.1rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) {
  .finding {
    grid-template-columns: 7rem minmax(0, 1fr);
  }
}
.badge {
  display: inline-flex;
  width: fit-content;
  height: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.badge-pass {
  background: #1d2a14;
  color: var(--up);
}
.badge-med {
  background: #2a2414;
  color: var(--warn);
}
.badge-high {
  background: #2a1610;
  color: var(--clay);
}
.badge-low {
  background: var(--surface);
  color: var(--muted);
}

.token-grid {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 0;
}
@media (min-width: 1024px) {
  .token-grid {
    grid-template-columns: minmax(0, 1fr) 22rem;
  }
}
.trade-side-buy {
  color: var(--up);
}
.trade-side-sell {
  color: var(--clay);
}

.page {
  padding: 2.4rem 0 1rem;
}

.quickstart pre {
  background: var(--ink);
  color: var(--neon);
  border: 1px solid var(--line);
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
}

.zh {
  font-family: var(--font-serif);
  letter-spacing: 0.2em;
  color: var(--neon);
  font-size: 12px;
}

.error {
  text-align: center;
  padding: 6rem 1rem;
}

.hero-art video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.onboard-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 6, 3, 0.62);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.onboard-scrim[hidden] {
  display: none;
}
.onboard {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  display: flex;
  align-items: stretch;
  border: 1px solid var(--neon);
  background: var(--ink);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.onboard-media {
  position: relative;
  flex: 1 1 auto;
  width: 0;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 40px);
  background: #000;
}
.onboard-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  display: block;
}
.onboard-copy {
  flex: 0 0 min(24rem, 40%);
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
  min-height: 0;
  max-height: calc(100vh - 40px);
  border-left: 1px solid var(--line);
}
.onboard-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.onboard-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}
.onboard-close:hover {
  color: var(--neon);
  border-color: var(--neon);
}
.onboard h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.onboard-steps {
  list-style: none;
  display: grid;
  gap: 16px;
}
.onboard-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
}
.onboard-n {
  width: 28px;
  height: 28px;
  border: 1px solid var(--neon);
  color: var(--neon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
}
.onboard-steps h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
}
.onboard-steps p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}
.onboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.onboard-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon);
}
@media (max-width: 860px) {
  .onboard {
    grid-template-columns: 1fr;
    height: auto;
    max-height: calc(100vh - 24px);
  }
  .onboard-media {
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: 42vh;
  }
  .onboard-copy {
    border-left: 0;
    border-top: 1px solid var(--line);
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
