@font-face { font-family: "Inter Tight"; src: url(/fonts/intertight.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(/fonts/instrument.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/fonts/plexmono.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #0A1222; --panel: #111C33; --panel-2: #16233F; --line: #22314F; --line-2: #33456B;
  --usdc: #2775CA; --usdc-hi: #6AA8F0; --mint: #5EEAD4; --gold: #E8B85C; --cream: #F3EEE3; --muted: #A9B4C8; --dim: #8492AB;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --wrap: 1280px; --gut: 40px; --r: 14px;
  --display: "Inter Tight", "Arial Black", system-ui, sans-serif;
  --sans: "Instrument", "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 18px/1.55 var(--sans); font-variant-numeric: tabular-nums; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--usdc-hi); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--mono); font-weight: 500; font-size: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
b, strong { font-weight: 700; }
.muted { color: var(--muted); }
.blue { color: var(--usdc-hi); } .mint { color: var(--mint); } .gold { color: var(--gold); }

/* ---------- type ---------- */
.name { font: 800 clamp(64px, 8.4vw, 136px)/0.9 var(--display); letter-spacing: -0.035em; margin: 0; color: var(--cream); }
.lead { font: 500 clamp(20px, 1.7vw, 26px)/1.35 var(--sans); margin: 0; max-width: 30em; }
.h2 { font: 800 clamp(32px, 3.4vw, 48px)/1.04 var(--display); letter-spacing: -0.02em; margin: 0; }
.h3 { font: 800 24px/1.15 var(--display); letter-spacing: -0.01em; margin: 0; }
.big { font: 800 clamp(28px, 2.6vw, 40px)/1 var(--display); letter-spacing: -0.02em; }
.label { font: 600 16px/1.3 var(--sans); color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 1.4em; border-radius: 12px;
  border: 1.5px solid var(--line-2); background: transparent; color: var(--cream); font: 700 18px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s; white-space: nowrap; }
.btn:hover { border-color: var(--usdc-hi); color: var(--cream); background: rgba(39, 117, 202, .12); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--usdc); border-color: var(--usdc); color: #fff; }
.btn.primary:hover { background: #3184DD; border-color: #3184DD; }
.btn.danger { border-color: var(--gold); color: var(--gold); }
.btn.danger:hover { background: rgba(232, 184, 92, .12); color: var(--cream); }
.btn.small { min-height: 44px; font-size: 16px; padding: 0 1.1em; }
.btn[disabled], .btn[aria-disabled="true"] { background: transparent; border-color: var(--line); color: var(--dim); cursor: not-allowed; transform: none; }
.btn.primary[disabled] { background: #1B355A; border-color: #1B355A; color: #A9B9D2; }
.btn img { width: 20px; height: 20px; object-fit: contain; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 20px; border-radius: 999px; font: 600 16px/1 var(--sans); border: 1.5px solid; white-space: nowrap; }
.chip.rehearsal { border-color: var(--mint); color: var(--mint); }
.chip.live { border-color: var(--usdc-hi); color: var(--usdc-hi); }
.chip.gold { border-color: var(--gold); color: var(--gold); }

/* ---------- header ---------- */
.top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 76px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; font: 800 26px/1 var(--display); letter-spacing: -0.02em; }
.wordmark img { width: 36px; height: 36px; border-radius: 8px; }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; color: var(--muted); text-decoration: none; font: 600 17px/1 var(--sans); border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--cream); }
.nav a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--usdc); }
.navd { display: none; position: relative; }
.navd summary { list-style: none; cursor: pointer; }
.navd summary::-webkit-details-marker { display: none; }
.navd[open] .nav { position: absolute; right: 0; top: calc(100% + 8px); flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px; min-width: 200px; z-index: 40; }
.navd[open] .nav a { min-height: 48px; padding: 0 16px; border-bottom: 0; }

/* ---------- first screen ---------- */
.first { position: relative; min-height: calc(100svh - 76px); display: flex; flex-direction: column; }
.hero { position: relative; flex: 1; display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); min-height: 560px; overflow: hidden; }
.stage { position: absolute; left: 0; top: 50%; width: 100%; aspect-ratio: 16 / 9; transform: translateY(-55%); }
.stage > img.scene, .stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .col { min-width: 0; position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: var(--s4) 0 var(--s4) max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut))); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.badge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.badge .hint { color: var(--muted); font-size: 16px; }
.onstage { position: absolute; z-index: 2; transform: translate(-50%, -50%); pointer-events: none; }
.level { text-align: center; }
.level .v { font: 800 clamp(30px, 3.2vw, 52px)/1 var(--display); letter-spacing: -0.02em; text-shadow: 0 2px 16px rgba(10, 18, 34, .9); white-space: nowrap; }
.level .l { font: 600 16px/1.3 var(--sans); color: var(--muted); margin-top: 6px; white-space: nowrap; }
.goals { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 8px; transform: translateY(-50%); pointer-events: none; }
.goal { font: 600 16px/1.25 var(--sans); color: var(--dim); white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.goal::before { content: ""; width: 18px; height: 2px; background: currentColor; flex: none; }
.goal.next { color: var(--gold); font-weight: 700; }
.goal.hit { color: var(--ink); background: var(--gold); padding: 6px 14px; border-radius: 6px; }
.tag { position: absolute; z-index: 2; transform: translate(-50%, -130%); pointer-events: none; font: 600 16px/1 var(--sans); color: var(--mint); background: rgba(10, 18, 34, .88); border: 1px solid var(--line-2); padding: 9px 16px; border-radius: 8px; white-space: nowrap; transition: opacity .4s; }
.tag.grey { color: var(--muted); }
.receipt { position: absolute; z-index: 3; transform: translate(-50%, 0); background: var(--gold); color: var(--ink); border-radius: 8px; padding: 12px 18px; font: 700 16px/1.3 var(--sans); white-space: nowrap; box-shadow: 0 8px 30px rgba(232, 184, 92, .35); }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 16px; font-size: 16px; max-width: 320px; color: var(--cream); }

/* contract + links */
.ca { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 6px 6px 24px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; max-width: 560px; }
.ca .val { flex: 1; min-width: 0; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.ca .val.wait { font-family: var(--sans); color: var(--muted); }
.links { display: flex; gap: 10px; flex-wrap: wrap; }

/* the numbers row */
.stats { position: relative; z-index: 3; border-top: 1px solid var(--line); background: rgba(10, 18, 34, .92); }
.stats .wrap { display: grid; grid-template-columns: repeat(5, 1fr); column-gap: 32px; }
.stats .s { padding: 22px 0; display: flex; flex-direction: column; gap: 6px; }

/* ---------- sections ---------- */
section.block { padding: var(--s7) 0 0; }
main > section.block:last-child { padding-bottom: var(--s7); }
.head { display: flex; flex-direction: column; gap: 12px; margin-bottom: var(--s5); max-width: 800px; }
.head p { margin: 0; color: var(--muted); font-size: 19px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); }
.flow .st { position: relative; padding: var(--s3) var(--s3) var(--s3) 0; display: flex; flex-direction: column; gap: 12px; }
.flow .st + .st { padding-left: var(--s3); border-left: 1px solid var(--line); }
.flow .n { font: 800 16px/1 var(--display); color: var(--usdc-hi); letter-spacing: .04em; }
.flow .st p { margin: 0; color: var(--muted); font-size: 17px; }
.flow .bar { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--mint), var(--usdc)); }
.flow .st:last-child .bar { background: linear-gradient(90deg, var(--usdc), var(--gold)); }

.ledger { width: 100%; border-collapse: collapse; font-size: 17px; }
.ledger th { text-align: left; font: 600 16px/1.3 var(--sans); color: var(--muted); padding: 12px 22px; border-bottom: 1px solid var(--line-2); }
.ledger td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ledger .num { text-align: right; }
.ledger tr:last-child td { border-bottom: 0; }
.panel > .ledger { margin: 0 -20px; width: calc(100% + 40px); }
.kind { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.kind::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--usdc); flex: none; }
.kind.k-spend::before, .kind.k-burn::before { background: var(--gold); }
.addr { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.addr .mono { white-space: nowrap; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.addr .mono.open { white-space: normal; word-break: break-all; }
.addr button { border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 8px; min-height: 40px; padding: 0 16px; font: 600 16px/1 var(--sans); cursor: pointer; flex: none; }
.addr button:hover { color: var(--cream); border-color: var(--usdc-hi); }
.addr a { font-size: 16px; flex: none; }
.empty { padding: var(--s3) 20px; color: var(--muted); }

.calc { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--s5); align-items: start; }
.field { display: flex; flex-direction: column; gap: 8px; }
.fields { display: flex; flex-direction: column; gap: var(--s2); }
.field input, .field select, .search input { min-height: 54px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--ink); padding: 0 18px; font: 600 19px/1 var(--sans); color: var(--cream); width: 100%; }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: var(--s3); }
.split > div { background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 18px 28px; display: flex; flex-direction: column; gap: 6px; }
.split .big { font-size: 28px; }
.formula { font-size: 16px; color: var(--muted); margin: var(--s3) 0 0; }
.formula b { color: var(--cream); }

/* dialog */
dialog { border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); color: var(--cream); padding: 0; width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(5, 9, 18, .7); }
.dlg { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); max-height: calc(100svh - 64px); overflow: auto; }
.dlg .x { position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--cream); font: 700 20px/1 var(--sans); cursor: pointer; }
.limits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.limits button { min-height: 54px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--ink); font: 700 19px/1 var(--sans); cursor: pointer; color: var(--cream); }
.limits button[aria-pressed="true"] { background: var(--usdc); border-color: var(--usdc); }
.limits input { min-height: 54px; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 12px; font: 700 19px/1 var(--sans); width: 100%; background: var(--ink); color: var(--cream); }
.warn { border: 1px solid var(--gold); border-radius: 12px; padding: var(--s2) var(--s3); font-size: 16px; }
.warn p { margin: 0 0 6px; } .warn p:last-child { margin: 0; }
.sign { background: var(--ink); border-radius: 12px; padding: var(--s2) var(--s3); font-size: 16px; }
.sign ol { margin: 6px 0 0; padding-left: 22px; }
.walletlist { display: flex; flex-direction: column; gap: 10px; }
.walletlist img { width: 24px; height: 24px; border-radius: 6px; }
.msg { font-size: 16px; margin: 0; min-height: 1.5em; }
.msg.err { color: var(--gold); font-weight: 600; }
.hint { font-size: 16px; color: var(--muted); margin: 0; }

/* inner pages: a short head, no picture */
.pagehead { padding: var(--s5) 0 var(--s4); display: flex; flex-direction: column; gap: 14px; }
.pagehead .h2 { font-size: clamp(40px, 4.6vw, 64px); }
.pagehead p { margin: 0; color: var(--muted); max-width: 46em; }
.search { display: flex; gap: 12px; max-width: 760px; }
.search input { flex: 1; min-width: 0; font: 500 17px/1 var(--mono); min-height: 54px; }
.check { display: grid; grid-template-columns: 40px 200px 1fr; gap: 16px; align-items: center; padding: 14px 0; }
.tick { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 17px/1 var(--sans); }
.tick { font-size: 26px; }
.tick.y { color: var(--mint); }
.tick.n { color: var(--dim); }
.verdict { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s5); align-items: start; }
.coinhead { display: flex; gap: 16px; align-items: center; margin-bottom: var(--s2); flex-wrap: wrap; }
.coinhead img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--panel-2); }
.jars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.jarcard { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--cream); }
.jarcard:hover { border-color: var(--usdc-hi); color: var(--cream); }
.meter { height: 8px; border-radius: 999px; background: var(--ink); overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--usdc), var(--mint)); }
.minegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin: var(--s3) 0; }
.minegrid > div { display: flex; flex-direction: column; gap: 6px; }
.bigacts { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.bigacts .btn { min-height: 60px; font-size: 19px; }
.receipts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
.rc { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--r); padding: var(--s4); display: flex; flex-direction: column; gap: 14px; }
.rc .row { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.docs { display: grid; grid-template-columns: 240px 1fr; gap: var(--s6); align-items: start; padding-top: var(--s4); padding-bottom: var(--s7); }
.docs nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.docs nav a { padding: 10px 16px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 17px; }
.docs nav a:hover { background: var(--panel); color: var(--cream); }
.docs article { max-width: 780px; }
.docs article h2 { font: 800 32px/1.1 var(--display); letter-spacing: -0.01em; margin: var(--s6) 0 var(--s2); }
.docs article p, .docs article li { font-size: 18px; color: #DCE2EC; }
.docs code { font-family: var(--mono); font-size: 16px; color: var(--mint); }
.risk { border: 1px solid var(--gold); border-radius: var(--r); padding: var(--s4); background: rgba(232, 184, 92, .05); }
.risk h2 { margin-top: 0 !important; color: var(--gold); }
.lost { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s5); align-items: center; min-height: calc(100svh - 76px); padding: var(--s4) 0; }
.lost img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); }

/* ---------- narrower ---------- */
@media (max-width: 1180px) {
  .stats .wrap { grid-template-columns: repeat(3, 1fr); }
  .stats .s { padding: 16px 0; }
}
@media (max-width: 960px) {
  :root { --gut: 24px; }
  .first { min-height: 0; }
  .hero { display: flex; flex-direction: column; min-height: 0; }
  .hero .col { order: 2; min-width: 0; }
  .hero .col > .name { order: 1; } .hero .col > .lead { order: 2; } .hero .col > .actions { order: 3; } .hero .col > .badge { order: 4; } .hero .col > #cbar, .hero .col > #k-bar { order: 5; }
  .level .v { font-size: 28px; }
  .chip { white-space: normal; min-height: 40px; height: auto; padding: 8px 20px; line-height: 1.3; }
  .stage { position: relative; top: auto; transform: none; width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 74svh; margin: 0 auto; max-width: 620px; }
  .hero .col { padding: var(--s4) var(--gut); }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow .st:nth-child(3) { padding-left: 0; border-left: 0; }
  .flow .st:nth-child(odd) { padding-left: 0; }
  .calc, .verdict, .docs, .lost, .receipts { grid-template-columns: 1fr; }
  .lost { min-height: 0; padding: var(--s5) 0; }
  .goal.small { padding-left: 0; }
  .jars, .minegrid { grid-template-columns: 1fr 1fr; }
  .docs nav { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 680px) {
  :root { --gut: 16px; --s7: 64px; }
  body { font-size: 17px; }
  .nav.wide { display: none; }
  .navd { display: block; }
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .stats .s:first-child { grid-column: 1 / -1; }
  .flow, .jars, .minegrid, .split { grid-template-columns: 1fr; }
  .flow .st { padding-left: 0 !important; border-left: 0 !important; }
  .stats { background: none; border-top: 0; }
  #mv tr { display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--line); padding: 8px 0; }
  #mv thead tr { display: none; }
  #mv td { border: 0; padding: 4px 16px; }
  #mv td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  #mv td.empty { grid-column: 1 / -1; }
  .limits { grid-template-columns: 1fr 1fr; }
  #c-pulled { font-size: 32px !important; }
  .panel > .ledger { margin: 0 -20px; width: calc(100% + 40px); }
  .ledger { font-size: 16px; }
  .ledger th, .ledger td { padding: 12px 20px; }
  .ledger .hide-s { display: none; }
  .search { flex-direction: column; }
  .check { grid-template-columns: 40px 1fr; }
  .check > :last-child { grid-column: 2; }
  .split .big { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Mine: the top-up form */
.topup { display: flex; flex-direction: column; gap: 12px; margin-top: var(--s4); }
.money { display: inline-flex; align-items: center; height: 52px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--ink); padding: 0 20px; gap: 6px; }
.money:focus-within { border-color: var(--mint); }
.money span { font: 700 19px/1 var(--sans); color: var(--muted); }
.money input { width: 110px; height: 48px; border: 0; background: transparent; color: var(--cream); font: 700 19px/1 var(--sans); outline: none; padding: 0; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.topup .bigacts .btn { min-height: 52px; height: 52px; }
.confirm { border: 1px solid var(--gold); border-radius: 12px; padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.confirm[hidden] { display: none; }
.confirm p { margin: 0; }
.chip.small { min-height: 38px; padding: 0 18px; font-size: 16px; border-width: 1px; color: var(--muted); border-color: var(--line-2); }
.search input::placeholder { font-family: var(--sans); font-weight: 500; color: var(--dim); }
@media (max-width: 680px) { .money { flex: 1 1 100%; } .money input { flex: 1; width: auto; } .topup .bigacts .btn { flex: 1 1 auto; } }

[hidden] { display: none !important; }

/* the wall's scale and the ladder */
.level .p { font: 600 16px/1.3 var(--sans); color: var(--mint); margin-top: 8px; }
.ticks .tickv { position: absolute; z-index: 2; transform: translate(10px, -50%); font: 600 16px/1 var(--sans); color: var(--dim); pointer-events: none; white-space: nowrap; }
.ticks .tickv.on { color: var(--muted); }
.goal { color: var(--dim); }
.goal::before { display: none; }
.goal .gn { font: 800 16px/1 var(--sans); min-width: 14px; opacity: .9; }
.goal .gn::after { content: "."; }
.goal.next { color: var(--gold); }
.goal.done { color: var(--mint); }

/* the streams fade into the top edge of the hero instead of being cut by it */
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 120px; z-index: 2; pointer-events: none; background: linear-gradient(var(--ink), rgba(10, 18, 34, 0)); }
@media (max-width: 960px) { .hero::before { height: 72px; } .level .v { font-size: 26px !important; } .level .l { margin-top: 2px; } .level .p { font-size: 16px; margin-top: 4px; } }
.tagtext { font: 600 16px/1 var(--sans); color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
