/* =============================================================
   Artemis Scan — styled after nativerpcethchain.com
   Geist + slate-navy palette + rounded cards (Vercel/Linear vibe)
   ============================================================= */

:root {
  --background:          #f8fafc;
  --foreground:          #0f172a;
  --card:                #ffffff;
  --card-foreground:     #0f172a;
  --border:              #e2e8f0;
  --muted:               #f1f5f9;
  --muted-foreground:    #64748b;
  --accent:              #2563eb;
  --accent-foreground:   #ffffff;
  --accent-soft:         rgba(37, 99, 235, 0.1);
  --success:             #16a34a;
  --danger:              #dc2626;
  --warning:             #d97706;
}

.dark {
  --background:          #0b1120;
  --foreground:          #e2e8f0;
  --card:                #111827;
  --card-foreground:     #e2e8f0;
  --border:              #1f2937;
  --muted:               #1a2333;
  --muted-foreground:    #94a3b8;
  --accent:              #3b82f6;
  --accent-foreground:   #0b1120;
  --accent-soft:         rgba(59, 130, 246, 0.12);
  --success:             #22c55e;
  --danger:              #ef4444;
  --warning:             #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--background);
  color: var(--foreground);
  height: 100%;
}

html { scrollbar-gutter: stable; }

body {
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--accent-foreground); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground); }

*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* utility */
.mono { font-family: 'Geist Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace; font-feature-settings: 'tnum' 1, 'zero' 1; }
.dim { color: var(--muted-foreground); }
.up { color: var(--success); }
.down { color: var(--danger); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.centered { text-align: center; }

/* =============== HEADER =============== */
.site-header {
  height: 69px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-logo { width: 24px; height: 24px; flex-shrink: 0; }
.brand-name { white-space: nowrap; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.nav-link, .site-nav a {
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: 8px;
  transition: all 150ms ease;
}
.site-nav a:hover { color: var(--foreground); background: var(--muted); }
.site-nav a.active { color: var(--foreground); background: var(--muted); }

.header-right { display: flex; align-items: center; gap: 10px; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 9999px;
}
.status-dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 9999px;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent);
  animation: statusPulse 1.8s ease-out infinite;
}
@keyframes statusPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent); }
  100% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--success) 0%,  transparent); }
}

/* =============== HERO =============== */
.hero {
  text-align: center;
  padding: 72px 0 56px;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 9999px;
}
.pill-dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 9999px;
}

.hero-title {
  margin-top: 22px;
  max-width: 820px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--foreground);
}
.hero-sub {
  margin-top: 20px;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.search {
  margin-top: 32px;
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-icon {
  width: 18px; height: 18px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.search input {
  flex: 1;
  min-width: 0;
  padding: 9px 2px;
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  color: var(--foreground);
  font-size: 15px;
}
.search input::placeholder { color: var(--muted-foreground); }

.kbd-hint { display: flex; gap: 4px; padding-right: 4px; }
.kbd-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  min-width: 20px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--muted-foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 150ms ease;
  white-space: nowrap;
}
.btn:hover { background: var(--border); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover { opacity: 0.9; background: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
  padding: 7px 11px;
  font-size: 13px;
}
.btn-ghost:hover { color: var(--foreground); background: var(--muted); }

.hero-examples {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  color: var(--muted-foreground);
}
.hero-examples-label { font-weight: 500; }
.chip {
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-family: 'Geist Mono', monospace;
  transition: all 150ms ease;
}
.chip:hover { color: var(--foreground); border-color: var(--muted-foreground); }

/* =============== SECTIONS =============== */
.section { padding: 48px 0; }
.section.bg-tint { background: color-mix(in srgb, var(--card) 40%, transparent); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-head.sub { margin-bottom: 16px; align-items: center; }
.section-head.centered { flex-direction: column; align-items: center; text-align: center; margin-bottom: 48px; }

.section-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foreground);
  line-height: 1.2;
}
.section-title.sm { font-size: 18px; }
.section-head.centered .section-title { font-size: clamp(28px, 3.5vw, 36px); max-width: 720px; }
.section-sub {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted-foreground);
  max-width: 560px;
  line-height: 1.55;
}
.section-head.centered .section-sub { text-align: center; margin: 10px auto 0; }

.section-meta { display: flex; align-items: center; gap: 10px; }
.live-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted-foreground);
  font-weight: 500;
}
.live-pulse {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 9999px;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent);
  animation: statusPulse 1.6s ease-out infinite;
}

/* =============== GRID =============== */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-6 { grid-template-columns: repeat(6, 1fr); gap: 12px; }

/* =============== STATS =============== */
.stats-grid .stat {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
  transition: border-color 150ms ease;
}
.stats-grid .stat:hover { border-color: var(--muted-foreground); }
.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 7px;
}
.stat-value {
  margin-top: 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foreground);
  font-feature-settings: 'tnum' 1, 'zero' 1;
  line-height: 1;
}
.stat-value .unit { font-size: 13px; font-weight: 500; color: var(--muted-foreground); margin-left: 3px; }
.stat-sub {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-sub .delta.up    { color: var(--success); font-weight: 500; }
.stat-sub .delta.down  { color: var(--danger);  font-weight: 500; }

.spark { width: 60px; height: 20px; display: block; margin-left: auto; }

.gas-bar {
  margin-top: 10px;
  height: 4px;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
}
.gas-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 9999px;
  transition: width 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* =============== CARDS =============== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.card-sub { margin-top: 4px; font-size: 13px; color: var(--muted-foreground); }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.foot-note .mono { color: var(--foreground); }

.link {
  color: var(--accent);
  font-weight: 500;
  font-size: 13.5px;
  transition: opacity 150ms ease;
}
.link:hover { opacity: 0.8; }

/* segment control */
.segment {
  display: inline-flex;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.seg-btn {
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: 6px;
  transition: all 150ms ease;
  min-width: 44px;
}
.seg-btn:hover { color: var(--foreground); }
.seg-btn.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* =============== LIST (rows) =============== */
.list { display: flex; flex-direction: column; }
.list .row {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 150ms ease;
  min-width: 0;
}
.list .row:last-child { border-bottom: 0; }
.list .row:hover { background: color-mix(in srgb, var(--muted) 50%, transparent); }

.row-block { grid-template-columns: 42px 1.1fr 1.3fr auto; }
.row-tx    { grid-template-columns: 42px 1.2fr 1.5fr auto; }
.row-token { grid-template-columns: 24px 1fr 90px 90px; }
.row-val   { grid-template-columns: 24px 1fr 90px 90px; }

.table-head {
  display: grid;
  gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--muted) 40%, transparent);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.03em;
  grid-template-columns: 24px 1fr 90px 90px;
}
.th.right { text-align: right; }
.th.rank { text-align: center; }

/* row icon */
.ic {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.ic.tx { background: color-mix(in srgb, var(--success) 10%, transparent); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }

/* cells */
.cell { min-width: 0; }
.cell-primary {
  font-family: 'Geist Mono', monospace;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.01em;
}
.cell-primary:hover { text-decoration: underline; text-underline-offset: 3px; }
.cell-secondary {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-secondary .sep { opacity: 0.5; margin: 0 6px; }

.hash-line {
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.hash-line + .hash-line { margin-top: 3px; color: var(--muted-foreground); }
.hash-line .label { font-family: 'Geist', sans-serif; font-size: 11px; color: var(--muted-foreground); flex-shrink: 0; }

.avatar {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--muted);
  border-radius: 9999px;
}
.tag.swap { color: #a855f7; background: color-mix(in srgb, #a855f7 10%, transparent); }
.tag.send { color: var(--warning); background: color-mix(in srgb, var(--warning) 10%, transparent); }
.tag.recv { color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent); }
.tag.mint { color: #06b6d4; background: color-mix(in srgb, #06b6d4 10%, transparent); }
.tag.call { color: var(--accent); background: var(--accent-soft); }
.tag.burn { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }

.cell-value {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
}
.cell-value .main {
  font-family: 'Geist Mono', monospace;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--foreground);
}
.cell-value .value-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.val-logo {
  width: 16px; height: 16px;
  border-radius: 9999px;
  background: var(--muted);
  flex-shrink: 0;
}
.cell-value .sub {
  font-size: 11.5px;
  color: var(--muted-foreground);
}

/* row stream animation */
@keyframes rowFlashIn {
  from { background: var(--accent-soft); }
  to   { background: transparent; }
}
.list .row.new { animation: rowFlashIn 1.2s ease-out; }

/* skeleton */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.sk {
  background: linear-gradient(90deg,
    var(--muted) 0%,
    color-mix(in srgb, var(--muted) 60%, var(--border)) 50%,
    var(--muted) 100%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.sk-line  { height: 10px; }
.sk-circ  { width: 16px; height: 16px; border-radius: 9999px; }
.ic.sk    { background: var(--muted); animation: shimmer 1.4s ease-in-out infinite; }
.w-16 { width: 48px; }
.w-24 { width: 72px; }
.w-40 { width: 120px; }
.w-50 { width: 150px; }
.w-70 { width: 200px; }
.row.skeleton { cursor: default; }
.row.skeleton:hover { background: transparent; }

/* tokens / validators table rows */
.row-token .rank, .row-val .rank {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--muted-foreground);
  text-align: center;
}
.row-token .tok-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-token .tok-logo {
  width: 32px; height: 32px;
  border-radius: 9999px;
  flex-shrink: 0;
  background: var(--muted);
  object-fit: cover;
}
.row-token .tok-name {
  display: flex; flex-direction: column; min-width: 0;
}
.row-token .tok-name .n {
  font-size: 14px; font-weight: 500; color: var(--foreground);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-token .tok-name .t {
  font-size: 12px; color: var(--muted-foreground);
  font-family: 'Geist Mono', monospace;
}
.row-token .price, .row-val .num {
  font-family: 'Geist Mono', monospace;
  font-size: 13.5px;
  color: var(--foreground);
  text-align: right;
}
.row-token .chg {
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  text-align: right;
  min-width: 70px;
}
.row-val .val-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-val .val-name {
  font-size: 14px; color: var(--foreground); font-weight: 500;
}

/* =============== CHART =============== */
.chart-card { padding: 0; }
.chart-head {
  padding: 20px 24px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.chart-metric { display: flex; flex-direction: column; gap: 4px; }
.chart-label { font-size: 13px; color: var(--muted-foreground); font-weight: 500; }
.chart-value {
  font-family: 'Geist Mono', monospace;
  font-size: 30px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.02em;
  line-height: 1;
}
.chart-change { font-size: 13px; font-weight: 500; }
.chart-change.up { color: var(--success); }
.chart-change.down { color: var(--danger); }
.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted-foreground);
  background: var(--muted);
  border-radius: 9999px;
}
.legend-dot { width: 8px; height: 8px; border-radius: 9999px; }

.chart-body {
  position: relative;
  height: 300px;
  padding: 0 24px 24px;
}
#chart { width: 100%; height: 100%; display: block; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  padding: 8px 11px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  font-size: 12px;
  min-width: 120px;
  transform: translate(-50%, -110%);
}
.chart-tooltip .tt-time { color: var(--muted-foreground); margin-bottom: 3px; font-size: 11px; }
.chart-tooltip .tt-val {
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
  color: var(--foreground);
  font-size: 14px;
}

/* =============== STEPS =============== */
.steps > div { padding: 4px 0; }
.step-num {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.step-title {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.step-body {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* =============== TWO-COL SECTION =============== */
.two-col { gap: 32px; }

/* =============== FOOTER =============== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted-foreground);
}

/* =============== RESPONSIVE =============== */
@media (max-width: 1100px) {
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .site-nav { display: none; }
  .grid-6 { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 36px; }
  .hero-title { font-size: 32px; }
  .section { padding: 36px 0; }
  .search { padding: 6px 6px 6px 12px; }
  .btn-primary { padding: 9px 14px; font-size: 13.5px; }
  .kbd-hint { display: none; }
  .row-block, .row-tx { grid-template-columns: 36px 1fr auto; }
  .row > .cell-mid { display: none; }
  .card-head { flex-direction: column; align-items: stretch; }
  .card-head .card-actions { justify-content: flex-start; }
  .chart-body { height: 220px; padding: 0 16px 16px; }
  .chart-head { padding: 16px 16px 10px; }
}
@media (max-width: 480px) {
  .grid-6 { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 16px; }
  .header-right .status-chip { display: none; }
}
