/* MARKUP MACHINE base.css: tokens, self-hosted fonts, reset, type, site chrome (nav, drawer, mobile strip, footer),
   buttons, chips, tables, spec-sheet blocks, dialogs, toast. Shared by every page (the landing imports it read-only).
   Tokens: BRIEF.md → "Design tokens". Graphite + ONE green accent (--tick). Red (--burn) is only for burns.
   No rounded corners, no gradients as decoration, no glow. Display = Saira Extra Condensed (caps), body = Geist Mono (tabular). */

@font-face { font-family: 'Saira Extra Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/saira-extra-condensed-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Saira Extra Condensed'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('/assets/fonts/saira-extra-condensed-latin-800.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/geist-mono-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/geist-mono-symbols-var.woff2') format('woff2');
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F; }

:root {
  --ink: #0D0E0F;
  --panel: #151719;
  --panel-2: #1C1F22;
  --line: #2B2F33;
  --line-2: #3A3F44;
  --steel: #6E767E;
  --text: #E6E8EA;
  --dim: #8B9197;
  --faint: #5A6066;
  --tick: #2BE37A;
  --tick-ink: #07210F;
  --tick-soft: rgba(43, 227, 122, .10);
  --burn: #FF4B3E;
  --burn-soft: rgba(255, 75, 62, .10);

  --display: 'Saira Extra Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 16px;
  --max: 1280px;
  --nav-h: 56px;
  --mbar-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); background: var(--ink); }
body {
  margin: 0; min-height: 100vh; background: var(--ink); color: var(--text);
  font: 400 13px/1.6 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(--tick); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; border-radius: 0; }
::selection { background: var(--tick); color: var(--ink); }
:focus-visible { outline: 1px solid var(--tick); 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: .94em; color: var(--text); background: var(--panel-2); padding: 1px 5px; border: 1px solid var(--line); word-break: break-word; }

h1, h2, h3, h4, .display { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; margin: 0; line-height: .95; }
h1 { font-size: clamp(40px, 6.4vw, 84px); }
h2 { font-size: clamp(26px, 3.2vw, 38px); }
h3 { font-size: 20px; font-weight: 600; letter-spacing: .03em; line-height: 1.05; }
h4 { font-size: 16px; font-weight: 600; letter-spacing: .04em; }
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; }
.label { font: 500 10px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.pn { font: 500 10px/1 var(--mono); letter-spacing: .1em; color: var(--steel); }           /* part number, e.g. MM-04 */
.up, .c-tick { color: var(--tick); } .down { color: var(--dim); } .c-burn { color: var(--burn); }
.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: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text); border-radius: 0;
  font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.btn svg { width: 14px; height: 14px; flex: none; }
.btn:hover { border-color: var(--text); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .4; cursor: not-allowed; transform: none; border-color: var(--line-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 10.5px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 12px; }
.btn-primary { background: var(--tick); color: var(--ink); border-color: var(--tick); font-weight: 500; }
.btn-primary:hover { color: var(--ink); background: #5BF098; border-color: #5BF098; }
.btn-primary[disabled] { background: var(--panel-2); color: var(--dim); border-color: var(--line-2); }
.btn-burn { border-color: rgba(255, 75, 62, .6); color: var(--burn); }
.btn-burn:hover { border-color: var(--burn); color: var(--burn); background: var(--burn-soft); }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); 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(--steel); }

.chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border: 1px solid var(--line-2); font-size: 11px; color: var(--text); background: transparent; white-space: nowrap; }
.chip svg { width: 12px; height: 12px; flex: none; color: var(--dim); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 6px; font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; border: 1px solid currentColor; white-space: nowrap; }
.tag-tick { color: var(--tick); background: var(--tick-soft); }
.tag-burn { color: var(--burn); background: var(--burn-soft); }
.tag-dim { color: var(--dim); }
.lamp { display: inline-block; width: 7px; height: 7px; background: var(--faint); flex: none; }
.lamp.on { background: var(--tick); }
.lamp.burn { background: var(--burn); }
.lamp.blink { animation: mm-lamp 1.4s steps(2, jump-none) infinite; }
@keyframes mm-lamp { 50% { opacity: .2; } }

/* ── spec sheet primitives ───────────────────────────── */
/* .sheet = a bordered drawing frame with corner ticks; .sheet-h = title strip (part no · name · meta) */
.sheet { position: relative; border: 1px solid var(--line); background: var(--ink); }
.sheet::before, .sheet::after { content: ''; position: absolute; width: 9px; height: 9px; border-color: var(--steel); border-style: solid; pointer-events: none; }
.sheet::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.sheet::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.sheet-h { display: flex; align-items: center; gap: 14px; min-height: 42px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.sheet-h h2, .sheet-h h3 { font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.sheet-h .push { margin-left: auto; }
.sheet-b { padding: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0; }
.kv > * { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.kv dt { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; padding-right: 16px; }
.kv dd { margin: 0; text-align: right; }
.readout { font-family: var(--display); font-weight: 800; line-height: .9; letter-spacing: .01em; font-variant-numeric: tabular-nums; }

/* ── tables ──────────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; font: 500 10px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── nav ─────────────────────────────────────────────── */
.mm-skiplink { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--tick); color: var(--ink); padding: 8px 12px; }
.mm-skiplink:focus { top: 8px; }
.mm-nav { position: sticky; top: 0; z-index: 40; height: var(--nav-h); background: var(--ink); border-bottom: 1px solid var(--line); }
.mm-nav.overlay { position: fixed; left: 0; right: 0; background: rgba(13, 14, 15, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mm-nav > .wrap { height: 100%; display: flex; align-items: center; gap: 20px; max-width: none; }
.mm-logo { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--text); }
.mm-logo svg { width: 28px; height: 28px; }
.mm-logo span { font: 800 22px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; padding-top: 2px; }
.mm-logo:hover { color: var(--text); }
.mm-links { display: flex; align-items: stretch; height: 100%; }
.mm-links a { display: inline-flex; align-items: center; padding: 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); border-bottom: 1px solid transparent; margin-bottom: -1px; }
.mm-links a:hover { color: var(--text); }
.mm-links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--tick); }
.mm-nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.mm-ca-chip { cursor: pointer; }
.mm-ca-chip:hover { border-color: var(--steel); }
.mm-ca-k { color: var(--dim); }
.mm-burger { display: none; }
.mm-drawer { display: none; }
.mm-mbar { display: none; }
@media (max-width: 1139px) { .mm-hide-md { display: none !important; } }
@media (max-width: 859px) {
  :root { --mbar-h: 58px; }
  .mm-links, .mm-hide-sm { display: none !important; }
  .mm-burger { display: inline-grid; }
  .mm-drawer { position: fixed; z-index: 39; inset: var(--nav-h) 0 auto 0; background: var(--ink); border-bottom: 1px solid var(--line); padding: 4px var(--gutter) 18px; transform: translateY(-110%); transition: transform .22s var(--ease); display: block; visibility: hidden; }
  .mm-drawer.open { transform: none; visibility: visible; }
  .mm-dl { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font: 800 28px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
  .mm-dl .pn { font-size: 10px; }
  .mm-dl[aria-current="page"] { color: var(--tick); }
  .mm-drawer-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 14px; }
  /* phones: CA + Buy stay reachable in a bottom strip */
  .mm-mbar { display: flex; align-items: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 38; height: var(--mbar-h);
    padding: 0 var(--gutter) env(safe-area-inset-bottom); background: var(--ink); border-top: 1px solid var(--line); }
  .mm-mbar .mm-ca-chip { flex: 1; min-width: 0; justify-content: space-between; height: 38px; }
  .mm-mbar .mm-ca-chip .num { overflow: hidden; text-overflow: ellipsis; }
  .mm-mbar .btn { flex: none; height: 38px; }
  body.has-mbar { padding-bottom: calc(var(--mbar-h) + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) { .mm-logo span { font-size: 19px; } .mm-nav > .wrap { gap: 10px; } }

/* connect button */
.mm-connect .dot { width: 7px; height: 7px; background: var(--tick); }
.mm-connect.wrong .dot { background: var(--dim); }

/* countdown */
.mm-countdown { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; white-space: nowrap; text-transform: uppercase; letter-spacing: .1em; }
.mm-countdown .soon { color: var(--dim); }
.mm-countdown .live { color: var(--tick); }
.mm-countdown .c { display: inline-flex; align-items: baseline; gap: 1px; }
.mm-countdown .c b { color: var(--text); font-weight: 500; }
.mm-countdown .c small { font-size: 9px; color: var(--dim); }
.mm-countdown .when { color: var(--dim); font-size: 10px; margin-left: 4px; letter-spacing: .04em; cursor: help; }
.mm-nav .mm-countdown .when { display: none; }

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

/* ── footer ──────────────────────────────────────────── */
.mm-foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 36px 0 30px; background: var(--ink); }
.mm-foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 28px; }
.mm-foot h2 { font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .16em; color: var(--dim); margin: 4px 0 14px; }
.mm-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 12px; }
.mm-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; }
.mm-legal { font-size: 10.5px; line-height: 1.65; color: var(--faint); margin-top: 18px; max-width: 120ch; }
.mm-legal b { color: var(--dim); font-weight: 500; }
@media (max-width: 760px) { .mm-foot-grid { grid-template-columns: 1fr 1fr; } .mm-foot-grid > :first-child { grid-column: 1 / -1; } }

/* ── dialog + toast ──────────────────────────────────── */
.mm-dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); padding: 0; width: min(420px, calc(100vw - 32px)); }
.mm-dialog::backdrop { background: rgba(5, 6, 7, .78); }
.mm-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mm-dialog header h3 { font-size: 18px; }
.mm-dialog .body { padding: 14px; }
.mm-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.mm-wallets { display: grid; gap: 6px; }
.mm-wallets button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); text-align: left; font-size: 13px; }
.mm-wallets button:hover { border-color: var(--tick); }
.mm-wallets img { width: 22px; height: 22px; }

.mm-toast { position: fixed; z-index: 90; left: 50%; bottom: calc(20px + var(--mbar-h)); 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(--steel); padding: 10px 14px; font-size: 12px; transition: opacity .2s, transform .2s var(--ease); }
.mm-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.mm-toast a { text-decoration: underline; }
.mm-toast.ok { border-left-color: var(--tick); }
.mm-toast.err { border-left-color: var(--burn); }

/* ── states ──────────────────────────────────────────── */
.empty { display: grid; justify-items: start; gap: 8px; padding: 26px 18px; border: 1px dashed var(--line-2); color: var(--dim); }
.empty h3 { color: var(--text); }
.empty p { margin: 0; max-width: 64ch; }
.skel { display: inline-block; height: 11px; min-width: 40px; background: var(--panel-2); animation: mm-skel 1.1s steps(2, jump-none) infinite; vertical-align: middle; }
@keyframes mm-skel { 50% { background: var(--line); } }
.err-box { border: 1px solid var(--line-2); border-left: 3px solid var(--burn); padding: 10px 12px; font-size: 12px; color: var(--dim); }
.note { border-left: 1px solid var(--tick); padding: 8px 12px; font-size: 12px; color: var(--dim); }
.note b { color: var(--text); font-weight: 500; }

/* slim progress bar: distance to ask */
.bar { position: relative; height: 4px; background: var(--line); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--tick); }
.bar.burn > i { background: var(--burn); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
