:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --foreground: #0f172a;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --border: #eeeeee;
  --border-strong: #e5e7eb;
  --primary: #000000;
  --primary-hover: #1e293b;
  --success: #16a34a;
  --danger: #dc2626;
  --soft: #f4f4f5;
  --shadow: -2px 4px 12px 4px rgba(51, 51, 51, 0.05);
  --radius: 18px;
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--foreground);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(238,238,238,0.8);
  backdrop-filter: blur(12px);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}
.brand-logo {
  width: auto;
  height: 1.7rem;
  max-width: 8rem;
  object-fit: contain;
}
.brand.has-logo .brand-text {
  font-size: 0.98rem;
}
.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav a:hover { color: var(--foreground); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.15s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-light {
  background: #fff;
  color: #000;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--foreground);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}

.hero {
  background: #000;
  color: #fff;
  padding: 5.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(255,255,255,0.06), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 40%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-kicker {
  color: #94a3b8;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
  max-width: 14ch;
}
.hero p {
  color: #cbd5e1;
  font-size: 1.1rem;
  max-width: 42ch;
  margin: 0 0 2rem;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.section { padding: 4rem 0; }
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}
.section-lead {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}
.card h3 {
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.card p {
  margin: 0;
  color: var(--muted);
}

.coin-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
@media (max-width: 900px) {
  .coin-list { grid-template-columns: repeat(2, 1fr); }
}
.coin {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}
.coin strong { display: block; margin-bottom: 0.25rem; }
.coin span { color: var(--muted); font-size: 0.9rem; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-warn { background: #f4f4f5; color: #64748b; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Pay page */
.pay-shell {
  padding: 3rem 0 4rem;
}
.pay-card {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pay-top {
  background: #000;
  color: #fff;
  padding: 1.5rem 1.5rem 1.25rem;
}
.pay-top h1 {
  margin: 0.35rem 0 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}
.pay-body { padding: 1.5rem; }
.pay-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.pay-row:last-child { border-bottom: 0; }
.pay-row span { color: var(--muted); }
.pay-row strong { text-align: right; word-break: break-all; }
.address-box {
  margin-top: 1rem;
  background: var(--soft);
  border-radius: 14px;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}
.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pending { background: #f4f4f5; color: #334155; }
.status-paid, .status-confirmed { background: #dcfce7; color: #15803d; }
.status-underpaid { background: #ffedd5; color: #c2410c; }
.status-expired, .status-cancelled { background: #fee2e2; color: #b91c1c; }
.pay-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.muted { color: var(--muted); }
.flash {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-success { background: #dcfce7; color: #166534; }
.scanner-health-panel { margin-bottom: 1rem; }
.scanner-health-compact { margin-bottom: 1rem; }
.scanner-health-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.scanner-health-ok { background: #dcfce7; color: #15803d; }
.scanner-health-stale { background: #ffedd5; color: #c2410c; }
.scanner-health-down, .scanner-health-never { background: #fee2e2; color: #b91c1c; }
.scanner-health-detail { margin: 0 0 1rem; }
.scanner-health-grid { margin: 0; }
.scanner-health-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.scanner-health-dot.scanner-health-ok { background: #16a34a; }
.scanner-health-dot.scanner-health-stale { background: #ea580c; }
.scanner-health-dot.scanner-health-down,
.scanner-health-dot.scanner-health-never { background: #dc2626; }
.scanner-health-hint { font-size: 0.88rem; margin: 1rem 0 0; }
.scanner-health-cron {
  margin-top: 0.75rem;
  background: #0f172a;
  color: #f8fafc;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  overflow: auto;
  font-size: 0.78rem;
}
