/* Carbon: shared tokens and base. Every page loads this first. */
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('/assets/fonts/inter/inter-latin-wght-normal.woff2') format('woff2-variations'); }

:root {
  --bg: #0b0c0d;
  --g1: #2a2e33;   /* raised surface */
  --g2: #1d2024;   /* card */
  --g3: #15171a;   /* sunken */
  --g4: #101214;
  --g5: #0d0e10;
  --line: rgba(220, 230, 240, .09);
  --line-2: rgba(220, 230, 240, .16);
  --text: #e9ecef;
  --text-hi: #f6f8fa;
  --muted: #9aa1a8;
  --quiet: #5f666d;
  --accent: #e8eef5;
  --accent-2: #9fb4c8;
  --up: #9fe0bd;
  --down: #f2a7a7;
  --r: 12px;
  --r-lg: 18px;
  --font: 'Inter Variable', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wrap: 1180px;
  --nav-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: 16px; line-height: 1.55; }
main { flex: 1; position: relative; z-index: 2; }
a { color: inherit; }
img, svg, canvas { display: block; }
button { font: inherit; color: inherit; }
::selection { background: rgba(159, 180, 200, .35); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.section { padding: 64px 0; }
.page { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 80px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--accent); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* type */
.h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1; letter-spacing: -.04em; font-weight: 650; color: var(--text-hi); margin: 0 0 16px; }
.h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.03em; font-weight: 620; color: var(--text-hi); margin: 0 0 12px; }
.h3 { font-size: 19px; line-height: 1.25; letter-spacing: -.015em; font-weight: 600; color: var(--text-hi); margin: 0 0 8px; }
.lede { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 620px; margin: 0 0 24px; }
.muted { color: var(--muted); }
.quiet { color: var(--quiet); }
.mono { font-family: var(--mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }

/* buttons: light, never black */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: #eef1f4; color: #0b0c0d; font-weight: 600; font-size: 15px; line-height: 1; padding: 14px 24px; border-radius: var(--r);
  box-shadow: 0 0 36px rgba(220, 235, 255, .14); transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 52px rgba(220, 235, 255, .28); background: #fff; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-lg { font-size: 16px; padding: 17px 30px; }
.btn-sm { font-size: 13.5px; padding: 10px 16px; border-radius: 10px; }
.btn-ghost, .btn-secondary { background: rgba(214, 222, 232, .2); color: #f4f7fa; box-shadow: inset 0 0 0 1px rgba(232, 238, 245, .32); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-ghost:hover, .btn-secondary:hover { background: rgba(214, 222, 232, .3); box-shadow: inset 0 0 0 1px rgba(232, 238, 245, .3); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text-hi); }

/* surfaces */
.card { background: linear-gradient(180deg, rgba(42, 46, 51, .55), rgba(21, 23, 26, .7)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; backdrop-filter: blur(10px); }
.card-flat { background: var(--g3); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .h2 { margin-bottom: 10px; }

/* forms */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > label, .label { font-size: 14px; color: var(--muted); font-weight: 500; }
.input, .select, .textarea { width: 100%; background: var(--g4); color: var(--text-hi); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(159, 180, 200, .6); box-shadow: 0 0 0 3px rgba(159, 180, 200, .15); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

/* table */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13.5px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.table td { padding: 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table tr:hover td { background: rgba(232, 238, 245, .025); }

/* nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--nav-h); }
.nav::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 12, 13, .92), rgba(11, 12, 13, 0)); pointer-events: none; }
.nav-inner { position: relative; height: 100%; display: flex; align-items: center; gap: 28px; padding: 0 36px; }
.nav-mark { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -.01em; color: var(--text-hi); }
.nav-mark svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: 9px; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--text-hi); background: rgba(232, 238, 245, .06); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-wallet { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.app-wallet-addr { color: var(--text-hi); padding: 9px 12px; border-radius: 10px; background: rgba(232, 238, 245, .06); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav-menu { display: none; position: relative; }
.nav-menu summary { list-style: none; cursor: pointer; padding: 9px 13px; border-radius: 10px; font-size: 14px; color: var(--text-hi); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-sheet { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; display: grid; gap: 4px; padding: 10px; background: var(--g2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.nav-sheet a { text-decoration: none; padding: 10px 12px; border-radius: 9px; color: var(--text); }
.nav-sheet a:hover { background: rgba(232, 238, 245, .06); }
.nav-sheet .nav-wallet { padding: 6px 4px 2px; }
@media (max-width: 860px) {
  .nav-inner { padding: 0 18px; gap: 12px; }
  .nav-links, .nav-right .nav-wallet { display: none; }
  .nav-menu { display: block; }
  .nav-right .btn { padding: 10px 14px; }
}

/* token layer */
.token-box { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 6px 6px 16px; border-radius: 14px; background: rgba(21, 23, 26, .78); border: 1px solid var(--line-2); backdrop-filter: blur(10px); }
.token-box .token-sym { color: var(--text-hi); font-weight: 600; font-size: 14px; margin-right: 6px; }
.token-box .token-addr { font-family: var(--mono); font-size: 13px; color: var(--accent-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-box .token-addr:hover { color: var(--text-hi); }
.token-box .btn { margin-left: 6px; }

/* footer */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 34px 0 40px; color: var(--quiet); font-size: 13.5px; background: var(--bg); }
.footer-inner { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text-hi); }
.footer .nav-mark { font-size: 15px; }
.footer .nav-mark svg { width: 20px; height: 20px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 60; background: #eef1f4; color: #0b0c0d; font-weight: 600; font-size: 14px; padding: 11px 18px; border-radius: 10px; transition: opacity .25s, transform .25s; pointer-events: none; }
.toast[data-show] { opacity: 1; transform: translate(-50%, 0); }

/* 404 */
.nf { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-top: var(--nav-h); }
