/* SPRAT — site.css
 *
 * Surface division (tools/contrast.mjs re-checks it on painted pixels):
 *   ground  : Stanislav Stelmakhovich, "Underwater view of the sardine run…" (2026, CC0), fixed, full bleed. Never carries type.
 *   .glass  : the frosted silver sheet. Nav, display type, chips, small labels.
 *   .card   : the dense silver card. Prose, forms, tables, numbers.
 *   .deep   : the abyss-navy slab. Buttons, toasts, the trade ticket's header.
 * Every word sits on one of those. Colours are tokens; no chromatic literal below :root.
 */
:root {
  --ink: #0b1d2e;
  --ink-2: #1d3247;
  --muted: #3e5365;
  --line: rgba(11, 29, 46, .12);
  --line-2: rgba(11, 29, 46, .2);
  --wash: rgba(11, 29, 46, .055);
  --wash-2: rgba(11, 29, 46, .1);
  /* the shoal: silver, and the light coming down through it */
  --silver: #eef4f8;
  --silver-2: #dde8ef;
  --glass: rgba(230, 240, 246, .8);
  --glass-2: rgba(232, 241, 247, .9);
  --card: rgba(244, 248, 251, .95);
  --row: rgba(230, 239, 245, .7);
  /* the water below the shoal */
  --abyss: #0a2236;
  --abyss-2: #123552;
  --abyss-ink: #eef4f8;
  --sea: #1f5a86;
  --sea-tint: rgba(31, 90, 134, .12);
  /* the lure: the one warm thing in a blue picture */
  --coral: #ff7a59;
  --coral-hover: #ff9273;
  --coral-ink: #9a2d12;
  --coral-tint: rgba(255, 122, 89, .16);
  --up: #0b6b47;
  --up-tint: rgba(11, 107, 71, .12);
  --down: #a3271c;
  --down-tint: rgba(163, 39, 28, .1);
  --warn-ink: #7a4b00;
  --warn-tint: rgba(232, 160, 32, .18);
  --shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 22px 60px -26px rgba(2, 12, 24, .7);
  --r: 20px;
  --r-sm: 12px;
  --maxw: 1180px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 15px/1.55 var(--sans);
  background: var(--abyss); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: var(--abyss) url("../img/ground-1440.jpg") 40% 30% / cover no-repeat;
}
@media (min-width: 1600px) { body::before { background-image: url("../img/ground-2400.jpg"); } }
@media (max-width: 760px) { body::before { background-image: url("../img/ground-m900.jpg"); background-position: 50% 30%; } }

a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .9em; }
::selection { background: var(--coral); color: var(--ink); }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; }

/* ------------------------------------------------------------------ surfaces */
.glass { background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .5); border-radius: var(--r); box-shadow: var(--shadow); }
.card { background: var(--card); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .65); border-radius: var(--r); box-shadow: var(--shadow); }
.deep { background: var(--abyss); color: var(--abyss-ink); border-radius: var(--r); }
.pad { padding: 22px; }
.pad-lg { padding: 34px; }
@media (max-width: 760px) { .pad-lg { padding: 22px; } .pad { padding: 16px; } }

/* ------------------------------------------------------------------ nav */
.top { position: sticky; top: 12px; z-index: 30; margin-top: 12px; }
.top .bar { display: flex; align-items: center; gap: 16px; padding: 8px 10px 8px 14px; background: var(--glass-2); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand b { font: 600 25px/1 var(--serif); letter-spacing: .02em; font-variation-settings: "opsz" 72; }
.nav-links { display: flex; gap: 2px; margin-left: 6px; }
.nav-links a { text-decoration: none; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.nav-links a:hover { background: var(--wash); }
.nav-links a[aria-current="page"] { background: var(--abyss); color: var(--abyss-ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--wash); font: 500 12.5px/1 var(--mono); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); display: inline-block; }
.menu-btn { display: none; border: 0; background: var(--wash); width: 38px; height: 38px; border-radius: 12px; cursor: pointer; place-items: center; }
.only-sm { display: none !important; }
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; padding: 10px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
  .only-sm { display: block !important; }
  .menu-btn { display: grid; }
  .nav-right .hide-sm { display: none; }
}

/* ------------------------------------------------------------------ type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; font-variation-settings: "opsz" 96; }
h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.02; }
h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; }
h3 { font-size: 21px; line-height: 1.2; font-variation-settings: "opsz" 36; }
p { margin: 0 0 12px; }
.lede { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.eyebrow { font: 700 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sea); margin: 0 0 12px; display: block; }
.small { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.big { font: 600 34px/1.05 var(--mono); letter-spacing: -.02em; }
.up { color: var(--up); } .down { color: var(--down); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
a.link { color: var(--sea); text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; }

/* ------------------------------------------------------------------ buttons + forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  padding: 12px 20px; border-radius: 999px; font: 700 15px/1 var(--sans); background: var(--coral); color: var(--ink); transition: background .15s, transform .15s; white-space: nowrap; }
.btn:hover { background: var(--coral-hover); }
.btn:active { transform: translateY(1px); }
.btn.dark { background: var(--abyss); color: var(--abyss-ink); }
.btn.dark:hover { background: var(--abyss-2); }
.btn.ghost { background: var(--wash); color: var(--ink); }
.btn.ghost:hover { background: var(--wash-2); }
.btn.sm { padding: 9px 14px; font-size: 13.5px; }
.btn.xs { padding: 6px 10px; font-size: 12.5px; }
.btn.wide { width: 100%; padding: 15px 20px; font-size: 16px; }
.btn[disabled], .btn.busy { opacity: .55; cursor: not-allowed; }
.btn.busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
label.f { display: block; font-weight: 700; font-size: 13px; margin: 0 0 6px; color: var(--ink-2); }
.input { width: 100%; border: 1px solid var(--line-2); background: var(--silver); border-radius: var(--r-sm); padding: 12px 14px; font-size: 15px; outline: none; }
.input:focus { border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-tint); }
textarea.input { min-height: 84px; resize: vertical; }
.input.num { font: 500 20px/1.2 var(--mono); }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrapr { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.seg { display: inline-flex; background: var(--wash); padding: 4px; border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--abyss); color: var(--abyss-ink); }
.seg.buy button[aria-pressed="true"][data-side="buy"] { background: var(--up); color: var(--silver); }
.seg button[aria-pressed="true"][data-side="sell"] { background: var(--down); color: var(--silver); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { border: 1px solid var(--line-2); background: var(--silver); border-radius: 999px; padding: 6px 11px; font: 600 12.5px/1 var(--sans); cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--sea); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font: 700 11.5px/1.2 var(--sans); background: var(--wash); color: var(--ink-2); white-space: nowrap; }
.tag.curve { background: var(--sea-tint); color: var(--sea); }
.tag.pool { background: var(--up-tint); color: var(--up); }
.tag.warn { background: var(--warn-tint); color: var(--warn-ink); }
.tag.dead { background: var(--down-tint); color: var(--down); }

/* ------------------------------------------------------------------ home */
.hero { min-height: calc(100vh - 90px); display: grid; grid-template-columns: 1fr minmax(0, 520px); align-items: end; padding: 40px 0 34px; }
.hero .placard { grid-column: 2; }
.hero .placard h1 { margin-bottom: 16px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 46vh; } .hero .placard { grid-column: 1; } }
.lookup { margin-top: 18px; padding: 14px; }
.lookup .row { gap: 8px; }
.lookup-out { margin-top: 12px; display: none; }
.lookup-out.on { display: block; }
.coinline { display: flex; align-items: center; gap: 12px; }
.coinline img, .coinline .ph { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--silver-2); flex: none; }
.coinline .ph { display: grid; place-items: center; font: 700 15px/1 var(--serif); color: var(--sea); }
.coinline b { font-size: 16px; }
section.band { padding: 26px 0; }
.sec-head { padding: 22px 26px; margin-bottom: 14px; max-width: 760px; }
.sec-head p { margin: 10px 0 0; color: var(--ink-2); font-size: 16.5px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } }
.feature h3 { margin: 10px 0 8px; }
.feature p { color: var(--ink-2); margin: 0; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--abyss); color: var(--silver); }
.feature .ico svg { width: 22px; height: 22px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; padding-left: 46px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--coral); color: var(--ink); display: grid; place-items: center; font: 700 15px/1 var(--mono); }
.stat { padding: 18px 20px; }
.stat .k { font: 700 11.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat .v { font: 600 28px/1.15 var(--mono); margin-top: 8px; letter-spacing: -.02em; }
.stat .s { margin-top: 6px; font-size: 13px; color: var(--muted); }
details.qa { border-top: 1px solid var(--line); padding: 14px 0; }
details.qa:first-of-type { border-top: 0; }
details.qa summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.qa summary::after { content: "+"; font: 500 20px/1 var(--mono); color: var(--sea); }
details.qa[open] summary::after { content: "−"; }
details.qa p { margin: 10px 0 0; color: var(--ink-2); }

a.bcard { display: block; transition: transform .15s; }
a.bcard:hover { transform: translateY(-2px); }
a.bcard .tok b { max-width: 13ch; }

/* ------------------------------------------------------------------ desk */
.desk { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; align-items: start; margin-top: 18px; }
@media (max-width: 1060px) { .desk { grid-template-columns: 1fr; } }
.sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 6px; }
.sum > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.sum > div:last-child { border-right: 0; }
@media (max-width: 760px) { .sum { grid-template-columns: 1fr 1fr; } .sum > div:nth-child(2) { border-right: 0; } .sum > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
table.t { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
table.t th { text-align: left; font: 700 11.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 10px; }
table.t td { padding: 10px; background: var(--row); vertical-align: middle; }
table.t tr td:first-child { border-radius: 12px 0 0 12px; }
table.t tr td:last-child { border-radius: 0 12px 12px 0; }
table.t tr:nth-child(even) td { background: rgba(244, 248, 251, .88); }
table.t td.r, table.t th.r { text-align: right; }
table.t tr.sel td { box-shadow: inset 0 0 0 9999px var(--coral-tint); }
table.t tbody tr { cursor: pointer; }
.tok { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tok img, .tok .ph { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex: none; background: var(--silver-2); }
.tok .ph { display: grid; place-items: center; font: 700 13px/1 var(--serif); color: var(--sea); }
.tok b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16ch; }
.tok span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.bar-p { height: 6px; border-radius: 6px; background: var(--wash-2); overflow: hidden; min-width: 60px; }
.bar-p i { display: block; height: 100%; background: var(--sea); border-radius: 6px; }
.ticket { position: sticky; top: 86px; }
.ticket .head { padding: 18px 20px; border-radius: var(--r) var(--r) 0 0; }
.ticket .body { padding: 18px 20px 20px; }
.quote { background: var(--wash); border-radius: var(--r-sm); padding: 12px 14px; margin: 12px 0; font-size: 14px; }
.quote .ln { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.quote .ln span:last-child { font-family: var(--mono); text-align: right; }
.quote .ln.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 700; }
.note { padding: 12px 14px; border-radius: var(--r-sm); background: var(--sea-tint); color: var(--ink-2); font-size: 13.5px; }
.note.warn { background: var(--warn-tint); color: var(--warn-ink); }
.note.bad { background: var(--down-tint); color: var(--down); }
.note.good { background: var(--up-tint); color: var(--up); }
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state h3 { margin-bottom: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 14px 16px; }
.walletbox { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.wbtn { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--silver); cursor: pointer; font-weight: 700; }
.wbtn img { width: 26px; height: 26px; border-radius: 6px; }

/* ------------------------------------------------------------------ coin page */
.coinhead { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.coinhead img, .coinhead .ph { width: 76px; height: 76px; border-radius: 18px; object-fit: cover; background: var(--silver-2); flex: none; }
.coinhead .ph { display: grid; place-items: center; font: 700 26px/1 var(--serif); color: var(--sea); }
.coinhead h1 { font-size: clamp(30px, 4vw, 44px); }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.kv > div { background: var(--wash); border-radius: var(--r-sm); padding: 12px 14px; }
.kv .k { font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kv .v { font: 600 17px/1.2 var(--mono); margin-top: 6px; }
@media (max-width: 760px) { .kv { grid-template-columns: 1fr 1fr; } }
.progress { margin-top: 16px; }
.progress .bar-p { height: 10px; margin-top: 8px; }
.progress .bar-p i { background: linear-gradient(90deg, var(--sea), var(--coral)); }
.addr { font: 500 12.5px/1.3 var(--mono); word-break: break-all; }
.copy { border: 0; background: var(--wash); border-radius: 8px; padding: 4px 8px; cursor: pointer; font: 600 12px/1 var(--sans); }

/* ------------------------------------------------------------------ launch */
.drop { border: 2px dashed var(--line-2); border-radius: var(--r); padding: 18px; display: flex; gap: 16px; align-items: center; cursor: pointer; background: var(--silver); }
.drop:hover, .drop.over { border-color: var(--sea); }
.drop img, .drop .ph { width: 88px; height: 88px; border-radius: 16px; object-fit: cover; background: var(--silver-2); flex: none; }
.drop .ph { display: grid; place-items: center; color: var(--sea); }
.preview-card { padding: 18px; }

/* ------------------------------------------------------------------ docs */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 18px; }
.doc nav { position: sticky; top: 86px; padding: 16px; }
.doc nav a { display: block; text-decoration: none; padding: 7px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.doc nav a:hover { background: var(--wash); }
.doc article { padding: 30px 34px; }
.doc article h2 { margin: 30px 0 12px; font-size: 28px; }
.doc article h2:first-child { margin-top: 0; }
.doc article h3 { margin: 22px 0 8px; }
.doc article p, .doc article li { color: var(--ink-2); font-size: 15.5px; }
.doc article code { background: var(--wash); padding: 1px 6px; border-radius: 6px; }
.doc table.plain { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0 16px; }
.doc table.plain th, .doc table.plain td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc table.plain th { font: 700 11.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } .doc nav { position: static; } .doc article { padding: 22px; } }

/* ------------------------------------------------------------------ toasts + modal */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--abyss); color: var(--abyss-ink); border-radius: 14px; padding: 12px 14px; font-size: 14px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; }
.toast a { color: var(--abyss-ink); font-weight: 700; }
.toast.bad { border-left: 4px solid var(--coral); }
.toast.good { border-left: 4px solid var(--up); }
.modal-bg { position: fixed; inset: 0; background: rgba(4, 14, 24, .55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { width: min(460px, 100%); padding: 24px; }
.modal h3 { margin-bottom: 6px; }

/* ------------------------------------------------------------------ footer */
.foot { margin: 40px 0 18px; display: grid; gap: 10px; }
.foot .inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 20px; padding: 26px; }
.foot h5 { margin: 0 0 10px; font: 700 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot ul a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.foot ul a:hover { text-decoration: underline; }
.foot .legal { padding: 12px 18px; font-size: 12.5px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .foot .inner { grid-template-columns: 1fr 1fr; } .foot .inner > div:first-child { grid-column: 1 / -1; } }
.spacer { height: 18px; }
