/* shared styles for /buy/ and /app/; colour tokens come from the page */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }
.wrap { width: min(1104px, 100% - 40px); margin-inline: auto; }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.up { color: var(--up); }
.down { color: var(--down); }
.accent { color: var(--blue); }
:root[data-font="editorial"] .accent { font-style: italic; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font: 600 15px/1 var(--sans); white-space: nowrap; border: 1px solid var(--line-2); background: var(--card); color: var(--fg); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-dark { background: var(--fg); color: #fff; border-color: var(--fg); }
.btn-dark:hover { background: var(--hover-dark); }
.btn-block { width: 100%; height: 52px; font-size: 16px; }
.btn[disabled] { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.arrow { width: 12px; height: 12px; }
[data-connect].is-connected { background: var(--card); color: var(--fg); border-color: var(--line-2); font-family: var(--mono); font-weight: 500; }
[data-connect].is-connected::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px var(--up-wash); }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 9px; font: 700 18px/1 var(--sans); letter-spacing: -.02em; }
.mark { width: 26px; height: 26px; border-radius: 7px; background: none; display: grid; place-items: center; flex: none; overflow: hidden; }
.mark img { width: 100%; height: 100%; display: block; }
.brand { flex: none; }
.brand-logo { display: block; height: 30px; width: auto; }

/* site header (buy page) and app header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav { display: flex; gap: 4px; margin-left: 20px; min-width: 0; }
.nav a { padding: 8px 12px; border-radius: 999px; font-size: 15px; color: var(--text-2); white-space: nowrap; transition: background .2s, color .2s; }
.nav a:hover { background: var(--panel); color: var(--fg); }
.nav a.on { background: var(--fg); color: #fff; }
.top-cta { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; color: var(--text-2); }
.icon-btn:hover { background: var(--panel); }

/* page heads */
.page-head { padding: 56px 0 0; }
.kicker { display: inline-block; font: 600 15px/1.2 var(--sans); color: var(--blue); }
h1 { margin: 10px 0 0; font: var(--dw) clamp(40px, 5vw, 60px)/1.04 var(--display); letter-spacing: var(--tight); }
.lede { margin: 14px 0 0; max-width: 36em; font-size: 17.5px; line-height: 1.6; color: var(--muted); }
.ca { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin-top: 22px; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); font: 500 12.5px/1 var(--mono); color: var(--text-2); }
.ca b { font-weight: 500; font-size: 11px; letter-spacing: .08em; color: var(--faint); white-space: nowrap; }
.ca svg { color: var(--faint); flex: none; }
.ca span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* cards and small parts */
.card { background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-sm); }
.label { font: 600 11.5px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.live { background: var(--up-wash); color: var(--up-2); }
.chip.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.soft { background: var(--panel); color: var(--text-2); border: 1px solid var(--line); }
.logo { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--card); box-shadow: var(--shadow-sm); }
.logo svg { width: 21px; height: 21px; display: block; }
.logo.img { overflow: hidden; padding: 0; background: #fff; }
.logo.img img { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.32); }
.skeleton { display: inline-block; min-width: 4.5em; height: .9em; border-radius: 6px; background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; vertical-align: -2px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 40px; padding: 26px 0; border-block: 1px solid var(--line); }
.stats > div { padding-right: 20px; min-width: 0; }
.stats b { display: block; margin-top: 8px; font: 500 clamp(24px, 2.6vw, 32px)/1.1 var(--mono); letter-spacing: -.02em; }
.stats b.muted { color: var(--faint); }
.stats small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* wallet modal, same shape as Kepto's */
.ow-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(12, 16, 14, .5); opacity: 0; transition: opacity .2s ease; }
.ow-modal.in { opacity: 1; }
.ow-sheet { width: min(380px, 100%); border-radius: 18px; overflow: hidden; background: #16181B; color: #F4F2EC; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); transform: translateY(10px) scale(.98); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.ow-modal.in .ow-sheet { transform: none; }
.ow-head { position: relative; padding: 20px 56px 12px; text-align: center; }
.ow-head h3 { margin: 0; font: 600 17px/1.3 var(--sans); }
.ow-x { position: absolute; right: 14px; top: 15px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .09); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; }
.ow-x:hover { background: rgba(255, 255, 255, .16); }
.ow-list { display: grid; gap: 4px; padding: 6px 12px 6px; }
.ow-w { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: inherit; font: 600 15px/1 var(--sans); text-align: left; cursor: pointer; }
.ow-w:hover, .ow-w:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
.ow-w img { border-radius: 10px; flex: none; }
.ow-w em { margin-left: auto; padding: 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, .07); font: 500 12px/1 var(--sans); font-style: normal; color: rgba(255, 255, 255, .55); white-space: nowrap; }
.ow-w em.ok { background: rgba(126, 206, 160, .14); color: #8FD8B0; }
.ow-w.busy em { background: rgba(228, 201, 122, .16); color: #E4C97A; }
.ow-note { margin: 8px 22px 16px; font-size: 12.5px; line-height: 1.55; color: rgba(255, 255, 255, .5); }
.ow-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; color: rgba(255, 255, 255, .6); }
.ow-foot a { color: #fff; font-weight: 600; }
.ow-menu { position: fixed; z-index: 100; min-width: 240px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
.ow-menu-head { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.ow-menu-head img { border-radius: 7px; }
.ow-menu-head b { display: block; font: 600 14px/1.3 var(--mono); }
.ow-menu-head small { display: block; font-size: 12px; color: var(--muted); }
.ow-menu a, .ow-menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font: 500 14px/1.3 var(--sans); color: var(--fg); cursor: pointer; }
.ow-menu a:hover, .ow-menu button:hover { background: var(--panel); }

/* small footer */
.mini-foot { margin-top: 90px; border-top: 1px solid var(--line); }
.mini-foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; padding: 22px 0 30px; font-size: 13.5px; color: var(--muted); }
.mini-foot a:hover { color: var(--fg); }

.top.app .nav { gap: 2px; margin-left: 14px; }
.top.app .nav a { padding: 8px 10px; font-size: 14.5px; }
@media (max-width: 1320px) {
  .top.app .nav { order: 3; width: 100%; margin: 0 0 0 -10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
  .top.app .nav::-webkit-scrollbar { display: none; }
  .top.app .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; row-gap: 6px; }
}
@media (max-width: 900px) {
  .top .nav { display: none; }
  .top.app .nav { display: flex; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .top-cta .hide-sm { display: none; }
  .page-head { padding-top: 36px; }
  .ca { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
