@font-face { font-family: Archivo; src: url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/geist-mono-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --void: #0a0714; --deep: #110b21; --panel: #17102c; --raise: #20173b;
  --line: #2c2250; --line-2: #3d3070;
  --text: #ede9ff; --muted: #9a91c4; --faint: #6a6192;
  --beam: #9d7bff; --beam-2: #7a55f0; --white: #f6f3ff;
  --up: #5ad7ff; --down: #ff5d7a; --ok: #6fe3b0;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --sans: Archivo, system-ui, sans-serif;
  --r: 14px; --gut: clamp(16px, 4vw, 40px); color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--void); }
body { margin: 0; font: 400 16px/1.5 var(--sans); color: var(--text); background: radial-gradient(1200px 600px at 50% -200px, #1d1240 0%, var(--void) 70%) no-repeat, var(--void); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gut) 72px; outline: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--white); color: #000; padding: 8px 12px; z-index: 99; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--up); outline-offset: 2px; border-radius: 6px; }
.mono, .num { font-family: var(--mono); font-feature-settings: 'tnum'; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.up { color: var(--up); } .down { color: var(--down); }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-stretch: 112%; font-size: clamp(2.2rem, 6.4vw, 4.6rem); line-height: 1; }
h2 { font-stretch: 108%; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.1; }
h3 { font-size: 1.05rem; }

/* header */
#top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; backdrop-filter: blur(14px); background: rgba(10, 7, 20, .72); border-bottom: 1px solid var(--line); }
.bar { max-width: 1180px; margin: 0 auto; padding: 12px var(--gut); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-stretch: 115%; font-size: 1.15rem; letter-spacing: -.02em; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { white-space: nowrap; text-decoration: none; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--text); } .nav a[aria-current] { color: var(--white); background: var(--raise); }
.bar .spacer { flex: 1; }
.bar .ico { display: grid; place-items: center; width: 38px; height: 38px; margin-left: -12px; border-radius: 10px; color: var(--muted); border: 1px solid var(--line); }
.bar .ico:hover { color: var(--white); border-color: var(--line-2); background: var(--raise); }
.bar .ico svg { width: 17px; height: 17px; }
@media (max-width: 720px) { .bar .ico { margin-left: 0; } }
@media (max-width: 560px) { .bar .ico.tg { display: none; } }
@media (max-width: 720px) { .bar { flex-wrap: wrap; gap: 10px; } .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; } }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--raise); padding: 10px 16px; border-radius: 12px; cursor: pointer; font-weight: 700; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { border-color: var(--beam); } .btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #a98cff, var(--beam-2)); border-color: #b9a2ff; color: #0b0618; box-shadow: 0 0 28px -6px rgba(157, 123, 255, .8); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { padding: 14px 22px; font-size: 1.05rem; border-radius: 14px; width: 100%; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: .88rem; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.field { display: grid; gap: 6px; }
.field > label, .lbl { font-size: .85rem; color: var(--muted); font-weight: 600; }
.in { width: 100%; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .15s; }
.in:focus { border-color: var(--beam); } textarea.in { resize: vertical; min-height: 84px; }
.hint { font-size: .82rem; color: var(--faint); } .hint.bad { color: var(--down); }
.panel { background: linear-gradient(180deg, var(--panel), var(--deep)); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.row { display: flex; align-items: center; gap: 12px; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--raise); border: 1px solid var(--line); font-size: .8rem; color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { white-space: nowrap; border: 0; background: none; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed=true] { background: var(--raise); color: var(--white); }
.seg.buy button[aria-pressed=true] { background: rgba(90, 215, 255, .16); color: var(--up); }
.seg.sell button[aria-pressed=true] { background: rgba(255, 93, 122, .16); color: var(--down); }

.emblem, .logo { border-radius: 12px; flex: none; display: block; object-fit: cover; background: var(--deep); }

/* hero */
.hero { position: relative; margin: 0 calc(var(--gut) * -1); padding: 56px var(--gut) 40px; min-height: 420px; display: grid; align-content: center; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero > *:not(canvas) { position: relative; z-index: 1; }
.hero h1 { max-width: 12ch; }
.hero p { max-width: 46ch; color: var(--muted); font-size: 1.1rem; margin: 18px 0 26px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn { width: auto; }
.facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 34px; color: var(--muted); font-size: .92rem; }
.facts b { display: block; font-family: var(--mono); font-weight: 400; color: var(--white); font-size: 1.3rem; }
@media (max-width: 720px) { .hero { min-height: 360px; padding-top: 36px; } .hero h1 { max-width: 9ch; } .hero canvas { opacity: .45; } .nav a { padding: 6px 10px; } .seg button { padding: 7px 10px; } .tools .in { max-width: none; } }

/* catalog */
.tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 28px 0 14px; }
.tools .in { max-width: 280px; }
.list { display: grid; }
.item { display: grid; grid-template-columns: 44px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.1fr) 56px; gap: 16px; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--line); text-decoration: none; border-radius: 12px; transition: background .12s; }
.item:hover { background: var(--panel); }
.item .nm b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .nm span { font-size: .85rem; color: var(--muted); }
.item .cell { font-family: var(--mono); font-size: .95rem; } .item .cell small { display: block; color: var(--faint); font-family: var(--sans); font-size: .75rem; }
.listhead { padding-block: 6px; font-size: .78rem; color: var(--faint); border-bottom: 1px solid var(--line); } .listhead:hover { background: none; }
.shift { height: 6px; border-radius: 4px; background: var(--deep); overflow: hidden; position: relative; }
.shift i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--beam-2), var(--up)); border-radius: 4px; }
@media (max-width: 720px) {
  .item { grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 10px; }
  .item .c4, .item .age { display: none; } .listhead { display: none; }
}
.empty { padding: 56px 16px; text-align: center; color: var(--muted); } .empty h3 { color: var(--text); margin-bottom: 6px; }
.ticker { display: flex; gap: 22px; overflow: hidden; white-space: nowrap; color: var(--muted); font-size: .85rem; padding: 10px 14px; border-bottom: 1px solid var(--line); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker a { text-decoration: none; } .ticker a b { color: var(--text); }

/* page layout */
.page { padding-top: 32px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
@media (max-width: 960px) { .two { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 18px 0; }
.stats > div { background: var(--deep); padding: 12px 14px; } .stats span { display: block; font-size: .78rem; color: var(--faint); } .stats b { font-family: var(--mono); font-weight: 400; font-size: 1.08rem; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.chart { width: 100%; height: 280px; display: block; }
.tokhead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tokhead h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.linkrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.addr { font-family: var(--mono); font-size: .82rem; color: var(--muted); cursor: pointer; background: none; border: 0; padding: 0; }
.addr:hover { color: var(--text); }

/* fee split: one tile per party, as wide as its share, with a worked example underneath */
.fsplit { display: grid; gap: 8px; }
.fs-tiles { display: grid; gap: 6px; }
.fs-tile { position: relative; display: grid; align-content: end; gap: 2px; min-height: 104px; padding: 16px 12px 12px; border-radius: 12px; background: var(--deep); border: 1px solid var(--line); overflow: hidden; }
.fs-tile::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.fs-tile::after { content: ''; position: absolute; inset: 0; background: var(--c); opacity: .07; pointer-events: none; }
.fs-tile.plat { --c: #8a80b8; } .fs-tile.cre { --c: var(--beam); } .fs-tile.hold { --c: var(--up); }
.fs-pct { font-family: var(--mono); font-size: 1.45rem; line-height: 1.1; color: var(--white); }
.fs-label { font-size: .82rem; font-weight: 700; color: var(--text); }
.fs-amt { font-family: var(--mono); font-size: .76rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* trades table */
table { width: 100%; border-collapse: collapse; font-size: .9rem; } th { text-align: left; font-weight: 600; color: var(--faint); font-size: .78rem; padding: 8px 6px; } td { padding: 8px 6px; border-top: 1px solid var(--line); font-family: var(--mono); } td:first-child, th:first-child { padding-left: 0; }
td a { text-decoration: none; color: var(--muted); } td a:hover { color: var(--text); }
.tablewrap { overflow-x: auto; }

/* form */
.form { display: grid; gap: 18px; }
.drop { display: flex; align-items: center; gap: 14px; border: 1px dashed var(--line-2); border-radius: 14px; padding: 14px; cursor: pointer; }
.drop:hover { border-color: var(--beam); } .drop img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.slider { width: 100%; accent-color: var(--beam); }
.quotes { display: flex; gap: 8px; flex-wrap: wrap; }
.summary { display: grid; gap: 8px; font-size: .92rem; } .summary div { display: flex; justify-content: space-between; gap: 12px; } .summary b { font-family: var(--mono); font-weight: 400; text-align: right; }
.notice { border: 1px solid var(--line-2); background: rgba(157, 123, 255, .08); border-radius: 12px; padding: 12px 14px; font-size: .9rem; color: var(--muted); }
.notice.bad { border-color: rgba(255, 93, 122, .5); background: rgba(255, 93, 122, .08); color: #ffc2cc; }
.prose { max-width: 66ch; color: var(--muted); } .prose h2 { color: var(--text); margin: 38px 0 10px; } .prose strong { color: var(--text); } .prose li { margin: 6px 0; }

/* modal + toast */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(5, 3, 12, .72); padding: 16px; }
.modal .box { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; padding: 22px; display: grid; gap: 12px; }
.wopt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--deep); cursor: pointer; font-weight: 700; width: 100%; }
.wopt:hover { border-color: var(--beam); } .wopt img { width: 28px; height: 28px; border-radius: 8px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--raise); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 12px; z-index: 60; transition: .2s; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.bad { border-color: var(--down); }
#foot { border-top: 1px solid var(--line); padding: 24px var(--gut); color: var(--faint); font-size: .85rem; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
#foot a { text-decoration: none; } #foot a:hover { color: var(--text); }
.skeleton { background: linear-gradient(90deg, var(--panel), var(--raise), var(--panel)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 10px; height: 52px; margin: 8px 0; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.previewbar { background: var(--raise); color: var(--muted); font-size: .82rem; text-align: center; padding: 6px var(--gut); border-bottom: 1px solid var(--line); }

/* official token badge */
.vbadge { display: inline-flex; vertical-align: middle; margin-left: 6px; color: #7dd3fc; }
.vbadge svg { width: 1.05em; height: 1.05em; }
