/* ── tokens ──────────────────────────────────────────────────────────────── */
:root {
  --paper: #ffffff;
  --paper-2: #f7f7f7;
  --ink: #000000;
  --ink-2: #4a4a4a;
  --ink-3: #8e8e8e;
  --line: #e6e6e6;
  --line-2: #cfcfcf;

  /* SF Pro where it exists (Apple devices); Inter is the closest match
     everywhere else. Medium (500) is the base weight throughout. */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;

  --wrap: 1080px;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1, h2 { margin: 0; letter-spacing: -0.035em; line-height: 1.04; font-weight: 600; }
a { color: inherit; }

/* ── setup banner (only when the backend is not wired up yet) ────────────── */
.setup {
  position: sticky; top: 0; z-index: 60;
  background: var(--ink); color: #fff;
  padding: 11px 24px; font-size: 13px; text-align: center;
  font-family: var(--mono); letter-spacing: 0;
}

/* ── nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 14px; height: 60px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand-mark {
  width: 26px; height: 26px; border-radius: var(--r);
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  flex: none;
}
.brand-mark svg { width: 17px; height: 17px; display: block; }

.ca {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 11px;
  background: var(--paper); border: 1px solid var(--line-2);
  border-radius: var(--r); cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 500;
  transition: border-color .15s;
}
.ca:hover { border-color: var(--ink); }
.ca-value { font-family: var(--mono); }
.ca-copy { color: var(--ink-3); }
.ca.copied .ca-copy { color: var(--ink); }

.nav-links { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }

/* ── the count ───────────────────────────────────────────────────────────── */
.hero { padding: 88px 0 76px; }

.headline { font-size: clamp(38px, 6.6vw, 72px); }

.counter { margin: 52px 0 20px; }
.counter-digits {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: clamp(48px, 13vw, 148px);
  line-height: 1;
  letter-spacing: -0.055em;
  display: flex; flex-wrap: wrap; align-items: baseline;
}
.counter-digits .d {
  display: inline-block;
  min-width: .58em;
  text-align: center;
  transition: transform .12s ease-out;
}
.counter-digits .d.tick { transform: translateY(-0.05em); }
.counter-digits .c { color: var(--line-2); min-width: .28em; }

.counter-target { margin-top: 14px; font-size: clamp(14px, 2vw, 17px); color: var(--ink-3); }
.counter-target .target { color: var(--ink); font-variant-numeric: tabular-nums; }

.bar { height: 6px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.bar-fill {
  height: 100%; width: 0; background: var(--ink);
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.bar-meta {
  display: flex; justify-content: space-between;
  margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.lede { max-width: 600px; margin: 38px 0 0; font-size: 17px; color: var(--ink-2); }
.lede strong { color: var(--ink); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 24px; margin-top: 28px;
  border-radius: var(--r);
  background: var(--ink); color: #fff;
  font-weight: 600; font-size: 15px; text-decoration: none;
  transition: opacity .15s, transform .12s;
}
.btn:hover { opacity: .84; }
.btn:active { transform: translateY(1px); }

/* ── countdown ───────────────────────────────────────────────────────────── */
.timer { border-block: 1px solid var(--line); background: var(--paper-2); margin-bottom: 66px; }
.timer-inner { display: flex; align-items: center; gap: 56px; padding: 22px 24px; }
.timer-block { display: flex; flex-direction: column; gap: 2px; }
.timer-label {
  font-size: 10px; font-weight: 600; letter-spacing: .11em;
  text-transform: uppercase; color: var(--ink-3);
}
.timer-value {
  font-size: clamp(30px, 5.5vw, 46px); font-weight: 600;
  letter-spacing: -0.04em; line-height: 1.05;
}
.timer-pot .timer-value { color: var(--ink-2); }

@media (max-width: 560px) {
  .timer-inner { gap: 32px; }
}

/* ── public ledger ───────────────────────────────────────────────────────── */
.ledger { padding: 0 0 88px; }

.sec-head { margin-bottom: 20px; }
.sec-head h2 { font-size: clamp(20px, 2.6vw, 26px); }
.sec-head p { margin: 6px 0 0; color: var(--ink-3); font-size: 14px; }

/* The wallet itself is the ledger — the table below is just the readable
   version of what this address has already done on chain. */
.ledger-wallet {
  border: 1px solid var(--ink);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.lw-label {
  display: block;
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 9px;
}
.lw-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lw-addr {
  font-size: 15px; font-weight: 500;
  overflow-wrap: anywhere; flex: 1 1 320px; min-width: 0;
}
.lw-btn {
  flex: none;
  height: 32px; padding: 0 13px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; text-decoration: none;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.lw-btn:hover { border-color: var(--ink); }
.lw-btn.copied { background: var(--ink); border-color: var(--ink); color: #fff; }

.table { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row {
  display: grid; align-items: center; gap: 14px;
  grid-template-columns: 150px minmax(0, 1fr) 84px 108px 92px;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.row:last-child { border-bottom: 0; }
.row.head {
  background: var(--paper-2);
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); padding: 10px 18px;
}

.pay-hour { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.addr { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
a.addr:hover { text-decoration: underline; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
a.num { text-decoration: none; }
a.num:hover { text-decoration: underline; }
.pay-status { text-align: right; }

.tag {
  display: inline-block; font-size: 10px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px; border: 1px solid var(--line-2);
  color: var(--ink-3);
}
.tag.paid { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag.failed, .tag.stuck { border-color: var(--ink); color: var(--ink); }

.empty { padding: 34px 18px; color: var(--ink-3); font-size: 14px; text-align: center; }
.paid-total { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ── foot ────────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 26px 0 40px; }
.foot-line {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 0; font-size: 13px; color: var(--ink-3);
}
.foot-wallet { text-decoration: none; font-size: 12px; }
.foot-wallet:hover { color: var(--ink); }
.disclaimer { margin: 16px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-3); max-width: 720px; }

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .hero { padding: 52px 0 48px; }
  .ca { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) 72px 100px; }
  .row .pay-hour, .row .pay-status { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
