/* JACKFILED base.css: tokens, fonts, reset, type, site chrome (nav, status bar, footer), buttons, chips, forms,
   tables, dialogs, toast. Shared by every page. Page-specific layout lives in app.css / docs.css.
   Palette & fonts: BRIEF.md → "Design token". All mono. 4 jack colours are fixed everywhere:
   BURN lime · HOLDERS magenta · FUND cyan · CREATOR amber. */

@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap;
  src: url('/assets/fonts/martian-mono-latin-var.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-600.woff2') format('woff2'); }

:root {
  --bakelite: #0A0908;
  --panel: #141210;
  --panel-2: #1D1A16;
  --panel-3: #25211C;
  --line: #2C2823;
  --line-2: #3A352E;
  --brass: #B08D57;
  --brass-hi: #D9B97F;
  --text: #ECE6D9;
  --dim: #8C857A;
  --faint: #5E584F;
  --lime: #C6FF3D;
  --magenta: #FF2E88;
  --cyan: #2EE6FF;
  --amber: #FFB020;
  --red: #FF4A3D;

  --burn: var(--lime);
  --holders: var(--magenta);
  --fund: var(--cyan);
  --creator: var(--amber);

  --display: 'Martian Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 16px;
  --max: 1320px;
  --nav-h: 52px;
  --r: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; min-height: 100vh; background: var(--bakelite); color: var(--text);
  font: 400 13px/1.55 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--lime); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--lime); color: var(--bakelite); }
:focus-visible { outline: 1px solid var(--lime); outline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, kbd, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: .95em; color: var(--brass-hi); background: var(--panel-2); padding: 1px 5px; border: 1px solid var(--line); border-radius: var(--r); word-break: break-word; }
kbd { font-size: 10px; color: var(--dim); border: 1px solid var(--line-2); border-bottom-width: 2px; padding: 0 4px; border-radius: var(--r); line-height: 16px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(22px, 3.2vw, 34px); font-stretch: 112.5%; font-weight: 800; }
h2 { font-size: clamp(17px, 2vw, 22px); font-stretch: 105%; }
h3 { font-size: 14px; font-stretch: 100%; }
p { margin: 0 0 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.small { font-size: 11px; }
.tiny { font-size: 10px; }
.upper { text-transform: uppercase; letter-spacing: .08em; }
.label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); font-weight: 500; }
.ok { color: var(--lime); } .warn { color: var(--amber); } .bad { color: var(--red); }
.c-burn { color: var(--burn); } .c-holders { color: var(--holders); } .c-fund { color: var(--fund); } .c-creator { color: var(--creator); } .c-brass { color: var(--brass-hi); }
.readout { font-family: var(--display); font-weight: 700; text-shadow: 0 0 10px color-mix(in srgb, currentColor 45%, transparent); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
[hidden] { display: none !important; }

/* ── buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); border-radius: var(--r);
  font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.btn svg { width: 14px; height: 14px; flex: none; }
.btn:hover { border-color: var(--brass); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; border-color: var(--line-2); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 11px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 13px; }
.btn-primary { background: var(--lime); color: var(--bakelite); border-color: var(--lime); font-weight: 600; }
.btn-primary:hover { color: var(--bakelite); background: #d6ff6e; border-color: #d6ff6e; box-shadow: 0 0 18px rgba(198,255,61,.28); }
.btn-primary[disabled] { background: var(--panel-3); color: var(--dim); border-color: var(--line-2); box-shadow: none; }
.btn-ghost { background: transparent; }
.btn-brass { border-color: var(--brass); color: var(--brass-hi); background: transparent; }
.btn-danger { border-color: rgba(255,74,61,.5); color: var(--red); background: transparent; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: var(--r); color: var(--dim); background: transparent; transition: color .15s, border-color .15s; }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { color: var(--text); border-color: var(--brass); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 11px; color: var(--text); background: var(--panel); white-space: nowrap; }
.chip svg { width: 12px; height: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 7px; font: 600 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; border: 1px solid currentColor; border-radius: var(--r); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.badge.plain::before { display: none; }
.badge-red { color: var(--red); background: rgba(255,74,61,.08); }
.badge-amber { color: var(--amber); background: rgba(255,176,32,.08); }
.badge-lime { color: var(--lime); background: rgba(198,255,61,.07); }
.badge-cyan { color: var(--cyan); background: rgba(46,230,255,.07); }
.badge-dim { color: var(--dim); }
.lamp { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.lamp.on { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.lamp.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.lamp.red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.lamp.blink { animation: lamp 1.6s steps(2, jump-none) infinite; }
@keyframes lamp { 50% { opacity: .25; } }

/* ── forms ───────────────────────────────────────────── */
.field { display: grid; gap: 6px; }
.input {
  width: 100%; height: 38px; padding: 0 12px; background: var(--bakelite); border: 1px solid var(--line-2); border-radius: var(--r);
  color: var(--text); font: 400 13px/1 var(--mono); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(198,255,61,.1); }
.input.is-bad { border-color: var(--red); }
@media (max-width: 719px) { .input { font-size: 16px; } }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.hint { font-size: 11px; color: var(--dim); }
.hint.bad { color: var(--red); }

/* ── panels / tables ─────────────────────────────────── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.panel-h .label { color: var(--text); }
.panel-b { padding: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── nav ─────────────────────────────────────────────── */
.jf-skiplink { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--lime); color: var(--bakelite); padding: 8px 12px; font-weight: 600; }
.jf-skiplink:focus { top: 8px; }
.jf-nav { position: sticky; top: 0; z-index: 40; height: var(--nav-h); background: rgba(10,9,8,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.jf-nav > .wrap { height: 100%; display: flex; align-items: center; gap: 18px; max-width: none; }
.jf-logo { display: inline-flex; align-items: center; gap: 9px; flex: none; color: var(--text); }
.jf-logo svg { width: 26px; height: 26px; }
.jf-logo span { font: 800 13px/1 var(--display); font-stretch: 112.5%; letter-spacing: .02em; }
.jf-logo:hover { color: var(--text); }
.jf-links { display: flex; align-items: stretch; height: 100%; gap: 0; }
.jf-links a { display: inline-flex; align-items: center; padding: 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.jf-links a:hover { color: var(--text); }
.jf-links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--lime); }
.jf-nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.jf-ca-chip { cursor: pointer; }
.jf-ca-chip:hover { border-color: var(--brass); }
.jf-ca-k { color: var(--brass-hi); font-weight: 600; }
.jf-burger { display: none; }
.jf-drawer { display: none; }
@media (max-width: 1079px) { .jf-hide-md { display: none !important; } }
@media (max-width: 859px) {
  .jf-links, .jf-hide-sm { display: none !important; }
  .jf-burger { display: inline-grid; }
  .jf-drawer { position: fixed; z-index: 39; inset: var(--nav-h) 0 auto 0; background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; transform: translateY(-110%); transition: transform .22s var(--ease); display: block; visibility: hidden; }
  .jf-drawer.open { transform: none; visibility: visible; }
  .jf-dl { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font: 700 14px/1 var(--display); text-transform: uppercase; }
  .jf-dl[aria-current="page"] { color: var(--lime); }
  .jf-drawer-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 14px; }
}
@media (max-width: 420px) { .jf-connect .num { max-width: 84px; overflow: hidden; text-overflow: ellipsis; } .jf-logo span { font-size: 12px; } .jf-nav > .wrap { gap: 10px; } }

/* status bar under the nav: chain, block, mode, countdown */
.jf-status { border-bottom: 1px solid var(--line); background: var(--bakelite); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.jf-status > .wrap { display: flex; align-items: center; gap: 18px; height: 28px; overflow: hidden; max-width: none; }
.jf-status .s { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.jf-status b { color: var(--text); font-weight: 500; }
.jf-status .push { margin-left: auto; }
@media (max-width: 640px) { .jf-status .s-opt { display: none; } }
@media (max-width: 1100px) { .jf-status .jf-countdown .when { display: none; } }

/* connect button */
.jf-connect .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.jf-connect.wrong .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* countdown */
.jf-countdown { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; white-space: nowrap; }
.jf-countdown .soon { color: var(--amber); }
.jf-countdown .live { color: var(--lime); font-weight: 600; }
.jf-countdown .c { display: inline-flex; align-items: baseline; gap: 2px; }
.jf-countdown .c b { color: var(--text); font-weight: 600; }
.jf-countdown .c small { font-size: 9px; color: var(--dim); }
.jf-countdown .when { color: var(--dim); font-size: 10px; margin-left: 4px; letter-spacing: .04em; cursor: help; }
.jf-nav .jf-countdown .when { display: none; }
@media (min-width: 1360px) { .jf-nav .jf-countdown .when { display: inline; } }
.jf-status .jf-countdown { font-size: 10px; letter-spacing: .06em; }
@media (max-width: 520px) { .jf-status .jf-countdown .when { display: none; } .jf-status .s-xs { display: none; } }

/* CA strip */
.jf-ca { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jf-ca-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--brass-hi); }
.jf-ca-addr { font-size: 12px; word-break: break-all; }
.jf-ca-addr.pending { color: var(--dim); }

/* ── footer ──────────────────────────────────────────── */
.jf-foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 32px 0 28px; background: var(--bakelite); }
.jf-foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.jf-foot h2 { font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--dim); margin: 4px 0 12px; }
.jf-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 12px; }
.jf-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; }
.jf-foot-jacks { display: flex; gap: 6px; margin: 14px 0; }
.jf-foot-jacks i { width: 18px; height: 3px; display: block; }
.jf-legal { font-size: 10.5px; line-height: 1.6; color: var(--faint); margin-top: 18px; max-width: 120ch; }
@media (max-width: 760px) { .jf-foot-grid { grid-template-columns: 1fr 1fr; } .jf-foot-grid > :first-child { grid-column: 1 / -1; } }

/* ── dialog + toast ──────────────────────────────────── */
.jf-dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r); padding: 0; width: min(420px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.jf-dialog::backdrop { background: rgba(5,4,3,.72); backdrop-filter: blur(3px); }
.jf-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.jf-dialog header h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.jf-dialog .body { padding: 14px; }
.jf-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.jf-wallets { display: grid; gap: 6px; }
.jf-wallets button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); background: var(--panel-2); border-radius: var(--r); text-align: left; font-size: 13px; }
.jf-wallets button:hover { border-color: var(--lime); }
.jf-wallets img { width: 22px; height: 22px; }

.jf-toast { position: fixed; z-index: 90; left: 50%; bottom: 20px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px); width: max-content;
  background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--brass); padding: 10px 14px; font-size: 12px; transition: opacity .2s, transform .2s var(--ease); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.jf-toast.show { opacity: 1; transform: translate(-50%, 0); }
.jf-toast.ok { border-left-color: var(--lime); }
.jf-toast.err { border-left-color: var(--red); }

/* ── split bar (4 jacks) ─────────────────────────────── */
.split { display: flex; width: 100%; height: 8px; background: var(--panel-3); overflow: hidden; border-radius: 1px; gap: 1px; }
.split i { display: block; height: 100%; min-width: 0; transition: flex-basis .25s var(--ease); }
.split .burn { background: var(--burn); } .split .holders { background: var(--holders); } .split .fund { background: var(--fund); } .split .creator { background: var(--creator); }
.split.lg { height: 14px; }
.split.glow i { box-shadow: 0 0 10px -2px currentColor; }
.split-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-top: 6px; }
.split-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.split-legend span::before { content: ''; width: 8px; height: 8px; background: var(--c); }
.split-legend b { color: var(--text); font-weight: 500; }

/* ── states ──────────────────────────────────────────── */
.empty { display: grid; justify-items: start; gap: 10px; padding: 28px 18px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--dim); background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255,255,255,.012) 10px 20px); }
.empty h3 { color: var(--text); font-size: 13px; }
.empty p { margin: 0; max-width: 64ch; }
.skel { display: block; height: 12px; background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%; animation: skel 1.2s linear infinite; border-radius: 1px; }
@keyframes skel { to { background-position: -200% 0; } }
.err-box { border: 1px solid rgba(255,74,61,.4); background: rgba(255,74,61,.06); color: #ffb3ad; padding: 10px 12px; font-size: 12px; border-radius: var(--r); }
.note { border-left: 2px solid var(--brass); padding: 8px 12px; background: var(--panel); font-size: 12px; color: var(--dim); }
.note b { color: var(--text); font-weight: 500; }

/* coin avatar */
.coin { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.coin .av { width: 28px; height: 28px; flex: none; border: 1px solid var(--line-2); background: var(--panel-3); display: grid; place-items: center; font: 700 10px/1 var(--display); color: var(--brass-hi); overflow: hidden; border-radius: 50%; }
.coin .av img { width: 100%; height: 100%; object-fit: cover; }
.coin .nm { display: grid; min-width: 0; line-height: 1.25; }
.coin .nm b { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin .nm small { color: var(--dim); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.s-xs-only { display: none; }
@media (max-width: 640px) { .s-xs-only { display: inline; } }
.has-status .jf-nav .jf-countdown { display: none !important; }
